Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005971opensim[REGION] Scripting Enginepublic2012-04-18 10:572013-01-24 19:31
ReporterRobert Adams 
Assigned Tocmickeyb 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target Versionmaster (dev code)Fixed in Version 
Summary0005971: Runtime crash loading JsonStore script modules on Windows7
DescriptionTrying to run the latest master on Windows 7 using Visual Studio 2010 generates a crash. It looks to be in some script building magic.

See the stack trace below.

MS documentation says that Expression.GetFuncType() takes one to five arguments. Maybe Mono doesn't have the restriction of 5?
Steps To ReproducePull latest master (Apr 18, 2012: c85f9d681a7e9cb09e8cf4de97643eadc7a9d4d8)
With Windows7, Visual Studio 2010
Build and run system and get crash and stack trace:
Console log level is ALL
10:33:50 - [LIBRARY MODULE]: No local library service. Module will be disabled.
10:33:53 - [APPLICATION]:

Unhandled Exception: System.ArgumentException: An incorrect number of type args were specified for the declaration of a
Func type.
   at System.Linq.Expressions.Expression.GetFuncType(Type[] typeArgs)
   at OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.RegisterScriptInvocation(Object
 target, MethodInfo mi) in c:\cygwin\home\radams1\bld\OpenSim\Region\OptionalModules\Scripting\ScriptModuleComms\ScriptM
oduleCommsModule.cs:line 166
   at OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.RegisterScriptInvocation(Object
 target, String meth) in c:\cygwin\home\radams1\bld\OpenSim\Region\OptionalModules\Scripting\ScriptModuleComms\ScriptMod
uleCommsModule.cs:line 141
   at OpenSim.Region.OptionalModules.Scripting.JsonStore.JsonStoreScriptModule.RegionLoaded(Scene scene) in c:\cygwin\home\radams1\bld\OpenSim\Region\OptionalModules\Scripting\JsonStore\JsonStoreScriptModule.cs:line 169
   at OpenSim.ApplicationPlugins.RegionModulesController.RegionModulesControllerPlugin.AddRegionToModules(Scene scene) in c:\cygwin\home\radams1\bld\OpenSim\ApplicationPlugins\RegionModulesController\RegionModulesControllerPlugin.cs:line 461
   at OpenSim.OpenSimBase.CreateRegion(RegionInfo regionInfo, Boolean portadd_flag, Boolean do_post_init, IScene& mscene) in c:\cygwin\home\radams1\bld\OpenSim\Region\Application\OpenSimBase.cs:line 378
   at OpenSim.OpenSimBase.CreateRegion(RegionInfo regionInfo, Boolean portadd_flag, IScene& scene) in c:\cygwin\home\radams1\bld\OpenSim\Region\Application\OpenSimBase.cs:line 317
   at OpenSim.ApplicationPlugins.LoadRegions.LoadRegionsPlugin.PostInitialise() in c:\cygwin\home\radams1\bld\OpenSim\ApplicationPlugins\LoadRegions\LoadRegionsPlugin.cs:line 126
   at OpenSim.OpenSimBase.StartupSpecific() in c:\cygwin\home\radams1\bld\OpenSim\Region\Application\OpenSimBase.cs:line 234
   at OpenSim.OpenSim.StartupSpecific() in c:\cygwin\home\radams1\bld\OpenSim\Region\Application\OpenSim.cs:line 172
   at OpenSim.Framework.Servers.BaseOpenSimServer.Startup() in c:\cygwin\home\radams1\bld\OpenSim\Framework\Servers\BaseOpenSimServer.cs:line 319
   at OpenSim.Application.Main(String[] args) in c:\cygwin\home\radams1\bld\OpenSim\Region\Application\Application.cs:li
ne 272
TagsNo tags attached.
Git Revision or version numberc85f9d681a7e9cb09e8cf4de97643eadc7a9d4d8
Run Mode Grid (1 Region per Sim)
Physics EngineODE
Environment.NET / Windows64
Mono VersionNone
Attached Files

- Relationships

-  Notes
Robert Adams (administrator)
2012-04-18 11:01

I believe the JsonStore module needs to be enabled to make this happen.
cmickeyb (administrator)
2012-04-18 12:01

Robert... could you check the framework you are building for? After discussions with Melanie... you should be able to get far more params. See [^]
Robert Adams (administrator)
2012-04-18 13:35

I see that the limit for parameters for GetFuncType is 5 for .NET 3.5 and 17 for .NET 4.0. I have set the usual 3.5 compatibility. I guess that means that to run JsonStore, one must be using .NET 4.0.
cmickeyb (administrator)
2012-04-25 09:57

try/catch added to address the crash in commit bec100a66
SignpostMarv (reporter)
2012-07-18 03:29

Ran into this issue with my own module.
cmickeyb (administrator)
2012-07-18 08:46

SignpostMarv: I assume you are compiling on windows if you are seeing this problem. Later versions of mono do not have the limitation. If you can compile with .NET 4 everything seems to work. Its a bit of a pain to change the prebuild files to make that happen. Otherwise, there is no known workaround for the limited parameters.

- Issue History
Date Modified Username Field Change
2012-04-18 10:57 Robert Adams New Issue
2012-04-18 11:01 Robert Adams Note Added: 0021265
2012-04-18 12:01 cmickeyb Note Added: 0021266
2012-04-18 13:35 Robert Adams Note Added: 0021267
2012-04-25 09:48 cmickeyb Assigned To => cmickeyb
2012-04-25 09:48 cmickeyb Status new => assigned
2012-04-25 09:57 cmickeyb Note Added: 0021305
2012-07-18 03:29 SignpostMarv Note Added: 0021812
2012-07-18 08:46 cmickeyb Note Added: 0021815

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker