ShadowReceiverEffect error after updating to rev 404

Mar 2, 2010 at 10:22 AM

I'm trying to update my project to rev 404 (to work on those camera changes you mentioned a while back) but I've got stuck on a new error that appeared in my surface code.

It's failing on this line that creates the effect...

Effect newEffect = new ShadowReceiverEffect(Engine.GraphicsDevice, effectFromDisk);

...and the exception is...

Exception message: The type initializer for 'Ox.Scene.EffectNamespace.ShadowReceiverEffect' threw an exception.

Exception type: System.TypeInitializationException

Exception stack trace:

at Ox.Scene.EffectNamespace.ShadowReceiverEffect..ctor(GraphicsDevice device, Effect cloneSource)

at Wheely.Component.TubeSurface.set_EffectFileNameHook(String value) in ...etc...

As far as I can tell this is indicating some sort of error in the ShadowReceiverEffect constructor, and more info is supposed to be in the InnerException, but because this shows up in the Assertion Failed window I dunno how to see the InnerException to determine the actual problem.  Also that window won't let me copy the text so I had to just type out the bit I thought would be relevant :(  Seems like this method of notifying script errors reduces our debugging options in general.  Is there a better way?


Mar 2, 2010 at 7:12 PM

The assertion doesn't actually limit your debugging options. Just click the Ignore button on the assertion dialog and you will proceed to the debugger session.

Let me know if that doesn't work for some reason.


Mar 3, 2010 at 8:04 AM

I guess I misunderstood the Ignore button.  Somewhere along the way I got it into my head that it would ignore that exception and try to go on, rather than just ignoring the assertion.  I got to the real error which was a failure to load Ox.Scene.Light.AmbientLightToken because you've changed it to Ox.Scene.LightNamespace.  So eventually I figured out that I just needed to bring in a fresh copy of Scene.xml from the rev 404 template and all is well again.