• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-4329
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Major Major
Assignee: Unassigned
Reporter: Haravikk Mistral
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

Non-running script is reset on region-crossing

Created: 02/Jun/09 09:47 AM   Updated: 02/Jun/09 01:04 PM
Return to search
Component/s: Scripts
Affects Version/s: Mono Beta, 1.21.0 Server, 1.22.1 Server, 1.22.2 Server, 1.22.3 Server, 1.22.4 Server, 1.23.4 Server, 1.24 Server, 1.25 Server, 1.26 Server
Fix Version/s: None

Issue Links:
Duplicate
 


 Description  « Hide
This is an annoying, and quite serious bug.

If a script is set to not-running by another script (or by itself), then upon teleporting to another region or logging out it is silently reset (or its VM is discarded). This means that when the script is re-activated, it will begin from default state_entry() with default-values.

This is quite serious, because as we know scripts actually impact simulator performance even when idle, so it makes sense to set them to not-running automatically if they aren't needed, and simply start them running again when they are. However, if they reset as a result then this limits what scripts we can actually do this for to only very simple ones (i.e - that don't retain data, or contain any start-up code that could affect other scripts).

You can verify this with the following simple scripts:

integer on = TRUE;
default {
    touch_start(integer x) {
        if (on = !on) {
            llOwnerSay("Deactivating Slave");
            llSetScriptState("Slave", FALSE);
        } else {
            llOwnerSay("Activating Slave");
            llSetScriptState("Slave", TRUE);
        }
    }
}
default {
    state_entry() {
        llOwnerSay("I was reset!");
    }
}

Place them both in an object, and attach it to your HUD. Name the first whatever you want, and the second "Slave". Now, touch the object to deactivate Slave, teleport somewhere else (another region), and click it again re-enable Slave. If you are observing the same problem as I am, then Slave will say "I was reset" upon being re-activated, even though it should be sitting idle.

This of course isn't a peculiarity of the above "Slave" script having only a state-entry, it affects more complex/functional scripts too.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Harleen Gretzky added a comment - 02/Jun/09 10:04 AM - edited
Basically the same issue as SVC-26/SVC-1853/SVC-2558.

Alexa Linden added a comment - 02/Jun/09 01:04 PM
Dup of SVC-26