I'm testing a pretty simple app. It runs OK on both simulator and iPhone device, both release and debug. However, it just started doing a buggy exit behavior when running on the simulator.
I added an Icon.png and Default.png (both of which are found and displayed OK) just before this behavior started. I can't guarantee that it didn't/wouldn't have behaved this way before I added the PNGs, but I believe it worked OK before I added them.
Here's what happens. If I run the app from Xcode on the iphone simulator (generally using 3.0) then it launches OK, displays the Default.png splash screen and then draws the GUI briefly. Then the app quits with a SIGTRAP in the debugger console. This only happens if breakpoints are turned OFF. When I have them on, the launch goes OK, and the app runs normally. After app is loaded in simulator (and aborts), I can touch the app icon and it launches and runs OK. When I launch with breakpoints on, launch is OK, and I can turn them off and app continues to run normally.
This does not happen on the device at all.
Is this a known bug/feature? I haven't restarted Xcode or the simulator. That might fix things. Wait, let me try that.
OK, quitting the simulator and relaunching did not fix things. Quitting both simulator and Xcode makes things run OK now.
Here's the debugger console output for an aborted run and a successful launch with breakpoints turned on:
[Session started at 2010-07-08 15:22:51 -0700.]
dyld: Library not loaded: /System/Library/Frameworks/UIKit.framework/UIKit
Referenced from: /Users/kenlindsay/dev/CocoaDev/iPhone_dev/LabelTest/build/Debug-iphonesimulator/LabelTest.app/LabelTest
Reason: image not found
The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).
[Session started at 2010-07-08 15:23:44 -0700.]
GNU gdb 6.3.50-20050815 (Apple version gdb-967) (Tue Jul 14 02:11:58 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 14081.
Pending breakpoint 5 - ""LabelTestAppDelegate.m:20" resolved
Pending breakpoint 6 - ""LabelTestView.m:78" resolved
Pending breakpoint 7 - ""LabelTestView.m:29" resolved
Pending breakpoint 8 - ""LabelTestView.m:100" resolved
Pending breakpoint 1 - ""LabelTestViewController.m:48" resolved
Pending breakpoint 2 - ""LabelTestViewController.m:48" resolved
Pending breakpoint 3 - ""LabelTestView.m:18" resolved
Pending breakpoint 4 - ""LabelTestViewController.m:18" resolved
(gdb) c
Continuing.
Current language: auto; currently objective-c
(gdb) c
Continuing.