SmashPhil / Vehicle-Framework

Core mod for Vehicles
Other
55 stars 27 forks source link

Mod incompatibility with Camera+, designations and plans no longer rendered after Vehicle Framework update #181

Closed Urwumpe closed 2 months ago

Urwumpe commented 2 months ago

Describe the bug All designations of items (Hauling, Deconstruction, Harvest, Switch) or planned construction (Vanilla and of Planning Extended) is no longer rendered after the "Roads" update, debug log shows lots of ArgumentNullExceptions in the rendering process. Buildings under construction is not influenced, same for Map Overlays.

Its likely a mod incompatibility, I had started a heavily modded MIM Warhammer 40K game a week ago and played daily (and wanted to continue for some time), after combing my mod list, I singled out Camera+ as the mod that conflicts with VF.

To Reproduce Just auto-update Vehicle Framework, all other active mods were unchanged since yesterday (Friday)

Any combination of Camera+ and Vehicle Framework is enough to trigger the behaviour.

Screenshots

If applicable, add screenshots to help explain your problem.

grafik

Additional context

Root level exception in Update(): System.ArgumentNullException: Value cannot be null.
Parameter name: shader
[Ref AD9A9AB7] Duplicate stacktrace, see ref for original
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch3 (string)
Verse.Root_Play:Update ()

During startup on the game, there is also this error:

Exception from long event: System.NullReferenceException: Object reference not set to an instance of an object
[Ref 56DE8045]
 at CameraPlus.Assets.LoadAssetBundle () [0x0003b] in <eef7e1c02fd84ab1aadbf4c0feb80232>:0 
 at Verse.UIRoot_Entry.Init () [0x00095] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
     - POSTFIX net.pardeike.rimworld.mod.camera+: Void CameraPlus.Assets:LoadAssetBundle()
     - POSTFIX SmashPhil.SmashTools: Void SmashTools.UnitTesting:ExecuteOnStartupTesting()
     - POSTFIX smashphil.updatelog: Void UpdateLogTool.UpdateHandler:UpdateOnStartup()
 at Verse.Root.<Start>b__6_0 () [0x0004a] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
 at Verse.LongEventHandler.UpdateCurrentSynchronousEvent (System.Boolean& sceneChanged) [0x0001d] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.LongEventHandler:UpdateCurrentSynchronousEvent (bool&)
Verse.LongEventHandler:LongEventsUpdate (bool&)
Verse.Root:Update ()
Verse.Root_Entry:Update ()

It looks like there is a collision already between your unit testing code and Camera+.

Also, this error message appears right after starting the game:

Root level exception in Update(): System.ArgumentNullException: Value cannot be null.
Parameter name: shader
[Ref 40DFBAD]
 at (wrapper managed-to-native) UnityEngine.Material.CreateWithShader(UnityEngine.Material,UnityEngine.Shader)
 at <0x241143e8280 + 0x00022> <unknown method>
 at Verse.MaterialAllocator.Create (UnityEngine.Shader shader) [0x00013] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
 at CameraPlus.MarkerCache.MaterialFor (Verse.Pawn pawn) [0x00050] in <eef7e1c02fd84ab1aadbf4c0feb80232>:0 
 at CameraPlus.DotDrawer.DrawDots (Verse.Map map) [0x0009e] in <eef7e1c02fd84ab1aadbf4c0feb80232>:0 
 at CameraPlus.DynamicDrawManager_DrawDynamicThings_Patch.Postfix () [0x00010] in <eef7e1c02fd84ab1aadbf4c0feb80232>:0 
 at Verse.DynamicDrawManager.DrawDynamicThings () [0x00217] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
     - POSTFIX net.pardeike.rimworld.mod.camera+: Void CameraPlus.DynamicDrawManager_DrawDynamicThings_Patch:Postfix()
 at Verse.Map.MapUpdate () [0x000c6] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
 at Verse.Game.UpdatePlay () [0x00066] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
     - POSTFIX net.pardeike.rimworld.mod.camera+: Void CameraPlus.Game_UpdatePlay_Patch:Postfix()
 at Verse.Root_Play.Update () [0x00032] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.Root_Play:Update ()
Urwumpe commented 2 months ago

Updated the bug report, found the minimum bad combination to reproduce the bug (earlier than I expected).

The hotfix solution is likely to mark Camera+ as incompatible to Vehicle Framework, though the question remains, what change you did in Vehicle Framework that triggered the bug, after all, it used to work just fine before.

Linnun commented 2 months ago

Just as info, Camera+ is a fairly incompatible mod in general. Consider replacing it with SimpleCameraSetting, it does (almost?) all the same stuff in a way more compatible method.

Urwumpe commented 2 months ago

I will give it a try, right now I simply removed Camera+ from my save so I can play on. Long ago since I had any big issues with it, so I kept it on my favorite mod list after Rimworld 1.3.

Anyway if the solution should be to not use Camera+ and Vehicle Framework, it should get marked as incompatible in About.xml

fireboomdead commented 2 months ago

same

SmashPhil commented 2 months ago

Update your mod, this was fixed in a hotfix last night (v1.5.1701)