Crash on multiple Torque instances
by Jason McIntosh · in Torque Game Builder · 03/01/2005 (12:54 pm) · 9 replies
I made some edits to my script, then tried to run Torque, but it crashed. And kept crashing no matter what changes I reverted to. Then I realized that an instance of Torque was already running behind my editor window. Doh!
I'm sure we all agree that a more elegant exit would be better. :)
I'm sure we all agree that a more elegant exit would be better. :)
About the author
#2
03/01/2005 (6:49 pm)
Yes, a more elegant exit would be nice. This happens with Torque in "Release" mode. We'll try to take a look ourselves, or maybe cajole Ben into doing it.
#3
Oddly enough it's on a return statement????
Debug builds will happily run multiple instances on Win32 systems...
So the question is... is it worth traking down what is causing the crash... or just allow multiple instances in a release build?
main.cc around lines 66-71 or so, contains the block of code to call the check for multiple instances.
03/02/2005 (1:08 am)
I tracked down where the crash happens....Oddly enough it's on a return statement????
Debug builds will happily run multiple instances on Win32 systems...
So the question is... is it worth traking down what is causing the crash... or just allow multiple instances in a release build?
main.cc around lines 66-71 or so, contains the block of code to call the check for multiple instances.
#4
03/02/2005 (6:54 am)
I vote to limit multiple instances rather than allow them.
#5
So there could be a reconciliation of the codebase so that it's a Release/Debug option, or just a switch by #define if you need to be able to run multiple instances (running a dedicated server on the same machine as a client ?)
Harold pointed to the actual test, the function Platform::excludeOtherInstances() is in winWindow.cc for Win32, X86UNIXWindow.cc for Linux IA-32, and I don't have a mac codebase in front of me, but probably something like macCarbWindow.cc for MacOS X. (defined in platform.h)
I don't think multiple instances should be prevented outright as there are various reasons to have them around :)
03/02/2005 (7:58 am)
Btw, afaik, MacOS X doesn't care about the same app running multiple times. So there could be a reconciliation of the codebase so that it's a Release/Debug option, or just a switch by #define if you need to be able to run multiple instances (running a dedicated server on the same machine as a client ?)
Harold pointed to the actual test, the function Platform::excludeOtherInstances() is in winWindow.cc for Win32, X86UNIXWindow.cc for Linux IA-32, and I don't have a mac codebase in front of me, but probably something like macCarbWindow.cc for MacOS X. (defined in platform.h)
I don't think multiple instances should be prevented outright as there are various reasons to have them around :)
#6
03/13/2005 (5:03 am)
One good use for multiple instances would be to test some networked stuff in a game without requiring two computers. Just an example.
#7
03/13/2005 (8:38 am)
Ok, let's say the option would be nice, but it shouldn't crash either way. :)
#8
03/13/2005 (3:33 pm)
If you compile a Debug build, you can run multiple instances at the same time.
#9
I haven't gone through enough of the code to see exactly why it crashes though.
Edit: Apparently Harold already found it, that's what I get for not reading the entire thread ;).
03/17/2005 (3:26 pm)
A quick hack is to comment out lines 68 and 69 in main.cc:Quote:
#if !defined(TORQUE_OS_MAC) // macs can only run one instance in general.
#if !defined(TORQUE_DEBUG) && !defined(INTERNAL_RELEASE)
//if(!Platform::excludeOtherInstances("TorqueTest"))
//return false;
#endif
#endif
I haven't gone through enough of the code to see exactly why it crashes though.
Edit: Apparently Harold already found it, that's what I get for not reading the entire thread ;).
Associate Melv May
- Melv.