Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008539opensim[REGION] Scripting Enginepublic2019-06-04 03:302019-06-05 14:08
Reporterunregi 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformmonoOSLinuxOS VersionDebian stable
Product Version0.9.0.1 
Target VersionFixed in Version 
Summary0008539: CHANGED_POSITION event on KeyframedMotion a bit too noisy
DescriptionA prim that's moving by KFM will fire the OpenSim 0.9-only CHANGED_POSITION changed event 20 times per second non-stop.

Besides potentially causing lag, that leads on YEngine to error-spam when shutting down the Region.
Steps To Reproduce1. Create a simple prim somewhere mid-air
2. put this script inside:

#======================
integer times = 0;

default
{
    state_entry()
    {
        llSetKeyframedMotion([<0.0, 0.0, 0.5>, 1.0, <0.0, 0.0, -0.5>, 1.0], [KFM_DATA, KFM_TRANSLATION, KFM_MODE, KFM_PING_PONG]);
        llSetTimerEvent(10);
    }
    
    timer()
    {
        llSay(0, (string)(times / 10) + " changed events per second");
        times = 0;
    }

    changed(integer chg)
    {
        times += 1;
    }
}
#======================

3. watch it output about 20 changed events per second.
4. shut down the sim while this prim is still there, moving
5. observe a bunch of the following errors:

Delegate for TriggerOnScriptChangedEvent failed - continuing. Object reference not set to an instance of an object at OpenSim.Region.ScriptEngine.Yengine.Yengine.PostObjectEvent (System.UInt32 localID, OpenSim.Region.ScriptEngine.Shared.EventParams parms) [0x00000] in <9196d7fbe74f4baba886d72cea36faa7>:0
  at OpenSim.Region.ScriptEngine.Yengine.Yengine.changed (System.UInt32 localID, System.UInt32 change, System.Object parameter) [0x00025] in <9196d7fbe74f4baba886d72cea36faa7>:0
  at OpenSim.Region.Framework.Scenes.EventManager.TriggerOnScriptChangedEvent (System.UInt32 localID, System.UInt32 change, System.Object parameter) [0x0001e] in <df7e9d47a08f466aba6f1b93bcc92748>:0
Additional Information(i personally would prefer an option to disable the CHANGED_POSITION event, with a default to enabled, as i have many animals that aren't Animesh yet and that move with KFM or by setting part-positions with timers)
TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region)
Physics EngineBulletSim
EnvironmentUnknown
Mono VersionNone
Viewer
Attached Filespatch file icon 0001-deactivate-CHANGED_POSITION-event.patch [^] (1,175 bytes) 2019-06-05 13:46 [Show Content]

- Relationships

-  Notes
(0035304)
unregi (reporter)
2019-06-05 13:51

For testing, attached a patch that comments out the CHANGED_REGION event.
On my testserver on a little minipc the idle CPU usage went down from 20% avg to 14%, and the sim had <10 prim animals that used KFM just maybe once a min to move a bit for a few seconds and two objects that were constantly moving via KFM.
(0035309)
UbitUmarov (administrator)
2019-06-05 14:08

Thanks for sharing your test code
But as you know, we can't do this.
We can only try to streamline the code paths in future

- Issue History
Date Modified Username Field Change
2019-06-04 03:30 unregi New Issue
2019-06-05 13:46 unregi File Added: 0001-deactivate-CHANGED_POSITION-event.patch
2019-06-05 13:51 unregi Note Added: 0035304
2019-06-05 14:08 UbitUmarov Note Added: 0035309


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker