Crash - stock out of the box torque F11
by James · in Torque Game Engine · 10/29/2006 (5:24 am) · 27 replies
Purchase Torque 1.5 upgrade and have the following problem:
After launching a mission, if I access the editor (F11) and click on the items in the column, Torque crashes.
Sometimes I can click on several items no problem but eventually Torque will crash. Wierd.
My system is:
Model: PowerMac3,6, BootROM 4.4.8f2
CPU: 2 processors, PowerPC G4 (2.1), 1 GHz,
RAM:1.75 GB
Graphics: ATI Radeon 9000 Pro, ATY,RV250, AGP, 64 MB
I saved the crash report if that will help.
*won't let me post part of report.
** added torque build number
After launching a mission, if I access the editor (F11) and click on the items in the column, Torque crashes.
Sometimes I can click on several items no problem but eventually Torque will crash. Wierd.
My system is:
Model: PowerMac3,6, BootROM 4.4.8f2
CPU: 2 processors, PowerPC G4 (2.1), 1 GHz,
RAM:1.75 GB
Graphics: ATI Radeon 9000 Pro, ATY,RV250, AGP, 64 MB
I saved the crash report if that will help.
*won't let me post part of report.
** added torque build number
#22
11/18/2006 (2:06 pm)
James, this crash looks related to Unicode support (ActivateTSMDocument is used to ask the OS to give unicode keycodes for this window). I wonder if this happens because this code executes off the main thread -- I don't know about Carbon, but Cocoa GUI calls need to happen on the main thread. (See http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/index.html for a generic explanation.) I just have zero idea about how Torque has implemented threading.
#23
If something else comes up or I arrive at a solution, I'll post it here.
Thanks again.
11/18/2006 (2:46 pm)
Thanks Rob. I'll email GG directly if they don't jump in here with a suggestion or two.If something else comes up or I arrive at a solution, I'll post it here.
Thanks again.
#24
11/20/2006 (8:03 pm)
James -- see this thread. www.garagegames.com/mg/forums/result.thread.php?qt=53544 seems like it's the same on both platforms, and Matt knows about it.
#25
Thanks for the crashlog! Only... you don't need to post the entire crash log. All that's needed is: the System info, program & version info, and the call stack for the thread that crashed.
This looks like an issue related to ActivateTSMDocument, threading, and the magic of gui control's onWake sequence.
Now, the code in onWake() is supposed to prevent multiple ActivateTSMDocument() spamming.
And, it looks like this call will need to move to thread 0, where interaction with the Mac gui must happen.
@Rob: good catch, you're exactly right.
Added Bug #2445.
/Paul
12/05/2006 (12:37 am)
@James: Thanks for the crashlog! Only... you don't need to post the entire crash log. All that's needed is: the System info, program & version info, and the call stack for the thread that crashed.
This looks like an issue related to ActivateTSMDocument, threading, and the magic of gui control's onWake sequence.
Now, the code in onWake() is supposed to prevent multiple ActivateTSMDocument() spamming.
And, it looks like this call will need to move to thread 0, where interaction with the Mac gui must happen.
@Rob: good catch, you're exactly right.
Added Bug #2445.
/Paul
#26
Everything you said after that lost me but I believe you :)
I will sleep easier know that the bug has a number and is marked for extraction.
@Rob - cool :)
12/05/2006 (7:48 am)
@ Paul - thanks for the response. I posted all that because I'm totally ignorant as to what is useful information and what isn't. Sorry about that. I'll look up wikipedia and find out what a "call stack" is :)Everything you said after that lost me but I believe you :)
I will sleep easier know that the bug has a number and is marked for extraction.
@Rob - cool :)
#27
This thread is pretty old but not finding a fix posted anywhere (1.5.2 still has the problem) and being rather annoyed by the bug while toying around with good old TGE, I quickfixed this and for now, it appears to be running stable.
So, in case someone's running into this issue with TGE on OSX, here's the changes.
In platformMacCarb/macCarbEvents.h add the following two event types:
Then in platformMacCarb/macCarbEvents.cc replace the following methods:
The asynchronous nature this has now definitely isn't ideal but so far it appears to work fine.
02/20/2010 (7:04 am)
This thread is pretty old but not finding a fix posted anywhere (1.5.2 still has the problem) and being rather annoyed by the bug while toying around with good old TGE, I quickfixed this and for now, it appears to be running stable.
So, in case someone's running into this issue with TGE on OSX, here's the changes.
In platformMacCarb/macCarbEvents.h add the following two event types:
const U32 kEventTorqueActivateTSM = 6; const U32 kEventTorqueDeactivateTSM = 7;
Then in platformMacCarb/macCarbEvents.cc replace the following methods:
//--------------------------------------
static OSStatus _OnTorqueEvent(EventHandlerCallRef nextHandler, EventRef theEvent, void* userData)
{
UInt32 eventKind = GetEventKind(theEvent);
void* torqueData;
GetEventParameter(theEvent, kEventParamTorqueData, typeVoidPtr,
NULL, sizeof(void*), NULL, &torqueData);
switch( eventKind )
{
case kEventTorqueAlert:
MacCarbRunAlertMain();
break;
case kEventTorqueFadeInWindow:
MacCarbFadeInWindow((WindowPtr)torqueData);
break;
case kEventTorqueFadeOutWindow:
MacCarbFadeAndReleaseWindow((WindowPtr)torqueData);
break;
case kEventTorqueReleaseWindow:
ReleaseWindow((WindowPtr)torqueData);
break;
case kEventTorqueShowMenuBar:
MacCarbShowMenuBar(torqueData);
break;
case kEventTorqueActivateTSM:
ActivateTSMDocument(platState.tsmDoc);
break;
case kEventTorqueDeactivateTSM:
DeactivateTSMDocument(platState.tsmDoc);
break;
}
return noErr;
}
#pragma mark -
#pragma mark ---- Keyboard input ----
//--------------------------------------
void Platform::enableKeyboardTranslation(void)
{
MacCarbSendTorqueEventToMain( kEventTorqueActivateTSM, NULL );
platState.tsmActive=true;
}
//--------------------------------------
void Platform::disableKeyboardTranslation(void)
{
MacCarbSendTorqueEventToMain( kEventTorqueDeactivateTSM, NULL );
platState.tsmActive=false;
}The asynchronous nature this has now definitely isn't ideal but so far it appears to work fine.
Torque 3D Owner James
You can see this time I had to click around a few times before it crapped out.
Since I'm going to have to use the inspector and terrian elemets, this is a serious problem for me.
I may download the sdk again to make sure my copy is clean. Anyone has an idea what's going on and needs something else to narrow it down, please just let me know.
Cheers!