Game Development Community

Object not registered?

by Dillon Sinnott · in iTorque 2D · 03/09/2011 (12:34 pm) · 1 replies

So I keep getting this error when I'm playing my game on the actual device, which states "SimObject::deleteObject: Object not registered". So I go through and make sure all my scheduled deletes are canceled when the level is left etc, etc. And it still doesn't work.

So, instead I just look at the file where this error is coming from (simmanager.cc), find the line (475) and... Comment it out. So now my game works but fine... But this seems like a pretty iffy thing to do, just randomly comment out stuff that's part of the source.

So what I'm asking is this, if you've ever gotten that "SimObject::deleteObject: Object not registered" how did you fix it (or just more details on what it means) and second, can I get away with just commenting out that line? I mean it works fine with it commented out but I imagine it might be a problem when I submit the app (although frankly I'm okay with risking it at this point). Just in case you want the full line.

AssertFatal(mFlags.test(Added),"SimObject::deleteObject: Object not registered.");

#1
03/10/2011 (9:52 am)
Well, I'm new to Torque2D, but if it is AssertFatal, you shouldn't comment it out, anyways it is executed only in debug build, not in release build. But if you have that error, it means that you are trying to delete an object that is not present or has been already deleted. You should check very well why this is happening. Could be also a bug in the engine but most likely is your fault.