Game Development Community

Crash on Deselect?

by Josiah Wang · in Torque Game Engine · 12/23/2004 (6:59 pm) · 6 replies

I'm currently using version 1.3.0 of the sdk (it's niiiice). However, I have a problem where whenever I deselect my window (ie alt+tab), i return to my game, and it basically crashes itself.

Here's the excerpt from my console.log, starting from the end of the Mission Lighting to the crash...

---------

*** Phase 3: Mission Lighting
Successfully loaded mission lighting file: 'starter.fps/data/missions/Snowday_1db1c711.ml'
Mission lighting done
Mapping string: MissionStartPhase3Ack to index: 2
Mapping string: MissionStart to index: 11
Mapping string: SyncClock to index: 12
*** Initial Control Object
Activating DirectInput...
keyboard0 input device acquired.
Mapping string: Kork to index: 13
*** ENDING MISSION
CDROP: 1388 IPX:CECECECE:CECECECECECE:52942
Exporting server prefs...
keyboard0 input device unacquired.
DirectInput deactivated.
keyboard0 input device created.
mouse0 input device created.
joystick0 input device created.
Activating DirectInput...


--------

any help on this?


ps: is this the right forum?

#1
12/23/2004 (7:31 pm)
This is the right forum.

Have you modified anything from stock Torque?
#2
12/24/2004 (3:53 am)
Yeah, i've modified a few things, but this also happened before i modified the code.
#3
12/24/2004 (8:55 am)
Mysterious. Are you running a release or debug build?
#4
12/24/2004 (10:26 am)
I compiled it as a debug.

Strange thing is, I copied/pasted all my files from this computer onto my dad's computer (ie: all the files are the same) and i tried it on his computer - it didn't crash O.o We're both running the same OS (WinXP Home)
#5
02/07/2005 (1:09 pm)
Wow, this is really starting to bother me now...before i had it crash when it was in debug, but now it's crashing when it's a release build as well.

So I started examining the console further. After the game finished loading (ie the main menu), I brought up the console and it said the following

Quote:

...
...
...
Loading compiled script starter.fps/client/scripts/default.bind.cs.
Compiling starter.fps/client/config.cs...
Loading compiled script starter.fps/client/config.cs.
Binding server port to default IP
UDP initialized on port 0
Unable to locate audio profile 'AudioStartup'
Engine initialized...
*** Load Main Menu

and it just ended there. Upon alt-tabbing to another window, and then back, however, it just closes itself. When I examined the console.log right after, i found the following two lines right after "*** Load Main Menu":

Quote:
*** Load Main Menu
keyboard0 input device created.
mouse0 input device created.


that's where i think the thing just blew up. In the beginning of the console.log, i see a section that says the following:
Quote:
Input Init:
keyboard0 input device created.
mouse0 input device created.
joystick0 input device created.
DirectInput enabled.

that is the only other instance of keyboard0 and mouse0 in console.log


So I thought, what about other versions? I loaded up a 1.2.0 version of torque I had, and once it finished loading, it said the same as above. I alt-tabbed to another window, and then back. It did NOT crash. The same two lines about keyboard0 and mouse0 still got added.

My conclusion, therefore, is that when torque gets reselected, the input device gets created again...ok so maybe that was a noobish interpretation...but if it gets recreated on reselecting, is it supposed to get 'destroyed' on deselect? That's what I think might be happening...maybe 1.3.0 had "stricter" error-handling (erg..not sure if that's the right term)? But if so, then how come it doesn't crash on my dad's computer (which also runs XP Home) >.<

thanks!
#6
02/19/2005 (4:48 pm)
I can't get this to reproduce. :(