From 1bed3aff0b21102f04481b2345a0d804c2e5716c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 26 Jan 2015 23:16:06 +0000 Subject: On a multi-region simulator when AppDomain = true, make sure the DLL from the appropriate script engines subdir is loaded rather than always that of the first engine to load the DLL. This resolves a DLL load failure on my Linux box when an attachment script was present on another region before the avatar arrived. --- OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index 52a34a6..af324bf 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs @@ -291,7 +291,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools string source, string asset, UUID ownerUUID, bool alwaysRecompile, out string assembly, out Dictionary, KeyValuePair> linemap) { -// m_log.DebugFormat("[Compiler]: Compiling script\n{0}", Script); +// m_log.DebugFormat("[Compiler]: Checking script for asset {0} in {1}\n{2}", asset, m_scriptEngine.World.Name, source); IScriptModuleComms comms = m_scriptEngine.World.RequestModuleInterface(); @@ -300,12 +300,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools assembly = GetCompilerOutput(asset); +// m_log.DebugFormat("[Compiler]: Retrieved assembly {0} for asset {1} in {2}", assembly, asset, m_scriptEngine.World.Name); + CheckOrCreateScriptsDirectory(); // Don't recompile if we're not forced to and we already have it // Performing 3 file exists tests for every script can still be slow if (!alwaysRecompile && File.Exists(assembly) && File.Exists(assembly + ".text") && File.Exists(assembly + ".map")) { +// m_log.DebugFormat("[Compiler]: Found existing assembly {0} for asset {1} in {2}", assembly, asset, m_scriptEngine.World.Name); + // If we have already read this linemap file, then it will be in our dictionary. // Don't build another copy of the dictionary (saves memory) and certainly // don't keep reading the same file from disk multiple times. @@ -315,6 +319,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools return; } +// m_log.DebugFormat("[Compiler]: Compiling assembly {0} for asset {1} in {2}", assembly, asset, m_scriptEngine.World.Name); + if (source == String.Empty) throw new Exception("Cannot find script assembly and no script text present"); -- cgit v1.1