Crash in t2dSceneObject.cc
by Rob Zimmerman · in Torque Game Builder · 09/17/2006 (6:12 pm) · 1 replies
I'm running TGB 1.0 Professional (the early adopter bundle).
I'm compiling & running TGB in debug mode. It isn't reliable, but every so often I can crash t2dSceneObject::clone().
Well, actually deleteObject() asserts because the object hasn't been registered yet.
I believe the two bugs here are -
1) It isn't valid to call deleteObject() before it's registered.
2) How can I tell why loadStream() failing? There are no error messages as to why it's crapping out.
Thanks,
~Rob
I'm compiling & running TGB in debug mode. It isn't reliable, but every so often I can crash t2dSceneObject::clone().
Well, actually deleteObject() asserts because the object hasn't been registered yet.
I believe the two bugs here are -
1) It isn't valid to call deleteObject() before it's registered.
2) How can I tell why loadStream() failing? There are no error messages as to why it's crapping out.
// Read-in the new objects stream.
if ( !pSceneObject2D->loadStream( resizeStream, pSceneGraph, ObjReferenceList, true ) )
{
// Warn.
Con::warnf("t2dSceneObject::clone() - Error loading Clone-stream!");
// Destroy Object.
pSceneObject2D->deleteObject();
// Return Error.
return false;
}
// Copy over fields if requested.
if ( bCopyFields )
pSceneObject2D->assignFieldsFrom( this );
// Register Object.
if ( !pSceneObject2D->registerObject() )
{
......Thanks,
~Rob
Associate Melv May
The "loadStream" has many exit-points and it doesn't return a list of standard error-codes unfortunately.
I'd suggest putting a few breakpoints on the exit-points of the "loadStream()". If it's only in the "clone()" method then you can guarantee that it's using the latest version of the "load/save" stream code so you only need to put a few breakpoints in there. Be careful of the hierarchy though as you may need to put them in the latest version of the "load/save" of say, static-sprites (or whatever you're cloning).
Sounds nasty but you should get pretty quick results from this. I'm monitoring this thread now so if you get any more info then please post it and I'll see what I can think of.
Again, thanks for the heads-up.
- Melv.