ApacheTech-VintageStory-Mods / MinimalMapping

Limited mapping functionality for a more immersive world.
1 stars 0 forks source link

fix: crash on server start on heavily modded threaded server #9

Closed Zergmazter closed 1 month ago

Zergmazter commented 1 month ago

I have 75 mods and my game works properly. The moment I add minimal mapping my game crashes upon creating a new world in single player.

Running on 64 bit Windows 10.0.19045.0 with 16292 MB RAM Game Version: v1.19.8 (Stable) 9/23/2024 12:43:08 PM: Critical error occurred Loaded Mods: System.NullReferenceException: Object reference not set to an instance of an object. at Vintagestory.API.Util.ObjectCacheUtil.GetOrCreate[T](ICoreAPI api, String key, CreateCachableObjectDelegate`1 onRequireCreate) in VintagestoryApi\Util\ObjectCacheUtil.cs:line 30 at Toolworks.ItemCompositeTool.get_meshrefs() in /home/jon/prg/vs-toolworks/toolworks/src/Item/ItemCompositeTool.cs:line 249 at Toolworks.ItemCompositeTool.OnUnloaded(ICoreAPI api) in /home/jon/prg/vs-toolworks/toolworks/src/Item/ItemCompositeTool.cs:line 284 at Vintagestory.Client.NoObf.ClientMain.Dispose() in VintagestoryLib\Client\ClientMain.cs:line 2747 at Vintagestory.Client.NoObf.ClientMain.DestroyGameSession(Boolean gotDisconnected) in VintagestoryLib\Client\ClientMain.cs:line 2635 at Vintagestory.Client.GuiScreenConnectingToServer.onCancel() in VintagestoryLib\Client\MainMenu\Screens\GuiScreenConnectingToServer.cs:line 192 at Vintagestory.API.Client.GuiElementTextButton.OnMouseUpOnElement(ICoreClientAPI api, MouseEvent args) in VintagestoryApi\Client\UI\Elements\Impl\Interactive\Controls\GuiElementTextButton.cs:line 317 at Vintagestory.API.Client.GuiElementTextButton.OnMouseUp(ICoreClientAPI api, MouseEvent args) in VintagestoryApi\Client\UI\Elements\Impl\Interactive\Controls\GuiElementTextButton.cs:line 310 at Vintagestory.API.Client.GuiComposer.OnMouseUp(MouseEvent mouse) in VintagestoryApi\Client\UI\GuiComposer.cs:line 445 at GuiScreen.OnMouseUp(MouseEvent e) in VintagestoryLib\Client\MainMenu\Screens\Special\GuiScreen.cs:line 204 at Vintagestory.Client.ScreenManager.OnMouseUp(MouseEvent e) in VintagestoryLib\Client\ScreenManager.cs:line 890 at Vintagestory.Client.NoObf.ClientPlatformWindows.Mouse_ButtonUp(MouseButtonEventArgs e) in VintagestoryLib\Client\ClientPlatform\Input.cs:line 211 at OpenTK.Windowing.Desktop.NativeWindow.OnMouseUp(MouseButtonEventArgs e) at OpenTK.Windowing.Desktop.NativeWindow.MouseButtonCallback(Window* window, MouseButton button, InputAction action, KeyModifiers mods) --- End of stack trace from previous location --- at OpenTK.Windowing.Desktop.NativeWindow.RethrowCallbackExceptionsIfNeeded() at OpenTK.Windowing.Desktop.NativeWindow.ProcessWindowEvents(Boolean waitForEvents) at OpenTK.Windowing.Desktop.GameWindow.Run() at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 324 at Vintagestory.Client.ClientProgram.<>c__DisplayClass9_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 128 at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93

ApacheTech commented 1 month ago

Can you please load the game, make it crash, and then zip your entire Logs folder, and drag and drop into the comments here. I can then sift through, and see what's causing the issue. Thanks.

ApacheTech commented 1 month ago

From what I can see, that error report is nothing to do with my mod. It's an issue with Toolworks. That will need to be reported separately, to them. However, something in the logs will say why my mod is crashing the game.

Zergmazter commented 1 month ago

Logs.zip

Here you go!

Zergmazter commented 1 month ago

I will notify the other mod as well.

ApacheTech commented 1 month ago

Thank you.

If you can delete all your log files, and then try again with the new version 2.2.1.

I didn't realise that a method was being called on the client, and on the server. I thought it was client-side only. This has probably been an issue for a while. The fix in 2.2.1 should fix it.

Zergmazter commented 1 month ago

I get a crash still. I tried with toolworks and without it. Crash on both instances. Here are the logs: Crash without Toolworks.zip Crash with Toolworks.zip

ApacheTech commented 1 month ago

Ahh, sorry. I forgot there were two patches for that method. I fixed one of them. Releasing 2.2.2 now.

ApacheTech commented 1 month ago

Released now

Zergmazter commented 1 month ago

It worked! Thank you

ApacheTech commented 1 month ago

Excellent. If there's any other problems, re-open the ticket, and I'll sort it out.