Game Development Community

Freezing Issue

by Daniel Ly · in Torque Game Engine · 07/27/2006 (3:04 pm) · 13 replies

Hey,

TGE is periodically freezing on me. It freezes right when the mission is done being loaded (before I get a chance have any input and smoke hasn't even begun to rise through the chimney's in Stronghold.mis), but once it gets going, it no longer freezes after that. The thing that gets me is that only on occasion (about half the time), does it freeze. The other times, it works perfectly.

I've been modifying the engine quite a bit; the latest additions include changes to Item's interpolateTick and ProcessTick methods. Although I understand how my modifications could easily make it freeze, I still can't figure out why it would do so only half the time...

Any ideas?

Thanks

Edit: Typo

#1
07/27/2006 (3:31 pm)
Race condition ?

try running in debug and breaking the program when it freezes to see what's (not) going on.
#2
07/27/2006 (6:31 pm)
Quote:
It freezes right when the mission is done being loaded

Wrap your PC in a blanket ;)
#3
07/28/2006 (8:30 am)
@orion
what's a race condition?
#4
07/28/2006 (8:42 am)
Taking a look at the logs between the two cases, it appears that TGE crashes before the line
Mapping string: Kork to index: 13

And it looks like I'm running into bigger issues now.. when I try and run a dedicated server so I can run the debugger, it crashes during the "Initializing Torque Creator", with the last line being:
Loading compiled script creator/ui/GuiEditorCreator.gui.

Any ideas with this new problem?
#5
07/28/2006 (9:26 am)
You have to comment out or remove the references to the editors for your dedicated server to work, AFAIK.
#6
07/28/2006 (9:29 am)
@daniel - wikipedia.

try rolling back to a state where things were working, and then moving forward again slowly.

if you're using a source-control system such as the excellent and free Subversion, this is very easy to do.
#7
07/28/2006 (10:34 am)
@stefan
Thanks for the heads up

Unfortunately, the debugger crashes as well. Haven't looked too deep into the VS Disassembler, though (not sure I would be able to make out the problem even if I did!)

Instead, I traced the program right after main.cs loads. It appears the program freezes because it is having trouble exiting from an Armor::onCollision() call. The weirdest part is that it makes it to the end of the function: I added an echo() just before the closing bracket of onCollision and the print statement is printed to the log before the program freezes. So clearly the function makes it to the end, but isn't able to exit since the trace never prints "Leaving armor::onCollision() - return "..

Has anyone come across this before? or better yet, knows how to fix it? =D
#8
07/31/2006 (8:54 am)
I've dug around a bit deeper, and I've noticed that the game always crashes before it can print the line:
Mapping string: Kork to index: 13

I've been looking around the documentation, but I have no idea where that's called or what exactly is happening when that line is printed.

Does anyone have any information on this or knows where I can find some? Thanks

Edit: Typo
#9
07/31/2006 (9:08 am)
Have you tried running in debug to see exactly where it's crashing ?
#10
07/31/2006 (9:16 am)
@Orion
Sorry, I've been interchanging crashing and freezing when I really shouldn't be. The game hasn't crashed; it
always freezes (I'm guessing it goes into an infinite loop when it tries to map the string to the index).

However, the debugger crashes when I try and load the mission, so its not really in comission at the moment.
#11
07/31/2006 (9:21 am)
By debugger you mean the C++ debugger, right ?
if the debugger crashes when you're trying to load the level, that's a sign of deep(er) problems, and you might try rolling back to a state where things were working, and then moving forward again slowly.
#12
07/31/2006 (9:28 am)
@Orion
I was talking about the Torque debugger... how do you set up the C++ debugger at run time?
As for rolling back, I haven't set up a revision control program and my changes are all over the place, so unfortunately, that's not an option. (Although I'm currently implementing one)
#13
07/31/2006 (9:30 am)
C++ debugger is a good thing.

in visual studio,
you go up to Build Settings or some such,
change the build from Release to Debug,
goto project settings and set the Working Directory,
then hit F5 to launch in debug.