[A16] Can't figure out reason for drawing exception

Started by general222291, January 03, 2017, 12:25:09 PM

Previous topic - Next topic

general222291

Hi,

While trying to update my mod to Alpha 16, I encountered an error that fills the debug log whenever I view a pawn added by the mod. The full exception is:
Exception drawing WanderingMuffalo34626: System.NullReferenceException: Object reference not set to an instance of an object
  at Verse.PawnRenderer.RenderPawnInternal (Vector3 rootLoc, Quaternion quat, Boolean renderBody, Rot4 bodyFacing, Rot4 headFacing, RotDrawMode bodyDrawType, Boolean portrait) [0x00000] in <filename unknown>:0
  at Verse.PawnRenderer.RenderPawnInternal (Vector3 rootLoc, Quaternion quat, Boolean renderBody, RotDrawMode draw) [0x00000] in <filename unknown>:0
  at Verse.PawnRenderer.RenderPawnAt (Vector3 drawLoc, RotDrawMode bodyDrawType) [0x00000] in <filename unknown>:0
  at Verse.Pawn_DrawTracker.DrawAt (Vector3 loc) [0x00000] in <filename unknown>:0
  at Verse.Pawn.DrawAt (Vector3 drawLoc) [0x00000] in <filename unknown>:0
  at Verse.Thing.Draw () [0x00000] in <filename unknown>:0
  at Verse.ThingWithComps.Draw () [0x00000] in <filename unknown>:0
  at Verse.DynamicDrawManager.DrawDynamicThings () [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.DynamicDrawManager:DrawDynamicThings()
Verse.Map:MapUpdate()
Verse.Game:Update()
Verse.Root_Play:Update()


I have spent a fair amount of time reading my XML over again and again, comparing it to other pawn adding mods and the vanilla pawns. My XML seems to have no errors and my texture file paths are what they should be. If anyone has encountered this issue and/or has a fix, please let me know. The mod files are:

https://www.dropbox.com/s/m6ddq1573z2l9rf/WanderingCaravans.rar?dl=0

Thanks
Mods:
Wandering Caravans [A15]

Thirite

The engine is trying to reference something that doesn't exist. By the looks of the log it's trying to draw a Muffalo and not getting a variable it needs. Since this is in the draw function I suspect it has something to do with the pack bags for Muffalo added in A16.

But it would help if you explained what your mod does.

general222291

Quote from: Thirite on January 03, 2017, 05:30:12 PM
The engine is trying to reference something that doesn't exist. By the looks of the log it's trying to draw a Muffalo and not getting a variable it needs. Since this is in the draw function I suspect it has something to do with the pack bags for Muffalo added in A16.

But it would help if you explained what your mod does.

Thanks for the reply,
I made my mod in A15 and it adds Muffalo's and Dromedary's with bags that carry a randomly generated inventory (which I call 'Wandering Caravans') when they spawn in. It is a coincidence that A16 added similar Muffalo's and Dromedary's. I don't see anything in my XML that relates  my Wandering Caravan's to the games vanilla caravans, so I am genuinely clueless to what the issue is.
Mods:
Wandering Caravans [A15]