pz-mapmap
pz-mapmap copied to clipboard
Unable to run
Unhandled Exception: System.MissingMethodException: Method not found: 'System.String[] System.String.Split(Char, System.StringSplitOptions)'.
at MapMapLib.MMPlotter.PlotData(MMCellData cellData, String outputDir, Int32 cellx, Int32 celly)
at MapMap.Main.RunPlotter(MMPlotter childPlotter, MMCellData childMapData, String OutputDir, Int32 childCellX, Int32 childCellY)
at MapMap.Main.<parseMapData>c__AnonStorey0.<>m__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Could you be any less specific about your environment? What OS? What version of the C# runtime? Mono? How'd you call the program to reach this error? Did you try the debug build? What was the output there?
Called it with MapMap.exe -gfxsource TexturePacks\Erosion.pack -gfxsource TexturePacks\Tiles2x.pack -gfxsource TexturePacks\Tiles2x.floor.pack -gfxsource TexturePacks\ApCom.pack -gfxsource texturepacks\RadioIcons.pack -gfxsource TexturePacks\ApComUI.pack -mapsource li_township -output li_output\ -dolayers true -divider 4 -maxthreads 2
Tried it with Windows 10 and with the Linux subsystem. Tried all .NET runtimes, even the latest preview build. And then mono with mono-complete which includes 2.0 and 4.0, I believe.
Any update on this? I have the exact same issue. My setup is identical to BlueDevil
I honestly don't remember which version I compiled the release against, but you should be able to compile it yourself and run it. git clone the source, install mono-complete and automake, then just run 'make'.
I was able to reproduce the same unhandled exception and resolve the initial issue without recompiling. I was able to consistently receive the same error if I was not properly feeding mono the MapMap.exe. I am running on Windows 10, using the 64bit Mono installer. I provided absolute paths to my install location. The installed version of mono is 6.12.0. I do have linux subsystems installed, but I did not touch them to resolve the problem.
From the mono directory, this below command was successful for me, replacing E:\MapMap with your paths or fix the relative paths. I additionally encountered out-of-memory conditions if the 32bit version of mono was used as well, so that installer should be avoided.
C:\Program Files\Mono\bin>mono.exe E:\MapMap\MapMap.exe -gfxsource E:\MapMap\TexturePacks\Erosion.pack -gfxsource E:\MapMap\TexturePacks\Tiles2x.pack -gfxsource E:\MapMap\TexturePacks\Tiles2x.floor.pack -gfxsource E:\MapMap\TexturePacks\ApCom.pack -gfxsource E:\MapMap\texturepacks\RadioIcons.pack -gfxsource E:\MapMap\TexturePacks\ApComUI.pack -mapsource E:\MapMap\Mapname_lotpack -output E:\MapMap\Mapname_output\ -dolayers true -divider 4 -maxthreads 2
@msarte That is great news, thank you! @BlueDevil @BradFitz66 Does that work for you as well?
Also, 32 bit in 2021? What reason would there be for that today?
None whatsoever - however since I was already troubleshooting the same issue I tested a few other things. For good measure, I started with a fresh install for 32bit, hit the memory alloc issue, then went to 64bit. A lot of the documents I've run into talk about mono running in Program Files (x86), which would imply the 32 bit version.
Your response didn't give much guidance other than recompile, so I started from zero on mono and caught two potential issues people could hit.
Edit: Here are the memory allocation issues a user might find if they try something like running with 32-bit mono. Just appending if anyone searches this thread. System memory is not the limiting factor in my configuration so these numbers should indicate application-level requirements observed at the time of writing.
For reference: when running it in 64bit mono, it's observed the application consumed 4-6GB of memory per thread. It should be expected with the default settings you'll need 10-12GB of RAM to run this process. Additionally, the result with the current map is about 400GB of disk space.
These conditions should be obvious but just to save anyone sitting at this step.
If running with -dolayers false, you'll likely error out here on the 32bit version:
Boundaries: minx -99999 maxx 99999 miny -99999 maxy 99999
Threads: 2
Starting programm...
Reading texture data from: Erosion.pack
Sheet count: 5
Reading texture data from: Tiles2x.pack
Sheet count: 116
Reading texture data from: Tiles2x.floor.pack
Sheet count: 4
Reading texture data from: ApCom.pack
Sheet count: 1
Reading texture data from: RadioIcons.pack
Sheet count: 1
Reading texture data from: ApComUI.pack
Sheet count: 1
Working on cell: 10 - 16
* Assertion at ..\mono\utils\lock-free-alloc.c:145, condition `sb_header' not met, function:alloc_sb, Failed to allocate memory for the lock free allocator
If running with -dolayers true, or increasing the thread count, you'll likely error out here on the 32bit version(this error is much more obvious):
Boundaries: minx -99999 maxx 99999 miny -99999 maxy 99999
Threads: 2
Starting programm...
Reading texture data from: Erosion.pack
Sheet count: 5
Reading texture data from: Tiles2x.pack
Sheet count: 116
Reading texture data from: Tiles2x.floor.pack
Sheet count: 4
Reading texture data from: ApCom.pack
Sheet count: 1
Reading texture data from: RadioIcons.pack
Sheet count: 1
Reading texture data from: ApComUI.pack
Sheet count: 1
Working on cell: 10 - 16
Unhandled Exception:
OutOfMemoryException
[ERROR] FATAL UNHANDLED EXCEPTION: System.OutOfMemoryException: Out of memory
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_array_new_3(intptr,intptr,intptr,intptr)
at MapMapLib.MMCellData..ctor () [0x00006] in <36cf778331e542fdb1e14be4e7371385>:0
at MapMapLib.MMCellReader.Read (System.String datafile, System.String headerfile) [0x00000] in <36cf778331e542fdb1e14be4e7371385>:0
at MapMap.Main.parseMapData () [0x00163] in <36cf778331e542fdb1e14be4e7371385>:0
at MapMap.Main.Run (System.String[] args) [0x0002e] in <36cf778331e542fdb1e14be4e7371385>:0
at MapMap.Program.Main (System.String[] args) [0x00006] in <36cf778331e542fdb1e14be4e7371385>:0
Unhandled Exception: System.MissingMethodException: Method not found: 'System.String[] System.String.Split(Char, System.StringSplitOptions)'. at MapMapLib.MMPlotter.PlotData(MMCellData cellData, String outputDir, Int32 cellx, Int32 celly) at MapMap.Main.RunPlotter(MMPlotter childPlotter, MMCellData childMapData, String OutputDir, Int32 childCellX, Int32 childCellY) at MapMap.Main.<parseMapData>c__AnonStorey0.<>m__0() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
I'm still having this issue with the latest release version. Windows 10.
Unhandled Exception: System.MissingMethodException: Method not found: 'System.String[] System.String.Split(Char, System.StringSplitOptions)'. at MapMapLib.MMPlotter.PlotData(MMCellData cellData, String outputDir, Int32 cellx, Int32 celly) at MapMap.Main.RunPlotter(MMPlotter childPlotter, MMCellData childMapData, String OutputDir, Int32 childCellX, Int32 childCellY) at MapMap.Main.<parseMapData>c__AnonStorey0.<>m__0() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
I'm still having this issue with the latest release version. Windows 10.
+1. Self-compiling and running throws an "out of memory" exception. Win10x64 - 16G ddr4 @3200