diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs index 49f67127b0..3319783dc4 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs @@ -58,6 +58,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine /// Free AppDomain private AppDomainStructure GetFreeAppDomain() { + Console.WriteLine("Finding free AppDomain"); FreeAppDomains(); // Outsite lock, has its own GetLock lock (GetLock) { @@ -141,8 +142,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine // Find next available AppDomain to put it in AppDomainStructure FreeAppDomain = GetFreeAppDomain(); - if (FreeAppDomain == null) Console.WriteLine("FreeAppDomain == null"); - if (FreeAppDomain.CurrentAppDomain == null) Console.WriteLine("FreeAppDomain.CurrentAppDomain == null"); + //if (FreeAppDomain == null) Console.WriteLine("FreeAppDomain == null"); + //if (FreeAppDomain.CurrentAppDomain == null) Console.WriteLine("FreeAppDomain.CurrentAppDomain == null"); + Console.WriteLine("Loading into AppDomain: " + FileName); LSL_BaseClass mbrt = (LSL_BaseClass)FreeAppDomain.CurrentAppDomain.CreateInstanceFromAndUnwrap(FileName, "SecondLife.Script"); //Type mytype = mbrt.GetType(); Console.WriteLine("ScriptEngine AppDomainManager: is proxy={0}", RemotingServices.IsTransparentProxy(mbrt)); diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs index 4343ea1a95..a20a95a743 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs @@ -51,7 +51,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine // TODO: ADD SERVER HOOK TO LOAD A SCRIPT THROUGH myScriptEngine.ScriptManager // Hook up a test event to our test form - //myScriptEngine.Log.Verbose("ScriptEngine", "EventManager Hooking up to server events"); + myScriptEngine.Log.Verbose("ScriptEngine", "Hooking up to server events"); myScriptEngine.World.EventManager.OnObjectGrab += new OpenSim.Region.Environment.Scenes.EventManager.ObjectGrabDelegate(touch_start); myScriptEngine.World.EventManager.OnRezScript += new OpenSim.Region.Environment.Scenes.EventManager.NewRezScript(OnRezScript); myScriptEngine.World.EventManager.OnRemoveScript += new OpenSim.Region.Environment.Scenes.EventManager.RemoveScript(OnRemoveScript); @@ -62,6 +62,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine { // Add to queue for all scripts in ObjectID object //myScriptEngine.m_logger.Verbose("ScriptEngine", "EventManager Event: touch_start"); + Console.WriteLine("touch_start localID: " + localID); myScriptEngine.myEventQueueManager.AddToObjectQueue(localID, "touch_start", new object[] { (int)1 }); } public void OnRezScript(uint localID, LLUUID itemID, string script) @@ -75,11 +76,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine // new OpenSim.Region.Environment.Scenes.Scripting.NullScriptHost() //); Console.WriteLine("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " + script.Length); - myScriptEngine.myScriptManager.StartScript( - localID, - itemID, - script - ); + myScriptEngine.myScriptManager.StartScript(localID, itemID, script); } public void OnRemoveScript(uint localID, LLUUID itemID) diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs index 23cd4e8f57..a436bff0f4 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs @@ -241,7 +241,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine // Do we have any scripts in this object at all? If not, return if (myScriptEngine.myScriptManager.Scripts.ContainsKey(localID) == false) + { + Console.WriteLine("Event \"" + FunctionName + "\" for localID: " + localID + ". No scripts found on this localID."); return; + } foreach (LLUUID itemID in myScriptEngine.myScriptManager.GetScriptKeys(localID)) { diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index b7a4acacd1..efd5a7f012 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs @@ -169,11 +169,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine //OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass Script = LoadAndInitAssembly(FreeAppDomain, FileName); //OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass Script = LoadAndInitAssembly(FreeAppDomain, FileName, localID); - long before; - before = GC.GetTotalMemory(true); + + //long before; + //before = GC.GetTotalMemory(true); LSL_BaseClass CompiledScript = m_scriptEngine.myAppDomainManager.LoadScript(FileName); - Console.WriteLine("Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before); - before = GC.GetTotalMemory(true); + //Console.WriteLine("Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before); + //before = GC.GetTotalMemory(true); + + //Script = m_scriptEngine.myAppDomainManager.LoadScript(FileName); //Console.WriteLine("Script occupies {0} bytes", GC.GetTotalMemory(true) - before); //before = GC.GetTotalMemory(true); diff --git a/bin/OpenSim.ini b/bin/OpenSim.ini index 2be850721e..6932d492fb 100644 --- a/bin/OpenSim.ini +++ b/bin/OpenSim.ini @@ -4,8 +4,8 @@ physics = basicphysics ; Prim Storage ; if you would like to use sqlite uncomment the following line (and ; comment the NullStorage line) -; storage_plugin = "OpenSim.DataStore.MonoSqlite.dll" -storage_plugin = "OpenSim.DataStore.NullStorage.dll" +storage_plugin = "OpenSim.DataStore.MonoSqlite.dll" +;storage_plugin = "OpenSim.DataStore.NullStorage.dll" startup_console_commands_file = "startup_commands.txt" serverside_object_permissions = false diff --git a/bin/inventoryStore.db b/bin/inventoryStore.db index 070db2b0f9..d283ea1a97 100644 Binary files a/bin/inventoryStore.db and b/bin/inventoryStore.db differ