RW-NodeTree / RW_ModularizationWeapon

Apache License 2.0
2 stars 0 forks source link

Weapons not loading on previous save #7

Open FishCells opened 3 months ago

FishCells commented 3 months ago

After last nights update on April 26th, 2024 I loaded up a save and all weapons with attachments were not working properly. They are missing their attachment information on the weapons information page. Logs are spammed with the message below

System.NullReferenceException: Object reference not set to an instance of an object
  at RW_ModularizationWeapon.CompModularizationWeapon.get_AttachmentProperties () [0x0008b] in <ac95a7763fcf48e89a1e752751fbb8e3>:0 
  at RW_ModularizationWeapon.CompModularizationWeapon.WeaponAttachmentPropertiesById (System.String id) [0x00008] in <ac95a7763fcf48e89a1e752751fbb8e3>:0 
  at RW_ModularizationWeapon.CompModularizationWeapon.GetStatMultiplier (RimWorld.StatDef statDef, Verse.Thing part) [0x000e3] in <ac95a7763fcf48e89a1e752751fbb8e3>:0 
  at RW_ModularizationWeapon.CompModularizationWeapon.FinalStatWorker_FinalizeValue (RimWorld.StatWorker statWorker, RimWorld.StatRequest req, System.Boolean applyFinalProcess, System.Single result, System.Collections.Generic.Dictionary`2[TKey,TValue] stats, System.Exception exception) [0x0016b] in <ac95a7763fcf48e89a1e752751fbb8e3>:0 
  at RW_NodeTree.CompBasicNodeComp.internal_FinalStatWorker_FinalizeValue (RimWorld.StatWorker statWorker, RimWorld.StatRequest req, System.Boolean applyPostProcess, System.Single result, System.Collections.Generic.Dictionary`2[TKey,TValue] stats, System.Exception exception) [0x00000] in <686b507bf87b42fdbd6272a7e6706f89>:0 
  at RW_NodeTree.CompChildNodeProccesser.FinalStatWorker_FinalizeValue (RimWorld.StatWorker statWorker, RimWorld.StatRequest req, System.Boolean applyPostProcess, System.Single result, System.Collections.Generic.Dictionary`2[TKey,TValue] stats, System.Exception exception) [0x00015] in <686b507bf87b42fdbd6272a7e6706f89>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch4 (string)
RW_NodeTree.CompChildNodeProccesser:FinalStatWorker_FinalizeValue (RimWorld.StatWorker,RimWorld.StatRequest,bool,single,System.Collections.Generic.Dictionary`2<string, object>,System.Exception)
RW_NodeTree.Patch.StatWorker_Patcher:FinalStatWorker_FinalizeValue (RimWorld.StatWorker,RimWorld.StatRequest,bool,single&,System.ValueTuple`2<System.Collections.Generic.Dictionary`2<string, object>, RW_NodeTree.CompChildNodeProccesser>,System.Exception)
(wrapper dynamic-method) RimWorld.StatWorker:RimWorld.StatWorker.FinalizeValue_Patch3 (RimWorld.StatWorker,RimWorld.StatRequest,single&,bool)
(wrapper dynamic-method) RimWorld.StatWorker:RimWorld.StatWorker.GetValue_Patch0 (RimWorld.StatWorker,RimWorld.StatRequest,bool)
RimWorld.StatWorker:GetValue (Verse.Thing,bool,int)
RimWorld.StatExtension:GetStatValue (Verse.Thing,RimWorld.StatDef,bool,int)
Verse.Thing:get_MaxHitPoints ()
RimWorld.GenLabel:ThingLabel (Verse.Thing,int,bool,bool)
Verse.Thing:get_LabelNoCount ()
Verse.ThingWithComps:get_LabelNoCount ()
Verse.Thing:get_Label ()
Verse.Thing:get_LabelCap ()
RimWorld.InspectPaneUtility:AdjustedLabelFor (System.Collections.Generic.List`1<object>,UnityEngine.Rect)
RimWorld.MainTabWindow_Inspect:GetLabel (UnityEngine.Rect)
RimWorld.InspectPaneUtility:InspectPaneOnGUI (UnityEngine.Rect,RimWorld.IInspectPane)
RimWorld.MainTabWindow_Inspect:DoWindowContents (UnityEngine.Rect)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)
Cn-mjt44 commented 3 months ago

Fixed.

FishCells commented 3 months ago

Hi, thanks for the quick response.

I wasn't sure if I should open a new ticket or just keep this one going but i am still seeing these errors on the previous save, but they are only on load and are not spamming any more.

System.NullReferenceException: Object reference not set to an instance of an object
  at RW_ModularizationWeapon.CompModularizationWeapon.CheckTargetVaild (System.Boolean deSpawn) [0x00029] in <089a8cbd829f43769aac10dd223a0dfe>:0 
  at RW_ModularizationWeapon.CompModularizationWeapon.PreUpdateNode (RW_NodeTree.CompChildNodeProccesser actionNode, System.Collections.Generic.Dictionary`2[TKey,TValue] cachedDataToPostUpatde, System.Collections.Generic.Dictionary`2[TKey,TValue] prveChilds) [0x00059] in <089a8cbd829f43769aac10dd223a0dfe>:0 
  at RW_NodeTree.CompBasicNodeComp.internal_PreUpdateNode (RW_NodeTree.CompChildNodeProccesser actionNode, System.Collections.Generic.Dictionary`2[TKey,TValue] cachedDataToPostUpatde, System.Collections.Generic.Dictionary`2[TKey,TValue] prveChilds) [0x00000] in <686b507bf87b42fdbd6272a7e6706f89>:0 
  at RW_NodeTree.NodeContainer.internal_UpdateNode (RW_NodeTree.CompChildNodeProccesser actionNode) [0x000cb] in <686b507bf87b42fdbd6272a7e6706f89>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch4 (string)
RW_NodeTree.NodeContainer:internal_UpdateNode (RW_NodeTree.CompChildNodeProccesser)
RW_NodeTree.NodeContainer:internal_UpdateNode (RW_NodeTree.CompChildNodeProccesser)
RW_NodeTree.CompChildNodeProccesser:UpdateNode ()
RW_NodeTree.Patch.VerbTracker_Patcher:PreVerbTracker_AllVerbs (Verse.VerbTracker,RW_NodeTree.CompChildNodeProccesser&)
(wrapper dynamic-method) Verse.VerbTracker:Verse.VerbTracker.get_AllVerbs_Patch2 (Verse.VerbTracker)
RW_NodeTree.CompChildNodeProccesser:GetOriginalAllVerbs (Verse.VerbTracker)
RW_NodeTree.Patch.VerbTracker_Patcher:PreVerbTracker_ExposeData (Verse.VerbTracker,System.Collections.Generic.List`1<Verse.Verb>&)
(wrapper dynamic-method) Verse.VerbTracker:Verse.VerbTracker.ExposeData_Patch2 (Verse.VerbTracker)
Verse.CrossRefHandler:ResolveAllCrossReferences ()
(wrapper dynamic-method) Verse.ScribeLoader:Verse.ScribeLoader.FinalizeLoading_Patch1 (Verse.ScribeLoader)
(wrapper dynamic-method) Verse.Game:Verse.Game.LoadGame_Patch8 (Verse.Game)
(wrapper dynamic-method) Verse.SavedGameLoaderNow:Verse.SavedGameLoaderNow.LoadGameFromSaveFileNow_Patch1 (string)
Verse.Root_Play/<>c:<Start>b__1_1 ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()

and this one might be related to a mod conflict, but I'll post it just in case.

Could not get load ID. We're asking for something which was never added during LoadingVars. pathRelToParent=/selestedWeapon, parent=TableMachining6206505
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch4 (string)
Verse.LoadIDsWantedBank:Take<Verse.Thing> (string,Verse.IExposable)
Verse.CrossRefHandler:TakeResolvedRef<Verse.Thing> (string,Verse.IExposable)
Verse.CrossRefHandler:TakeResolvedRef<Verse.Thing> (string)
Verse.Scribe_References:Look<Verse.Thing> (Verse.Thing&,string,bool)
RW_ModularizationWeapon.CompCustomWeaponPort:PostExposeData ()
(wrapper dynamic-method) Verse.ThingWithComps:Verse.ThingWithComps.ExposeData_Patch1 (Verse.ThingWithComps)
Verse.Building:ExposeData ()
RimWorld.Building_WorkTable:ExposeData ()
SK.Building_WorkTableGraphicOn:ExposeData ()
Verse.CrossRefHandler:ResolveAllCrossReferences ()
(wrapper dynamic-method) Verse.ScribeLoader:Verse.ScribeLoader.FinalizeLoading_Patch1 (Verse.ScribeLoader)
(wrapper dynamic-method) Verse.Game:Verse.Game.LoadGame_Patch8 (Verse.Game)
(wrapper dynamic-method) Verse.SavedGameLoaderNow:Verse.SavedGameLoaderNow.LoadGameFromSaveFileNow_Patch1 (string)
Verse.Root_Play/<>c:<Start>b__1_1 ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()
Cn-mjt44 commented 1 week ago

@FishCells Does it still happend?