Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003326 [opensim] [REGION] Scripting Engine minor always 2009-03-24 04:27 2009-03-24 15:24
Reporter BlueWall View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0003326: llGetOwnerKey throws NullReferenceException
Description lGetOwnerKey throws NullReferenceException when fetching the key from a child prim in a link set.
Additional Information //
// Sender - Located in child prim of linkset

integer gChan = -23098;

default
{
    state_entry()
    {
        llSay(0, "Script running");
    }
    
    touch_start(integer _det) {
        
        llSay(0,"Object Owner Is - " + llGetOwner());
        llSay(0,"Object Key is - " + llGetKey());
        llSay(gChan,"Hello!");
        
    }
}




//
// Reciever - located in external prim or another member of the linkset

integer gChan = -23098;

default
{
    state_entry()
    {
        llSay(0, "Script running");
        llListen(gChan,"","","");
    }
    
    listen(integer _ch, string _nm, key _id, string _msg) {
        
        llSay(0,"Sender is " + _id);
        
        key owner = llGetOwnerKey(_id);
    }
}
Tags No tags attached.
Git Revision
SVN Revision 0.6.3.8840
Run Mode Grid (Multiple Regions per Sim)
Physics Engine ODE
Environment Mono / Linux32
Mono Version 2.0.1
Attached Files

- Relationships

-  Notes
(0010103)
BlueWall (reporter)
2009-03-24 04:44

Exception...

SLOODLE Choice (Horizontal): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

Server stack trace:
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000]
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000]
  at OpenSim.Region.ScriptEngine.Shared.ScriptBase.Executor.ExecuteEvent (System.String state, System.String FunctionName, System.Object[] args) [0x00000]

Exception rethrown at [0]:
 ---> System.NullReferenceException: Object reference not set to an instance of an object

Server stack trace:
  at OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api.llGetOwnerKey (System.String id) [0x00000]
  at (wrapper remoting-invoke-with-check) OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api:llGetOwnerKey (string)
  at (wrapper xdomain-dispatch) OpenSim.Region.ScriptEngine.Shared.Api
(0010105)
melanie (administrator)
2009-03-24 05:20

The trace would be really helpful if the sim was run with mono --debug OpenSim.exe, because that would output line numbers for us to go by.
(0010108)
cfk (administrator)
2009-03-24 12:01

I understand this is sloodle and as a consequence, important to many. I also get the impression from talking with BlueWall that this may be a linked set. So, perhaps one was to help resolve is to re-test with --debug for mono and then describe the linked set. Also, lets see if a simplified test can work with one prim or just a two prim linked set if this is a complicated object.
(0010109)
BlueWall (reporter)
2009-03-24 12:21

Thanks Melanie! I will get that information right away.

re: cfk The script above was in a child of a linkset of 3 cubes. And the receiver script in with a single object placed nearby. Also, the same result is achieved when placing the receiver inside the root or another child in the 3 prim linked set.

Thaks!
BlueWall
(0010110)
master zephyr (reporter)
2009-03-24 12:42
edited on: 2009-03-24 12:51

http://pastebin.com/mf70d39c [^]
Same issue on win32 svn build @rev 8851, might be better clues.

ADDED: Was on X-Eng only. Same test

(0010113)
BlueWall (reporter)
2009-03-24 15:01

Thanks HomerH for the tip to get the debugging info out!




17:58:47 - Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

Server stack trace:
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00071] in /home/jamesh/src/Mono/mono-2.2/mcs/class/corlib/System.Reflection/MonoMethod.cs:169
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /home/jamesh/src/Mono/mono-2.2/mcs/class/corlib/System.Reflection/MethodBase.cs:111
  at OpenSim.Region.ScriptEngine.Shared.ScriptBase.Executor.ExecuteEvent (System.String state, System.String FunctionName, System.Object[] args) [0x00089] in /home/jamesh/BlueWall/Projects/OpenSim/trunk/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs:199

Exception rethrown at [0]:
 ---> System.NullReferenceException: Object reference not set to an instance of an object

Server stack trace:
  at OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api.llGetOwnerKey (System.String id) [0x00021] in /home/jamesh/BlueWall/Projects/OpenSim/trunk/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs:4408
  at (wrapper remoting-invoke-with-check) OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api:llGetOwnerKey (string)
  at (wrapper xdomain-dispatch) OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api:llGetOwnerKey (object,byte[]&,byte[]&,string)

Exception rethrown at [0]:

  at (wrapper xdomain-invoke) OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api:llGetOwnerKey (string)
  at OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass.llGetOwnerKey (System.String id) [0x00000] in /home/jamesh/BlueWall/Projects/OpenSim/trunk/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs:619
  at SecondLife.Script.default_event_listen (LSLInteger _ch, LSLString _nm, LSLString _id, LSLString _msg) [0x0002c] in /tmp/e3197b3/2f6ff2e1.0.cs:13
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00057] in /home/jamesh/src/Mono/mono-2.2/mcs/class/corlib/System.Reflection/MonoMethod.cs:159
  --- End of inner exception stack trace ---
  at (wrapper xdomain-invoke) OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass:ExecuteEvent (string,string,object[])
  at OpenSim.Region.ScriptEngine.Shared.Instance.ScriptInstance.EventProcessor () [0x001eb] in /home/jamesh/BlueWall/Projects/OpenSim/trunk/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs:691
Region (BlueWall Debug) #
(0010114)
HomerHorwitz (manager)
2009-03-24 15:01

Happens in LSL_Api, l. 4408:
SceneObjectPart obj = World.GetSceneObjectPart(World.Entities[key].LocalId);

If <key> is the key of a child prim, then World.Entities[key] is null.
(0010116)
svn (developer)
2009-03-24 15:12

melanie committed related code in r8859

Change llGetOwnerKey to use another overload of GetSceneObject.
Fixes Mantis 0003326

see more at - http://opensimulator.org/cgi-bin/viewvc.cgi?view=rev&revision=8859 [^]
(0010117)
BlueWall (reporter)
2009-03-24 15:24

Tested and works as expected.

Thanks Melanie!

- Issue History
Date Modified Username Field Change
2009-03-24 04:27 BlueWall New Issue
2009-03-24 04:27 BlueWall SVN Revision => 0.6.3.8840
2009-03-24 04:27 BlueWall Run Mode => Grid (Multiple Regions per Sim)
2009-03-24 04:27 BlueWall Physics Engine => ODE
2009-03-24 04:27 BlueWall Environment => Mono / Linux32
2009-03-24 04:27 BlueWall Mono Version => 2.0.1
2009-03-24 04:44 BlueWall Note Added: 0010103
2009-03-24 05:20 melanie Note Added: 0010105
2009-03-24 12:01 cfk Note Added: 0010108
2009-03-24 12:21 BlueWall Note Added: 0010109
2009-03-24 12:42 master zephyr Note Added: 0010110
2009-03-24 12:51 master zephyr Note Edited: 0010110
2009-03-24 15:01 BlueWall Note Added: 0010113
2009-03-24 15:01 HomerHorwitz Note Added: 0010114
2009-03-24 15:12 svn Checkin
2009-03-24 15:12 svn Note Added: 0010116
2009-03-24 15:12 svn Status new => resolved
2009-03-24 15:12 svn Resolution open => fixed
2009-03-24 15:24 BlueWall Status resolved => closed
2009-03-24 15:24 BlueWall Note Added: 0010117


Mantis 1.1.1[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker