h0tw1r3 / valheim-webmap

Live Valheim world map on the web! Server side only BepInEx mod.
MIT License
15 stars 5 forks source link

Crash when using v2.1.0 #1

Closed jacobmix closed 1 year ago

jacobmix commented 1 year ago

Been trying to make a server for Mistlands, but using old WebMap releases shows no map, and v2.1.0 seems to crash the server. Here's the error i get:

12/07/2022 14:35:58: Load world: Mistyventure (Mistyventure)
12/07/2022 14:35:58: Loading 19324 zdos , my id 2801510339 data version:29
12/07/2022 14:35:58: Loaded 569 dead zdos
12/07/2022 14:35:58: Removed 0 OLD generated ZDOS
12/07/2022 14:35:58: Loaded 10026 locations
WebMap: starting point (1.8, 33.6, 6.1)
12/07/2022 14:35:58: Exception while loading world C:/Users/JacobMIX/AppData/LocalLow/IronGate/Valheim/worlds_local/Mistyventure.db:System.NullReferenceException: Object reference not set to an instance of an object
  at WebMap.WebMap+ZoneSystemLoadPatch.Postfix () [0x0004e] in <03c74445e2884241813e77d9224a64d5>:0
  at (wrapper dynamic-method) ZoneSystem.DMD<ZoneSystem::Load>(ZoneSystem,System.IO.BinaryReader,int)
  at (wrapper dynamic-method) ZNet.DMD<ZNet::LoadWorld>(ZNet)
12/07/2022 14:35:58: World load failed mid-file. Exiting without save. Check backups!
[Info   :ServerSideMap] World .explored save path: C:/Users/JacobMIX/AppData/LocalLow/IronGate/Valheim/worlds_local/Mistyventure
[Info   :ServerSideMap] loaded from existing explore file
12/07/2022 14:35:58: World db couldn't load correctly, saving has been disabled to prevent .old file from being overwritten.
NullReferenceException: Object reference not set to an instance of an object
  at (wrapper dynamic-method) ZNet.DMD<ZNet::Start>(ZNet)

The shader Hidden/Dof/DepthOfFieldHdr (UnityEngine.Shader) on effect Main Camera (UnityStandardAssets.ImageEffects.DepthOfField) is not supported on this platform!
The image effect Main Camera (UnityStandardAssets.ImageEffects.DepthOfField) has been disabled as it's not supported on the current platform.
The shader Hidden/SunShaftsComposite (UnityEngine.Shader) on effect Main Camera (UnityStandardAssets.ImageEffects.SunShafts) is not supported on this platform!
The shader Hidden/SimpleClear (UnityEngine.Shader) on effect Main Camera (UnityStandardAssets.ImageEffects.SunShafts) is not supported on this platform!
The image effect Main Camera (UnityStandardAssets.ImageEffects.SunShafts) has been disabled as it's not supported on the current platform.
12/07/2022 14:35:58: Game server connected
12/07/2022 14:35:58: Game - OnApplicationQuit
12/07/2022 14:35:58: Shuting down
12/07/2022 14:35:58: ZNet Shutdown
12/07/2022 14:35:58: Skipping world save
12/07/2022 14:35:59: Sending disconnect msg
NullReferenceException: Object reference not set to an instance of an object
  at WebMap.WebMap+ZNetPatchShutdown.Postfix () [0x00000] in <03c74445e2884241813e77d9224a64d5>:0
  at (wrapper dynamic-method) ZNet.DMD<ZNet::Shutdown>(ZNet)
  at (wrapper dynamic-method) Game.DMD<Game::Shutdown>(Game)
  at Game.OnApplicationQuit () [0x00013] in <f9360778bc524f1593f8ab7fec1ab127>:0

Setting up 12 worker threads for Enlighten.
  Thread -> id: d868 -> priority: 1
  Thread -> id: e5d8 -> priority: 1
  Thread -> id: e434 -> priority: 1
  Thread -> id: e86c -> priority: 1
  Thread -> id: ebec -> priority: 1
  Thread -> id: d0d8 -> priority: 1
  Thread -> id: ae3c -> priority: 1
  Thread -> id: c994 -> priority: 1
  Thread -> id: d088 -> priority: 1
  Thread -> id: e648 -> priority: 1
  Thread -> id: 40e0 -> priority: 1
  Thread -> id: c624 -> priority: 1
12/07/2022 14:35:59: ZNet OnDestroy
12/07/2022 14:35:59: Net scene destroyed
12/07/2022 14:36:00: Steam manager on destroy
Compass Destroying plugin
ShowContainerContents Destroying plugin
SimpleSort Destroying plugin
NameYourTame UnPatched!
[Warning:  HarmonyX] UnpatchAll has been called - This will remove ALL HARMONY PATCHES.
InvalidProgramException: Invalid IL code in (wrapper dynamic-method) CreatureSpawner:DMD<CreatureSpawner::Spawn> (CreatureSpawner): IL_00ea: call      0x0000002d

  at (wrapper managed-to-native) System.RuntimeMethodHandle.GetFunctionPointer(intptr)
  at System.RuntimeMethodHandle.GetFunctionPointer () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.GetFunctionPointer (System.Reflection.MethodBase method, System.RuntimeMethodHandle handle) [0x00000] in <4e2760c7517c4ea79c633d67e84b319f>:0
  at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.GetNativeStart (System.Reflection.MethodBase method) [0x0004d] in <4e2760c7517c4ea79c633d67e84b319f>:0
  at MonoMod.RuntimeDetour.DetourHelper.GetNativeStart (System.Reflection.MethodBase method) [0x00005] in <4e2760c7517c4ea79c633d67e84b319f>:0
  at MonoMod.RuntimeDetour.Detour._RefreshChain (System.Reflection.MethodBase method) [0x000fb] in <4e2760c7517c4ea79c633d67e84b319f>:0
  at MonoMod.RuntimeDetour.Detour.Apply () [0x00053] in <4e2760c7517c4ea79c633d67e84b319f>:0
  at MonoMod.RuntimeDetour.Detour..ctor (System.Reflection.MethodBase from, System.Reflection.MethodBase to, MonoMod.RuntimeDetour.DetourConfig& config) [0x002e1] in <4e2760c7517c4ea79c633d67e84b319f>:0
  at (wrapper dynamic-method) MonoMod.RuntimeDetour.ILHook+Context.DMD<MonoMod.RuntimeDetour.ILHook+Context::Refresh>(MonoMod.RuntimeDetour.ILHook/Context)
  at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<MonoMod.RuntimeDetour.ILHook+Context::Refresh>?1722057728(object)
  at HarmonyLib.Internal.RuntimeFixes.StackTraceFixes.OnILChainRefresh (System.Object self) [0x00000] in <474744d65d8e460fa08cd5fd82b5d65f>:0
  at MonoMod.RuntimeDetour.ILHook.Apply () [0x00059] in <4e2760c7517c4ea79c633d67e84b319f>:0
  at HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) [0x00047] in <474744d65d8e460fa08cd5fd82b5d65f>:0
Rethrow as HarmonyException: IL Compile Error (unknown location)
  at HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) [0x0005f] in <474744d65d8e460fa08cd5fd82b5d65f>:0
  at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00033] in <474744d65d8e460fa08cd5fd82b5d65f>:0
Rethrow as HarmonyException: IL Compile Error (unknown location)
  at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x0005d] in <474744d65d8e460fa08cd5fd82b5d65f>:0
  at HarmonyLib.PatchProcessor.Unpatch (System.Reflection.MethodInfo patch) [0x0001f] in <474744d65d8e460fa08cd5fd82b5d65f>:0
  at HarmonyLib.PatchFunctions+<>c__DisplayClass5_0.<UnpatchConditional>b__0 (HarmonyLib.Patch patchInfo) [0x0000c] in <474744d65d8e460fa08cd5fd82b5d65f>:0
  at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <474744d65d8e460fa08cd5fd82b5d65f>:0
  at HarmonyLib.CollectionExtensions.DoIf[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Func`2[T,TResult] condition, System.Action`1[T] action) [0x00007] in <474744d65d8e460fa08cd5fd82b5d65f>:0
  at HarmonyLib.PatchFunctions.UnpatchConditional (System.Func`2[T,TResult] executionCondition) [0x00038] in <474744d65d8e460fa08cd5fd82b5d65f>:0
  at HarmonyLib.Harmony.UnpatchAll () [0x0002f] in <474744d65d8e460fa08cd5fd82b5d65f>:0
  at HarmonyLib.Harmony.UnpatchAll (System.String harmonyID) [0x00031] in <474744d65d8e460fa08cd5fd82b5d65f>:0
  at PaddlePower.PaddlePower.OnDestroy () [0x0000a] in <2051d66748e146ce89aa85f916179240>:0

I do have other mods as well, but WebMap-v2.1.0 is the only one that crashes the server. I know mods probably aren't all that stable yet for Mistland. But here's the modspack: https://cdn.discordapp.com/attachments/916429298158682123/1050045392013766739/Mods.r2z

h0tw1r3 commented 1 year ago

I will update my server and test it out tonight. Thanks for the report.

h0tw1r3 commented 1 year ago

@jacobmix should be addressed in release v2.5.0

jacobmix commented 1 year ago

Seems to work now. Was only able to test quickly. Map, and players show up. But pins don't seem to show up on the map. Does the clients need the plugin for that? ~~Don't see a setting to just upload pins, and not host a map so i wouldn't expect to. Could honestly be any of my other mods that mess with pins tho.~~ Nevermind. I see pins are chat commands only. Would be cool to see all pins, but makes sense. Couldn't join the server when installed on the client as well anyway. So gonna just split the modpack. Thanks for quick fix, and work overall on this. Gonna be cool to check the map in the browser any time. Even when not playing.

h0tw1r3 commented 1 year ago

Couldn't join the server when installed on the client as well anyway. So gonna just split the modpack.

I noticed the same thing. Although it only supports a dedicated server, I will try to fix the crash for the next release.