RW-NodeTree / RW_ModularizationWeapon

Apache License 2.0
2 stars 0 forks source link

Error and Freeze when starting a new world and trying to load the map #4

Closed TheLoneTec closed 6 months ago

TheLoneTec commented 1 year ago

Could not execute post-long-event action. Exception: System.NullReferenceException: Object reference not set to an instance of an object at (wrapper dynamic-method) Verse.MapDrawer.Verse.MapDrawer.SectionAt_Patch1(Verse.MapDrawer,Verse.IntVec3) at Verse.MapDrawer.MapMeshDirty (Verse.IntVec3 loc, Verse.MapMeshFlag dirtyFlags, System.Boolean regenAdjacentCells, System.Boolean regenAdjacentSections) [0x00009] in <95de19971c5d40878d8742747904cdcd>:0 at Verse.MapDrawer.MapMeshDirty (Verse.IntVec3 loc, Verse.MapMeshFlag dirtyFlags) [0x0000e] in <95de19971c5d40878d8742747904cdcd>:0 at Verse.Thing.DirtyMapMesh (Verse.Map map) [0x00027] in <95de19971c5d40878d8742747904cdcd>:0 at RW_NodeTree.CompChildNodeProccesser.ResetRenderedTexture () [0x0005c] in :0 at RW_NodeTree.CompChildNodeProccesser.ResetRenderedTexture () [0x0006c] in :0 at RW_NodeTree.NodeContainer.internal_UpdateNode (RW_NodeTree.CompChildNodeProccesser actionNode) [0x00451] in :0 at RW_NodeTree.NodeContainer.internal_UpdateNode (RW_NodeTree.CompChildNodeProccesser actionNode) [0x00345] in :0 at RW_NodeTree.NodeContainer.internal_UpdateNode (RW_NodeTree.CompChildNodeProccesser actionNode) [0x00031] in :0 at RW_NodeTree.CompChildNodeProccesser.UpdateNode () [0x0001a] in :0 at RW_ModularizationWeapon.CompModularizationWeapon.set_UsingTargetPart (System.Boolean value) [0x00021] in :0 at RW_ModularizationWeapon.CompModularizationWeapon.ApplyTargetPart (Verse.IntVec3 pos, Verse.Map map) [0x00164] in :0 at (wrapper dynamic-method) RW_ModularizationWeapon.CompModularizationWeapon.RW_ModularizationWeapon.CompModularizationWeapon.SetPartToRandom_Patch0(RW_ModularizationWeapon.CompModularizationWeapon) at Verse.LongEventHandler.ExecuteToExecuteWhenFinished () [0x0007c] in <95de19971c5d40878d8742747904cdcd>:0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

existing saves seem to load fine.

Cn-mjt44 commented 1 year ago

any other mod you used? look like some mod patch the map rendering.

TheLoneTec commented 1 year ago

So, this is actually the same issue as #5. It's just the map never loads if the scenario spawns with a modular weapon. The only way I loaded into a map, was to do a scenario without a modular weapon and then dev spawn one in which gives the error in issue #5. This happens with just vanilla rimworld and these mods as well.

TheLoneTec commented 1 year ago

also, to clarify im on Windows 10.

TheLoneTec commented 1 year ago

Ah, i may have found the issue. If you have rimworld using savedatafolder as anything other than the default, this error occurs. Even though in both the standard steam install and the one with a different savedatafolder, both were using the same workshop mods. But something must be screwing up the folder directory location. or perhaps due to the naming of the mod folder?

TheLoneTec commented 1 year ago

Ok, it seems definately related to folder naming and location. Manage to get it to load without error now by making sure everything is using the exact same name that is in the About.xml

TheLoneTec commented 10 months ago

Ok, it seems something else causes this too. If you spawn a temp map for a quest and there are Gibbit Cages and the bodies inside have WM weapons, it crashes when loading the map. Got the same error when this happens, but obviously its difficult to recreate as its a low chance.

TheLoneTec commented 10 months ago

though the error is slightly different it seems

Could not execute post-long-event action. Exception: System.NullReferenceException: Object reference not set to an instance of an object at (wrapper dynamic-method) Verse.MapDrawer.Verse.MapDrawer.SectionAt_Patch1(Verse.MapDrawer,Verse.IntVec3) at Verse.MapDrawer.MapMeshDirty (Verse.IntVec3 loc, Verse.MapMeshFlag dirtyFlags, System.Boolean regenAdjacentCells, System.Boolean regenAdjacentSections) [0x00009] in :0 at Verse.MapDrawer.MapMeshDirty (Verse.IntVec3 loc, Verse.MapMeshFlag dirtyFlags) [0x0000e] in :0 at Verse.Thing.DirtyMapMesh (Verse.Map map) [0x00027] in :0 at RW_NodeTree.CompChildNodeProccesser.ResetRenderedTexture () [0x0005c] in :0 at RW_NodeTree.NodeContainer.internal_UpdateNode (RW_NodeTree.CompChildNodeProccesser actionNode) [0x00451] in :0 at RW_NodeTree.NodeContainer.internal_UpdateNode (RW_NodeTree.CompChildNodeProccesser actionNode) [0x00031] in :0 at RW_NodeTree.CompChildNodeProccesser.UpdateNode () [0x0001a] in :0 at RW_ModularizationWeapon.CompModularizationWeapon.set_UsingTargetPart (System.Boolean value) [0x00021] in :0 at RW_ModularizationWeapon.CompModularizationWeapon.ApplyTargetPart (Verse.IntVec3 pos, Verse.Map map) [0x00164] in :0 at RW_ModularizationWeapon.CompModularizationWeapon.SetPartToDefault () [0x000f8] in :0 at Verse.LongEventHandler.ExecuteToExecuteWhenFinished () [0x0007c] in :0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Cn-mjt44 commented 8 months ago

I'm sorry for I don't watch this at once. It may beecaue rimworld section rendering. The weapon try to update section rendering state before the section init. I will fix that when I have free times.