apkd / RimStarve

Mod for RimWorld.
http://steamcommunity.com/sharedfiles/filedetails/?id=824132570
Other
2 stars 0 forks source link

Seems to be an issue with the volt goats #1

Open AlkalineCube opened 7 years ago

AlkalineCube commented 7 years ago

Hello! You've made a lovely mod, but I think there's a problem with the goats. Had four of them, and it seems like they started throwing errors when they got fully charged. This is what came up in the error console:

System.NullReferenceException: Object reference not set to an instance of an object at RimWorld.CompStaticElectricity.CompTick () [0x00000] in :0 at Verse.ThingWithComps.Tick () [0x00007] in C:\Dev\RimWorld\Assets\Scripts\Verse\Thing\ThingWithComps.cs:190 at Verse.Pawn.Tick () [0x00022] in C:\Dev\RimWorld\Assets\Scripts\Verse\Pawn\Pawn.cs:391 at RimWorld.TradeShip.PassingShipTick () [0x00031] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\Trade\TradeShip.cs:96 at RimWorld.PassingShipManager.PassingShipManagerTick () [0x00013] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\Trade\PassingShipManager.cs:54 at Verse.Map.MapPostTick () [0x000ca] in C:\Dev\RimWorld\Assets\Scripts\Verse\Map\Map.cs:449 Verse.Log:Error(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:48) Verse.Map:MapPostTick() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Map\Map.cs:450) Verse.TickManager:DoSingleTick() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Game\Ticking\TickManager.cs:323) Verse.TickManager:TickManagerUpdate() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Game\Ticking\TickManager.cs:243) Verse.Game:Update() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Game\Game.cs:465) Verse.Root_Play:Update() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root_Play.cs:73)

I also have a screenshot if that helps.

apkd commented 7 years ago

Ah, null references. Thanks for letting me know - I'll go over the code as soon as I'm home.

apkd commented 7 years ago

Judging by some of the stack trace, the volt goats were actually on a trade ship.

at Verse.Pawn.Tick () [0x00022] in C:\Dev\RimWorld\Assets\Scripts\Verse\Pawn\Pawn.cs:391
at RimWorld.TradeShip.PassingShipTick () [0x00031] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\Trade\TradeShip.cs:96
at RimWorld.PassingShipManager.PassingShipManagerTick () [0x00013] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\Trade\PassingShipManager.cs:54
at Verse.Map.MapPostTick () [0x000ca] in C:\Dev\RimWorld\Assets\Scripts\Verse\Map\Map.cs:449

That would explain why they'd fail to update - I'm guessing the Pawn.Map object was null. I'll try to reproduce and get this fixed asap.

apkd commented 7 years ago

I've pushed a quick update with some additional checks. If you have a save file that gets this error, please let me know if that resolves the problem.