【发布时间】:2012-01-01 18:55:59
【问题描述】:
我的应用程序没有错误、警告或内存泄漏,在模拟器上运行完美,但在运行 iOS 5 的 iPhone 4 上出现黑屏。SIGABRT 发生在这条线的 main 中:
int retVal = UIApplicationMain(argc, argv, nil, nil);
既然我的代码看起来没问题,有谁知道一般什么样的事情会导致这种行为?
我还能在哪里查找可能的错误?我得到的对这个SIGABRT 的所有引用都在汇编中...... 0.o
编辑: 调试器的输出:
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
sharedlibrary apply-load-rules all
target remote-mobile /tmp/.XcodeGDBRemote-4281-83
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
[Switching to process 7171 thread 0x1c03]
[Switching to process 7171 thread 0x1c03]
Couldn't register BearNun.Stack-Meet-App with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.(gdb)
不确定另一个进程将在哪里运行...我从 iPhone 中删除了该应用程序,清理了我的项目,然后再次运行它(一旦停止按钮变灰,我认为这意味着程序中没有进程正在运行)。
【问题讨论】:
-
没有 iPhone 模拟器之类的东西。您指的是 iOS Simulator,它与模拟器有很大不同(也就是说,如果它是模拟器,那么它的行为与设备相同(除非出现错误))。跨度>
-
您能否添加崩溃发生位置的完整回溯?只需在调试器控制台中输入
bt并将输出粘贴到此处即可。 -
嘿,在原始帖子的编辑中添加了调试器输出,因为这里没有足够的空间。
标签: iphone objective-c xcode crash ios5