Game Development Community

TGE on the appleTV

by Rob Terrell · in Torque Game Engine · 04/05/2007 (9:19 am) · 7 replies

I ran TGE on an appleTV today. Nope -- it didn't run, it crashed with a bus error. In case you're interested, here's what the log looks like:

//-------------------------- 4/5/2007 -- 13:05:43 -----
System & Processor Information:
MacOS version: 10.4.7
CarbonLib version: 1.6.0
Physical RAM: 256MB
Logical RAM: 2047MB
Unknown Getstalt value for processor type: 0x69353836
platform layer should be changed to use sysctl() instead of Gestalt() .
Unknown Processor, assuming x86 Compatible, 1000 Mhz
FPU detected

Math Init:
Installing Standard C extensions

Input Init:

Video Init:
Dumping list of pixel formats:
------------------------------------------------------------
Describing pixel format 0x131e99c
ALL_RENDERERS 0
BUFFER_SIZE 32
LEVEL 0
RGBA 1
DOUBLEBUFFER 1
STEREO 0
AUX_BUFFERS 0
GREEN_SIZE 8
RED_SIZE 8
BLUE_SIZE 8
ALPHA_SIZE 8
DEPTH_SIZE 0
STENCIL_SIZE 0
ACCUM_RED_SIZE 5
ACCUM_GREEN_SIZE 5
ACCUM_BLUE_SIZE 5
ACCUM_ALPHA_SIZE 0
PIXEL_SIZE 32
MINIMUM_POLICY 0
MAXIMUM_POLICY 0
OFFSCREEN 0
FULLSCREEN 0
SAMPLE_BUFFERS_ARB 0
SAMPLES_ARB 0
AUX_DEPTH_STENCIL 0
COLOR_FLOAT 0
MULTISAMPLE 0
SUPERSAMPLE 0
SAMPLE_ALPHA 0
------------------------------------------------------------
------------------------------------------------------------
Describing pixel format 0x131e9a0
ALL_RENDERERS 0
BUFFER_SIZE 32
LEVEL 0
RGBA 1
DOUBLEBUFFER 1
STEREO 0
AUX_BUFFERS 4
GREEN_SIZE 8
RED_SIZE 8
BLUE_SIZE 8
ALPHA_SIZE 8
DEPTH_SIZE 32
STENCIL_SIZE 8
ACCUM_RED_SIZE 32
ACCUM_GREEN_SIZE 32
ACCUM_BLUE_SIZE 32
ACCUM_ALPHA_SIZE 0
PIXEL_SIZE 32
MINIMUM_POLICY 0
MAXIMUM_POLICY 0
OFFSCREEN 1
FULLSCREEN 0
SAMPLE_BUFFERS_ARB 0
SAMPLES_ARB 0
AUX_DEPTH_STENCIL 0
COLOR_FLOAT 0
MULTISAMPLE 0
SUPERSAMPLE 0
SAMPLE_ALPHA 0
------------------------------------------------------------
active displays = 0x7b5080 CGDisplayID = 0x5b810280
using display 0x7b5080
Accelerated OpenGL display device detected.

Initializing chunk mappings...
o 'TEXT' maps to TextChunk
o 'SCHK' maps to UnknownChunk
o 'SCHK' maps to SimChunk
setModPaths: invalid mod path directory name: 'creator'
setModPaths: invalid mod path directory name: 'tutorial.base'
--------- Loading MODS ---------
Missing file: tutorial.base/main.cs!
Error: Unable to find specified mod: tutorial.base
Missing file: creator/main.cs!
Error: Unable to find specified mod: creator
Loading compiled script demo/main.cs.
setModPaths: invalid mod path directory name: 'creator'
setModPaths: invalid mod path directory name: 'tutorial.base'
setModPaths: invalid mod path directory name: 'common'
Missing file: common/main.cs!
Loading compiled script demo/client/defaults.cs.
Loading compiled script demo/server/defaults.cs.
Missing file: demo/client/prefs.cs!
Missing file: demo/server/prefs.cs!

#1
04/05/2007 (9:19 am)
-------- Parsing Arguments ---------

--------- Initializing MOD: Torque Demo ---------
Loading compiled script demo/client/init.cs.
Loading compiled script demo/server/init.cs.
Loading compiled script demo/data/init.cs.
Loading compiled script demo/data/terrains/highplains/propertyMap.cs.
Loading compiled script demo/data/interiors/propertyMap.cs.

--------- Initializing MOD: Torque Demo Server ---------
demo/server/init.cs (54): Unable to find function initBaseServer
Loading compiled script demo/server/scripts/commands.cs.
Loading compiled script demo/server/scripts/centerPrint.cs.
Loading compiled script demo/server/scripts/game.cs.

--------- Initializing MOD: Torque Demo Client ---------
Loading compiled script demo/client/ui/customProfiles.cs.
demo/client/init.cs (45): Unable to find function initBaseClient
demo/client/init.cs (61): Unable to find function initCanvas
Loading compiled script demo/client/scripts/audioProfiles.cs.
Loading compiled script demo/client/ui/defaultGameProfiles.cs.
Loading compiled script demo/client/ui/PlayGui.gui.
MacCarbFont::create - could not load font -Arial-
Loading platform font failed, trying font fallbacks...
MacCarbFont::create - could not load font -Helvetica-
Loading platform font failed, trying font fallbacks...
#2
04/05/2007 (2:14 pm)
Sweet, I'd like to see someone do this. Not for any particular reason, but it would be cool.
#3
04/11/2007 (2:23 pm)
Hehe, wow, nice.

Any chance you can get a crashlog & a stack dump out of the thing?
#4
04/12/2007 (7:01 am)
**********

Host Name: AppleTV
Date/Time: 2007-04-05 12:46:41.517 -0300
OS Version: 10.4.7 (Build 8N5107)
Report Version: 4

Command: Torque Demo OSX
Path: Torque Demo OSX.app/Contents/MacOS/Torque Demo OSX
Parent: bash [215]

Version: GarageGames.com, Inc. All rights reserved. (1.5.0)

PID: 219
Thread: 1

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0:
0 libSystem.B.dylib 0x90009eb7 mach_msg_trap + 7
1 com.apple.CoreFoundation 0x908c00da CFRunLoopRunSpecific + 2014
2 com.apple.CoreFoundation 0x908bf8f5 CFRunLoopRunInMode + 61
3 com.apple.HIToolbox 0x92bef2d2 RunCurrentEventLoopInMode + 285
4 com.apple.HIToolbox 0x92bee9e4 ReceiveNextEventCommon + 385
5 com.apple.HIToolbox 0x92c37736 _AcquireNextEvent + 58
6 com.apple.HIToolbox 0x92c37588 RunApplicationEventLoop + 150
7 com.garagegames.torquedemo 0x0028b9ed main + 941
8 com.garagegames.torquedemo 0x000027a2 _start + 216
9 com.garagegames.torquedemo 0x000026c9 start + 41

Thread 1 Crashed:
0 com.garagegames.torquedemo 0x0006994d GFont::create(char const*, unsigned, char const*, unsigned) + 365
1 com.garagegames.torquedemo 0x0016f9f4 GuiControlProfile::incRefCount() + 84
2 com.garagegames.torquedemo 0x0016fc1d ConsoleTypeTypeGuiProfile::setData(void*, int, char const**, EnumTable*, BitSet32) + 189
3 com.garagegames.torquedemo 0x000379ed Con::setData(int, void*, int, int, char const**, EnumTable*, BitSet32) + 77
4 com.garagegames.torquedemo 0x00045f25 SimObject::setDataField(char const*, char const*, char const*) + 373
5 com.garagegames.torquedemo 0x00034785 CodeBlock::exec(unsigned, char const*, Namespace*, unsigned, char const**, bool, char const*, int) + 6213
6 com.garagegames.torquedemo 0x0003c200 cexec(SimObject*, int, char const**) + 2160
7 com.garagegames.torquedemo 0x000351cb CodeBlock::exec(unsigned, char const*, Namespace*, unsigned, char const**, bool, char const*, int) + 8843
8 com.garagegames.torquedemo 0x00034e60 CodeBlock::exec(unsigned, char const*, Namespace*, unsigned, char const**, bool, char const*, int) + 7968
9 com.garagegames.torquedemo 0x00034e60 CodeBlock::exec(unsigned, char const*, Namespace*, unsigned, char const**, bool, char const*, int) + 7968
10 com.garagegames.torquedemo 0x00032be3 CodeBlock::compileExec(char const*, char const*, bool, int) + 659
11 com.garagegames.torquedemo 0x0003834c Con::evaluate(char const*, bool, char const*) + 236
12 com.garagegames.torquedemo 0x000e04c4 runEntryScript(int, char const**) + 340
13 com.garagegames.torquedemo 0x000e0a09 initGame(int, char const**) + 1257
14 com.garagegames.torquedemo 0x000e0e13 DemoGame::main(int, char const**) + 643
15 com.garagegames.torquedemo 0x0028b5c9 MacCarbRunTorqueMain() + 89
16 com.garagegames.torquedemo 0x001d4fcc ThreadRunHandler(void*) + 28
17 libSystem.B.dylib 0x900243e7 _pthread_body + 84

Thread 2:
0 libSystem.B.dylib 0x90037dc7 mach_wait_until + 7
1 libSystem.B.dylib 0x9003a492 usleep + 82
2 com.garagegames.torquedemo 0x001d551d Platform::sleep(unsigned) + 29
3 com.garagegames.torquedemo 0x001c8fec NetAsync::run() + 252
4 com.garagegames.torquedemo 0x001d4fcc ThreadRunHandler(void*) + 28
5 libSystem.B.dylib 0x900243e7 _pthread_body + 84

Thread 1 crashed with X86 Thread State (32-bit):
eax: 0x00000000 ebx: 0x003b0990 ecx: 0x00000b66 edx: 0x0000000e
edi: 0x067a6000 esi: 0x00000000 ebp: 0xb009b058 esp: 0xb009af10
ss: 0x0000001f efl: 0x00010286 eip: 0x0006994d cs: 0x00000017
ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037
#5
04/18/2007 (7:17 am)
I know this is stupid to pursue, but anyway, I discovered the font problem -- apparently the appleTV doesn't have Arial, Helvetica, or any other standard font installed.

Once I installed the expected fonts, it still crashes. My guess is that Carbon on the appleTV is incomplete -- why would they need a full implementation of Carbon on the thing, anyway? But I need to look into MacCarbFont::create and see what it's up to.
#6
05/15/2007 (2:37 am)
I had the same crash on my powerbook (PPC).

I think it comes from the font too, because of the 'GFont::create' crash error.

But in fact, it was coming from a missing 'GuiDefaultProfile' in my 'client/ui/customProfiles.cs'.

If you redefine your own interface, be sure to redefine first the 'GuiDefaultProfile' in your file, because every other GUI definition refers to it.

It was crashing this way with TGE 1.42 and 1.5.0 (didn't test with 1.5.1)

Hope this will help you (and us then :-) )
#7
05/15/2007 (10:05 am)
Interesting. I was just thinking of this very thing a few days ago with either TGE or TGB.