Game Development Community

msgBox.cpp @ 50 app freeze

by rennie moffat · in iTorque 2D · 09/27/2010 (3:27 pm) · 40 replies

Hi there,
I just got a major issue I am hoping I can have remedied easily.


My Game no longer loads on device. I get the message

Warning: (/Applications/iTorque2D_1_4/MyProjects/myGame/buildFiles/XCode_iPhone/../../../../engine/source/platform/nativeDialogs/msgBox.cpp @ 50) getIDFromName(): didn't find that name



right before the crash, or freeze. Two things of note.
. I removed a good chunk of behavior.dso's right before this, with out unlinking the objects in the levels.
. I replaced the removed dso's, still freezes.
. I removed an audio file ( i know, not much, but i did )




*** One major thing, that really bugs me tho is that I made a copy of my working project so I could do things like remove dso's without worry, however the untouched original has the same freeze point.

About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.

Page«First 1 2 Next»
#21
09/29/2010 (2:36 pm)
Hi Scott,
I have tried again this morning but am now getting the error, TGBAppDelegate was not declared in this scope.


I have for sure plugged in all lines as asked. Not sure what to do, if you have any thoughts, suggestions, please pass them on.


Cheers.


::))((
#22
09/29/2010 (2:51 pm)
Can you post a copy of the message please?
#23
09/29/2010 (3:01 pm)
I get 10 error messages. Tho the appear to be an identical couplet of five units.

The errors are,
'TGBAppDelegate' was not declared
'delgate' was not declared in this scope
Expected primary-expression before ')' token
Expected ']' before 'delegate'
Expected ';' before 'delegate'

The error message, I believe is.

CompileC build/iTorque2D.build/Debug-iphoneos/iTorque2DGame_device.build/Objects-normal/armv6/iPhoneMain.o ../../../../engine/source/platformiPhone/iPhoneMain.mm normal armv6 objective-c++ com.apple.compilers.gcc.4_2
cd /Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x objective-c++ -arch armv6 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -D__IPHONE__ -DTORQUE_PLAYER -DTORQUE_DEBUG -DTORQUE_DISABLE_MEMORY_MANAGER -DPUAP_SCRIPT_CHANGE -DPUAP_OPTIMIZE -DUSE_COMPONENTS -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -fvisibility=hidden -fvisibility-inlines-hidden -gdwarf-2 -mno-thumb -miphoneos-version-min=4.1 -iquote /Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/build/iTorque2D.build/Debug-iphoneos/iTorque2DGame_device.build/iTorque2DGame-generated-files.hmap -I/Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/build/iTorque2D.build/Debug-iphoneos/iTorque2DGame_device.build/iTorque2DGame-own-target-headers.hmap -I/Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/build/iTorque2D.build/Debug-iphoneos/iTorque2DGame_device.build/iTorque2DGame-all-target-headers.hmap -iquote /Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/build/iTorque2D.build/Debug-iphoneos/iTorque2DGame_device.build/iTorque2DGame-project-headers.hmap -F/Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/build/Debug-iphoneos -F"/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks" -F"/Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/../../../../engine/lib/xiph/iPhone" -I/Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/build/Debug-iphoneos/include -I../../../../engine/source -I../../../../engine/lib -I../../../../engine/lib/vorbis/include -I../../../../engine/lib/lpng -I../../../../engine/lib/ljpeg -I../../../../engine/lib/lungif -I/Classes -I../../../../engine/lib/openal/macosx/eax -I/System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/CarbonCore.framework/Headers -I/System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/OT.framework/Headers -I/System/Library/Frameworks/ApplicationServices.framework/Versions/Current/Frameworks/QD.framework/Headers -I/System/Library/Frameworks/Carbon.framework/Versions/Current/Frameworks/HIToolbox.framework/Headers -I/System/Library/Frameworks/OpenGL.framework/Headers -I/System/Library/Frameworks/Carbon.framework/Headers -I/System/Library/Frameworks/AGL.framework/Headers -I/Developer/Headers/FlatCarbon -I/Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/build/iTorque2D.build/Debug-iphoneos/iTorque2DGame_device.build/DerivedSources/armv6 -I/Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/build/iTorque2D.build/Debug-iphoneos/iTorque2DGame_device.build/DerivedSources -include /var/folders/aI/aIakKbMHF+yQenZfL1gSlk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/iTorque2D_Prefix-gbsrcnhrxxudewforqbtublgckjb/iTorque2D_Prefix.pch -c /Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/../../../../engine/source/platformiPhone/iPhoneMain.mm -o /Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/build/iTorque2D.build/Debug-iphoneos/iTorque2DGame_device.build/Objects-normal/armv6/iPhoneMain.o





All are from or appear at this function in the iPhoneMain.mm

void _iPhoneGameBecomeActive(){  
    TGBAppDelegate *delegate = (TGBAppDelegate*)[[UIApplication sharedApplication] delegate];  
    if (![delegate isGameStarting]) {  
        Con::executef( 1, "oniPhoneBecomeActive" );  
    }  /Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/../../../../engine/source/platformiPhone/iPhoneMain.mm:106:0 /Applications/iTorque2D_1_4/MyProjects/TempleRacer/buildFiles/XCode_iPhone/../../../../engine/source/platformiPhone/iPhoneMain.mm:106: error: expected `;' before 'delegate'
}
#24
09/29/2010 (3:03 pm)
It looks like there may be syntax errors? I am not sure, hopefully this will mean something, and thanks for anything you can do.


Cheers.


::)))(((
#25
09/29/2010 (3:10 pm)
Rennie, I missed an import statement ... add this to the top of iPhoneMain.mm :

#import "TGBAppDelegate.h"
#26
09/29/2010 (3:15 pm)
Great, thanks Scott.

It loads up and installs but stops in load as it receives a "SIGABRT".


I am going to look this up.
If you know a quick fix pass it along, but again thanks, I really hope this works out as this game is really good I feel and has a chance to be successful.


Thanks again,
Rennie
#27
09/29/2010 (3:19 pm)
Quotes from answers about this exact same question (SIGABRT)

.You probably changed an IBOutlet's name in code without changing it in the xib.
.You probably had IBOutlets connected from a xib back into your code, and those connections are broken.




Will continue to look into.



#28
09/29/2010 (3:28 pm)
Rennie, what is the stack trace when you get the SIGABRT?
#29
09/29/2010 (3:29 pm)
Yah I am not sure if this i correct.

This is what is provided in the Debugger, right before, at the error.


0x30d2a318 <+0000> mov r12, #37 ; 0x25
0x30d2a31c <+0004> svc 0x00000080
0x30d2a320 <+0008> bcc 0x30d2a338 <__kill+32>
0x30d2a324 <+0012> ldr r12, [pc, #4] ; 0x30d2a330 <__kill+24>
0x30d2a328 <+0016> ldr r12, [pc, r12]
0x30d2a32c <+0020> b 0x30d2a334 <__kill+28>
0x30d2a330 <+0024> andeq r1, r11, r0, lsl #27
0x30d2a334 <+0028> bx r12
0x30d2a338 <+0032> bx lr



The arrow points to line 3.
#30
09/29/2010 (3:31 pm)
also, in the header above the provided code, the message reads....

asm_kill 0x30d3a318:1



obviously referencing the 3rd line. Not sure if this is relevant, thought I would post anyway.
#31
09/29/2010 (3:32 pm)
We need the stack trace to be symbolised so we can see the method calls. Can you see any of that?
#32
09/29/2010 (3:34 pm)
I am about to look into it, but I do not know how to get the stack trace what it is, where it is, etc.
#33
09/29/2010 (4:01 pm)
I am not sure if this is it, but this is from the console.



Initial Command Line
0 : /var/mobile/Applications/BE71B5B6-081E-4870-AD9D-EEFF39F0C2D6/iTorque2DGame.app/iTorque2DGame
Merged Command Line
0 : /var/mobile/Applications/BE71B5B6-081E-4870-AD9D-EEFF39F0C2D6/iTorque2DGame.app/iTorque2DGame
2010-09-29 11:28:06.596 iTorque2DGame[3112:307] -[TGBAppDelegate isGameStarting]: unrecognized selector sent to instance 0x817ca0
2010-09-29 11:28:06.829 iTorque2DGame[3112:307] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TGBAppDelegate isGameStarting]: unrecognized selector sent to instance 0x817ca0'
*** Call stack at first throw:
(
0 CoreFoundation 0x3688541b __exceptionPreprocess + 114
1 libobjc.A.dylib 0x350a03ec objc_exception_throw + 40
2 CoreFoundation 0x36886b83 -[NSObject(NSObject) doesNotRecognizeSelector:] + 98
3 CoreFoundation 0x3682be07 ___forwarding___ + 506
4 CoreFoundation 0x3682bbc0 _CF_forwarding_prep_0 + 48
5 iTorque2DGame 0x00353910 _Z23_iPhoneGameBecomeActivev + 120
6 iTorque2DGame 0x00348fa0 -[TGBAppDelegate applicationDidBecomeActive:] + 56
7 UIKit 0x3100917c -[UIApplication _setActivated:] + 120
8 UIKit 0x30f96ba8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 352
9 UIKit 0x3100ed7c -[UIApplication handleEvent:withNewEvent:] + 1792
10 UIKit 0x3100e478 -[UIApplication sendEvent:] + 68
11 UIKit 0x3100dd00 _UIApplicationHandleEvent + 6812
12 GraphicsServices 0x32f80de0 PurpleEventCallback + 1032
13 CoreFoundation 0x36816e47 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 28
14 CoreFoundation 0x36816e05 __CFRunLoopDoSource1 + 164
15 CoreFoundation 0x368090a5 __CFRunLoopRun + 580
16 CoreFoundation 0x36808d7b CFRunLoopRunSpecific + 226
17 CoreFoundation 0x36808c89 CFRunLoopRunInMode + 60
18 UIKit 0x30f95f6c -[UIApplication _run] + 532
19 UIKit 0x30f934d4 UIApplicationMain + 972
20 iTorque2DGame 0x00353704 main + 1240
21 iTorque2DGame 0x0004eb94 start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
#34
09/29/2010 (6:43 pm)
Rennie, add the following under the other synthesize statements in TGBAppDelegate:

@synthesize isGameStarting;
#35
09/29/2010 (6:55 pm)
Thanks Scott,
it loads now,
It does not however run on it's own. however, I have not removed the cs files I reinstalled. So you think best bet, remove all dso, let them recompile, then remove cs's?


Am proceeding with that step anyways.

Cheers.




ps. this is the message I got in the console when I ran it on its own off the device.


Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 0

Application Specific Information:
TempleRacer failed to launch in time

Elapsed total CPU time (seconds): 1133.880 (user 559.832, system 574.048), 27% CPU
Elapsed application CPU time (seconds): 0.390, 0% CPU
#36
09/29/2010 (7:17 pm)
Hi Scott,
It Works!


Thank you so much....
however, one question,
my default image appears for about a second or two, the screen then goes all white, and continues to load, then into Splash, game. I am wondering, is there a way to insure that the default.png or another image appears vs an all white screen?







Thank you so much I would like to pay you some how. My mom said she would bake you a cake. You could have that sent to you if you want. I can do electronic or real.





#37
09/29/2010 (7:35 pm)
Rennie, glad it is working :) To overcome the problem of the white screen you can set the background image of your MainWindow.xib to be your splash screen. This will then be seamless until you replace it with your menu etc.

I cant take any credit - it was my colleague An who figured out how to get it working, although the cake sounds tempting ;-)
#38
09/29/2010 (7:59 pm)
Hi Scott,
I have looked into dragging my default.png onto my window. I have done this via, opening the mainWindow.xib (double click in XCode). I Have a window that shows File's Owner, First Responder, Window and App Delegate. Anytime I drag the png onto it, nothing happens. Nor when I open the Window Identity. I am going to look into this a bit more online, I hate to ask for anything else.


As for the cake, if you want one, give me your address, renniemoffat@gmail.com and I will send you one, for real. What flavour do you like?
#39
09/29/2010 (8:09 pm)
Rennie, no cake required! but thankyou anyway. What I'd like most is to see your app up in the app store (and Marks!).

Here is the link for adding the background image:

www.torquepowered.com/community/forums/viewthread/117835
#40
09/29/2010 (8:16 pm)
Yah, thats the thread I was looking at.

No worries I wil fiddle with it.


Cheers Man, really appreciate it. Tell your friend too.




Page«First 1 2 Next»