[Solved] A10c NPE in GetPosture After Assigning Mod-Added Job?

Started by Famous Shoes, April 18, 2015, 07:21:17 PM

Previous topic - Next topic

Famous Shoes

Anyone come across this yet in A10c after a pawn is given a job to do, one which worked under A9?

Exception drawing Harrison: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.PawnUtility.GetPosture (Verse.Pawn p) [0x00000] in <filename unknown>:0
  at Verse.PawnRenderer.RenderPawnAt (Vector3 drawLoc, BodyDrawType bodyDrawType) [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

Famous Shoes


1000101

That's kind of strange.

That it would even compile I mean.  After updating the Assembly-CSharp.dll and UnityEngine.dll in my dev directory which Mono references, I was getting compile time errors from all the changes, including but not limited to the pawn base reference in JobDrivers.

Did you update your reference libraries for your mod after updating RimWorld?
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Famous Shoes

Well you see, I'd added a large helping of stupid to my original recipe for stupid: I'd changed those constructors to take a pawn and then call the no-arg parent constructor, so they compiled and later on I forgot they were there. My only salvation is being in good company: why the heck A10 was invoking my busted constructor at all!

I was hoping to slide by on all this, what with my previous posts looking complicated and heroic. So thanks for that.  ;)

1000101

heh, my palm has met my face on a few occasions.  After updating to A10, I updated the shortcut to run A10 but forgot to change the "start-in" directory so it still pointed to A9.  derp.  :)
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Tynan

Quote from: Famous Shoes on April 19, 2015, 01:22:24 PM
My only salvation is being in good company: why the heck A10 was invoking my busted constructor at all!

It probably wasn't. But by adding your own ctor, you prevented it from adding the default parameterless ctor that the compiler will add if no constructor is defined.
Tynan Sylvester - @TynanSylvester - Tynan's Blog