Jump to content

Stack heap collisions


You are about to reply to a thread that has been inactive for 439 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

1 hour ago, Qie Niangao said:

It's always a surprise to me. 😛 

It's not at all obvious, and definitely the kind of thing I would test right before doing something where the behavior was somehow important, but because I was curious:

Does X survive after a shift-copy?

  • Linkset Data: Yes, survives copy.
  • Particles: Yes, survives copy.
  • Physics material (is physical, gravity, friction etc.): Yes, survives copy.
  • Phantom: Yes, survives copy.
  • Temp-on-rez: Copy is immediately deleted.
  • Locked: Cannot perform the copy. Yes, Ctrl+d does perform a copy, and the copy will also be locked.
  • Script state: No, is reset.
  • Omega: No, is stopped. (even if was physical; copy may spin if physical and non-phantom because it gets pushed by original, not due to intrinsic omega/torque)
  • Texture Animation: No, is stopped.
  • Looped sounds: No, becomes silent.
  • Torque: No, is reset to 0.
  • Force: No, is reset to 0.
  • llSetStatus parameters: Mostly No,  STATUS_ROTATE is reset to default, and I would presume anything except phantom and physics (which do survive) is reset.
  • Vehicle parameters: No, seem to be reset (see below).
default
{   state_entry()
    {   llSay(0, "Linkset Data: "+llLinksetDataRead("key"));
        llSay(0, "Torque: "+(string)llGetTorque());
        llSay(0, "Force: "+(string)llGetTorque());
    }
    touch_start(integer total_number)
    {   llLinksetDataWrite("key","value");
        llTargetOmega(<0,0,1>,0.5,0.5);
        llSetTextureAnim(ANIM_ON|SMOOTH|ROTATE|LOOP,ALL_SIDES,1,1,0.1,PI,0.2);
        llParticleSystem([PSYS_SRC_BURST_RATE,0.5]);
        llLoopSound("a3325291-3b1e-f4d4-b18c-94e77e415481",1.0);
        llSetTorque(<1,0,0>,FALSE);
        llSetForce(<0,0,0.01>,FALSE);
        llSetStatus(STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z,FALSE);
    }
}

 

Edited by Quistess Alpha
  • Thanks 2
Link to comment
Share on other sites

Additionally: I don't know if this is a standard viewer or Firestorm feature, but while you have something selected in build mode, control-D will duplicate the object without needing to shift-drag. The duplicate will be placed at <x+0.5, y+0.5, z> relative to the original so it's the opposite how shift-dragging works: the copy is the one that's in a new location. I usually find this more convenient than dragging things.

  • Thanks 2
Link to comment
Share on other sites

14 minutes ago, Quistess Alpha said:

Does X survive after a shift-copy?

  • Linkset Data: Yes, survives copy.
  • Particles: Yes, survives copy.
  • Physics material (is physical, gravity, friction etc.): Yes, survives copy.
  • Phantom: Yes, survives copy.
  • Temp-on-rez: Copy is immediately deleted.
  • Locked: Cannot perform the copy. Yes, Ctrl+d does perform a copy, and the copy will also be locked.
  • Script state: No, is reset.
  • Omega: No, is stopped. (even if was physical; copy may spin if physical and non-phantom because it gets pushed by original, not due to intrinsic omega/torque)
  • Texture Animation: No, is stopped.
  • Looped sounds: No, becomes silent.
  • Torque: No, is reset to 0.
  • Force: No, is reset to 0.
  • llSetStatus parameters: Mostly No,  STATUS_ROTATE is reset to default, and I would presume anything except phantom and physics (which do survive) is reset.

Vehicle parameters?

Link to comment
Share on other sites

11 minutes ago, Love Zhaoying said:

Vehicle parameters?

also reset as far as I can tell.

default
{
    touch_start(integer total_number)
    {   // set physics on and gravity to 0 in the build menu, 
        //too lazy to script it in.
        llSetVehicleType(VEHICLE_TYPE_BALLOON);
        llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 4.0);
        llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5);
    }
}

copies fall (or go in whatever direction they think they've been pushed), but when set to balloon, floats to a specific distance above ground.

Edited by Quistess Alpha
  • Thanks 1
Link to comment
Share on other sites

2 minutes ago, Love Zhaoying said:

It looks a lot like most things that are an actual "Primitive Property" survive - which is actually independent of the script.

Yeah, I don't think there's anything that can be set without a script, which would be lost in a copy.

There are also some odd ones like llHover which I think is set like a prim property but it 'turns off' if the script stops running.

Link to comment
Share on other sites

Yup, llSetHoverHeight, llGroundRepel and llRotLookAt, llMoveToTarget, and presumably anything else which does a physics thing all turn off when the script is set to not running.

Funny though, if a thing is stationary in the air when the script gets turned off, the simulator won't remember to kick gravity in until it gets a little shove. Coyote time perhaps? :P

default
{
    state_entry()
    {
        //llSetHoverHeight(3.0,TRUE,0.5); // choose one of 3
        //llMoveToTarget(llGetPos()+<0,0,3>,0.5);
        //llGroundRepel(3.0,TRUE,0.5);
        llRotLookAt(ZERO_ROTATION,0.5,0.5);
    }
} // set running to false ; see it fall and spin.

 

Edited by Quistess Alpha
  • Thanks 1
  • Haha 1
Link to comment
Share on other sites

3 hours ago, Wulfie Reanimator said:

Please tell me This Ctrl+D method is new...

Ctrl+Z Undo
Ctrl+X Cut
Ctrl+C Copy
Ctrl+V Paste
Ctrl+Y Redo
Del Delete object or delete character forward
Ctrl+A Select All
Ctrl+E Deselect
Ctrl+D Duplicate
Ctrl+S Save notecard/script.
  • Like 1
Link to comment
Share on other sites

5 hours ago, Love Zhaoying said:

 Unless, resetting "no-mod scripts" would lead to more issues than solutions (if made easier).

There are cases where it would indeed cause problems.  The first one that comes to my mind are for 3rd party scripts that require some external validation routine. I have one that will check when being added or reset: 1) that I"m the current owner of the object the script is being placed in, 2) that the object is set to "next owner NO MOD".  When I put it in my product it validates my license to use it and all is good. So then, when I sell/transfer my  widget to someone it will still all works fine.  But with the shift copy script reset hack, when the that script initializes, the license check will fail and that will break my widget that depends on it. 

Granted this type of license checks are going to be relatively rare, but they do exist and need to be kept in mind.  The widget might be broken by the stack heap error, but the shift-copy fix won't always be a "universal fix".

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

AO SU4KA Stack Heep errors

What changed to being this problem?

Change of Physics.

Something in the [Legacy EDIT]?

Were do I go to have this redelivered?

How do I find the original AO SU4KA in my Inventory. I don't have the cards, etc. for this AO, just the unpacked Object.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 439 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...