Game Development Community

Tge crash on %item.delete() ... any idea?

by Luis Anton Rebollo · in Torque Game Engine · 03/11/2005 (2:39 pm) · 5 replies

I'm trying to delete a dynamic created item... but when execute delete() method engine crash.

Debug info -> mLocalGhosts[index]->unpackUpdate(this, bstream);

?¿?¿ Any idea.

Thx all

Soryy for may bad english.

#1
03/11/2005 (4:41 pm)
It's possible items created with (static=true) field solve this problem... Why?

Thx :)
#2
03/11/2005 (5:59 pm)
Run a search for this line...

readInt(10);


if you find any, replace them with...

readInt(NetConnection::GhostIdBitSize);
#3
03/12/2005 (2:01 am)
Thx for the reply...

only in item.cc or all the code?
#4
03/12/2005 (4:58 am)
All the code, if there is one, then there will be more
#5
10/27/2008 (10:07 pm)
Orry to dredge up an old thread but I am having the same problem as the original poster using 1.7.1 Combo with AFX. Deleting Items causes a hard crash and I get the same debug info mentioned above. Searching the code for "readInt(10);" produces 6 of them, 4 under netconnections.cpp and 2 under particleemitter.cpp. Making the suggested change causes my build to crash even without deleting any Items... I also find it hard to believe that this is a real solution since readInt(*) seems to often contain integers of various sizes throughout the program.

If anyone can shed some light on why this should or should not work for the aforementioned problem then I would be grateful.
*******************************
Edit:RESOLVED: As is always the case with these things... in my case the problem was not at all related to the packing and unpacking code... I had a mistake in my method for resolving ghost ids and server object ids and I was therefore deleting objects incorrectly and causing the crash.