Skip to content

Log error when trading on the map #165

@krafs

Description

@krafs

Current Behavior

From Steam Workshop:


Thank you very much for this mod! I encountered a bug in 1.6 I wish to report.

Problem: Level Up will fail the trading item generation with a friendly settlement.
Reproduce step: With Level Up installed. Go trading with a nearby settlement. There will be red messages emitted.
Why it's Level Up: 1. Error message (below) 2. I've heard this from other people 3. I'm running a 1.6 game with 172 mods, by removing just this mod, the problem is solved.

Thank you so much and I really love this mod!

Expected Behavior

No log error

Steps To Reproduce

  1. Form caravan
  2. Enter settlement to trade/offer gifts
  3. See log error pop up

Mod version

5.1.0

Game version

1.6

Operating system

Windows 11

Files

Error message:
Exception while generating thing set: System.NullReferenceException: Object reference not set to an instance of an object
[Ref 4E4431FE]
at Verse.Pawn.get_CombinedDisabledWorkTags () [0x00013] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.SkillRecord.CalculateTotallyDisabled () [0x00000] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.SkillRecord.get_TotallyDisabled () [0x00009] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.SkillRecord.GetLevel (System.Boolean includeAptitudes) [0x00000] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.SkillRecord.get_Level () [0x00000] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at LevelUp.Patcher.Prefix (System.Int32& __state, RimWorld.SkillRecord __instance) [0x00000] in :0
at RimWorld.SkillRecord.DirtyAptitudes () [0x00006] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
- PREFIX krafs.levelup: Void LevelUp.Patcher:Prefix(Int32& __state, SkillRecord __instance)
- POSTFIX krafs.levelup: Void LevelUp.Patcher:DirtyAptitudesPostfix(Int32 __state, SkillRecord __instance, Pawn ___pawn)
at RimWorld.Pawn_SkillTracker.DirtyAptitudes () [0x00010] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.Pawn_GeneTracker.CheckForOverrides () [0x0013a] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.Pawn_GeneTracker.AddGene (Verse.Gene gene, System.Boolean addAsXenogene) [0x0003a] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.Pawn_GeneTracker.AddGene (Verse.GeneDef geneDef, System.Boolean xenogene) [0x00027] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.Pawn_GeneTracker.SetXenotype (RimWorld.XenotypeDef xenotype) [0x0004c] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.CompStatue.InitFakePawn () [0x0004a] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.CompStatue.InitializeAsFactionLeaderStatue () [0x00077] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.CompStatue.PostPostGeneratedForTrader (RimWorld.TraderKindDef trader, RimWorld.Planet.PlanetTile forTile, RimWorld.Faction forFaction) [0x00000] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at Verse.ThingWithComps.PostGeneratedForTrader (RimWorld.TraderKindDef trader, RimWorld.Planet.PlanetTile forTile, RimWorld.Faction forFaction) [0x00021] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at Verse.Building.PostGeneratedForTrader (RimWorld.TraderKindDef trader, RimWorld.Planet.PlanetTile forTile, RimWorld.Faction forFaction) [0x00000] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0
at RimWorld.ThingSetMaker_TraderStock.Generate (RimWorld.ThingSetMakerParams parms, System.Collections.Generic.List1[T] outThings) [0x000dc] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0 at RimWorld.ThingSetMaker.Generate (RimWorld.ThingSetMakerParams parms) [0x00019] in <2a8dc5d7ff9c41b68f23af52c5dcddcd>:0 UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch4 (string) RimWorld.ThingSetMaker:Generate (RimWorld.ThingSetMakerParams) RimWorld.Planet.Settlement_TraderTracker:RegenerateStock () RimWorld.Planet.Settlement_TraderTracker:get_StockListForReading () RimWorld.Planet.Settlement:get_Goods () RimWorld.TradeDeal:AddAllTradeables () RimWorld.TradeDeal:Reset () RimWorld.TradeDeal:.ctor () RimWorld.TradeSession:SetupWith (RimWorld.ITrader,Verse.Pawn,bool) RimWorld.Dialog_Trade:.ctor (Verse.Pawn,RimWorld.ITrader,bool) RimWorld.Planet.CaravanVisitUtility/<>c__DisplayClass2_0:<TradeCommand>b__0 () Verse.Command_Action:ProcessInput (UnityEngine.Event) Verse.GizmoGridDrawer:DrawGizmoGrid (System.Collections.Generic.IEnumerable1<Verse.Gizmo>,single,Verse.Gizmo&,System.Func2<Verse.Gizmo, bool>,System.Func2<Verse.Gizmo, bool>,System.Func2<Verse.Gizmo, bool>,bool) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.GizmoGridDrawer.DrawGizmoGridFor_Patch0 (System.Collections.Generic.IEnumerable1,Verse.Gizmo&)
RimWorld.Planet.WorldGizmoUtility:WorldUIOnGUI ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.WorldInterface.WorldInterfaceOnGUI_Patch1 (RimWorld.WorldInterface)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.UIRoot_Play.UIRootOnGUI_Patch2 (RimWorld.UIRoot_Play)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root.OnGUI_Patch1 (Verse.Root)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions