Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007255opensim[REGION] Scripting Enginepublic2014-07-07 07:082014-07-29 14:45
ReporterDev Random 
Assigned Tojustincc 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformAMD Athlon II X4 630, 4GBOSLinuxOS VersionUbuntu 12.04 LTS
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0007255: Script reported as active, after removing self from inventory
DescriptionWhen a script removes itself, the Scripting Engine does not recognize the removal. As a result, the apparent number of active scripts continually increases.
Steps To ReproduceCreate a prim, drop this script into it, and take a copy.

default {
    on_rez(integer p) {
        llOwnerSay("Removing script");
        llRemoveInventory(llGetScriptName());
    }
}

On console do "show stats" and note the AtvScr value.
Rez the copied prim, and you will see the "Removing script" message.
Edit the contents of the newly-rezzed prim, and you will see no script.
On console do "show stats" and note the AtvScr value has increased.
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
EnvironmentMono / Linux64
Mono Version3.2
Viewer
Attached Filespatch file icon 0001-Call-RemoveScriptInstance-when-removing-from-invento.patch [^] (1,235 bytes) 2014-07-11 06:01 [Show Content]

- Relationships

-  Notes
(0026466)
Dev Random (reporter)
2014-07-11 06:03

Patch routes execution through the script cleanup code when a script is removed from inventory. This also seems to fix the issue from mantis 0007156.
(0026467)
melanie (administrator)
2014-07-11 13:29

It it certain that the code in RemoveScriptEvents still runs? If that doesn't run, prim weirdness results.
(0026468)
Dev Random (reporter)
2014-07-11 13:41

Here's my take....

The new code calls RemoveScriptInstance() with sceneObjectBeingDeleted= false;

Inside RemoveScriptInstance, there is this:

      if (!sceneObjectBeingDeleted)
                    m_part.RemoveScriptEvents(itemId);

There is no code that might alter sceneObjectBeingDeleted before that section, so since the method was called with false, the RemoveScriptEvents will be executed.
(0026474)
justincc (administrator)
2014-07-14 10:36

Looks fine to me. Applied as git master 4e92b55. Thanks Dev.

- Issue History
Date Modified Username Field Change
2014-07-07 07:08 Dev Random New Issue
2014-07-11 06:01 Dev Random File Added: 0001-Call-RemoveScriptInstance-when-removing-from-invento.patch
2014-07-11 06:03 Dev Random Note Added: 0026466
2014-07-11 06:03 Dev Random Status new => patch included
2014-07-11 13:29 melanie Note Added: 0026467
2014-07-11 13:41 Dev Random Note Added: 0026468
2014-07-14 10:36 justincc Note Added: 0026474
2014-07-14 10:36 justincc Status patch included => resolved
2014-07-14 10:36 justincc Resolution open => fixed
2014-07-14 10:36 justincc Assigned To => justincc
2014-07-29 14:45 Dev Random Status resolved => closed
2014-07-29 14:45 Dev Random Fixed in Version => master (dev code)


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker