1

I'm getting an error very rarely in my game and I'm trying to determine which runAction is conflicting with an action already in progress. I know I just need to stop a previous action, but can't determine which action is trying to run.

Can anyone give me advice on how to see earlier in the backtrace or navigate to a more useful area since most of the backtrace is just throwing the error and I want to see what is happening before the error gets thrown?

Here is my error and backtrace to help give some context.

NOTE: I'm a noob when it comes to LLDB!

2012-10-01 19:44:27.000 Game Name[19255:907] *** Assertion failure in -[CCActionManager addAction:target:paused:], /Users/username/Documents/Development/Sandbox/Game Name/libs/cocos2d/CCActionManager.m:177
2012-10-01 19:44:27.004 Game Name[19255:907] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'runAction: Action already running'
*** First throw call stack:
(0x392b83e7 0x354b6963 0x392b829d 0x356647b3 0x2799d 0x497d7 0xb732d 0xede1b 0x3569ce67 0x3928d857 0x3928d503 0x3928c177 0x391ff23d 0x391ff0c9 0x313fb33b 0x39380289 0xaf0a1 0x12ee0)
libc++abi.dylib: terminate called throwing an exception

Here is the backtrace which doesn't show back far enough or I just don't know how to navigate to the right place?

(lldb) thread list
Process 19255 stopped
* thread #1: tid = 0x2403, 0x39bf9350 libsystem_kernel.dylib`__pthread_kill + 8, stop reason = signal SIGABRT
  thread #4: tid = 0x2903, 0x39bf9d98 libsystem_kernel.dylib`__workq_kernreturn + 8
  thread #9: tid = 0x2c03, 0x39bf9d98 libsystem_kernel.dylib`__workq_kernreturn + 8
  thread #7: tid = 0x2d03, 0x39bf96a4 libsystem_kernel.dylib`__semwait_signal + 24
  thread #8: tid = 0x2e03, 0x39be95d0 libsystem_kernel.dylib`kevent64 + 24
  thread #10: tid = 0x2f03, 0x39be8e30 libsystem_kernel.dylib`mach_msg_trap + 20
  thread #11: tid = 0x3003, 0x39be8e30 libsystem_kernel.dylib`mach_msg_trap + 20
  thread #12: tid = 0x3103, 0x39bf9594 libsystem_kernel.dylib`select$DARWIN_EXTSN + 20
  thread #13: tid = 0x3203, 0x39be8e30 libsystem_kernel.dylib`mach_msg_trap + 20
  thread #14: tid = 0x3303, 0x39be8e30 libsystem_kernel.dylib`mach_msg_trap + 20
  thread #15: tid = 0x233f, 0x39bf9d98 libsystem_kernel.dylib`__workq_kernreturn + 8

(lldb) thread backtrace
* thread #1: tid = 0x2403, 0x39bf9350 libsystem_kernel.dylib`__pthread_kill + 8, stop reason = signal SIGABRT
    frame #0: 0x39bf9350 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x39a4ffb6 libsystem_c.dylib`pthread_kill + 58
    frame #2: 0x39a8c36a libsystem_c.dylib`abort + 94
    frame #3: 0x3504edde libc++abi.dylib`abort_message + 74
    frame #4: 0x3504c098 libc++abi.dylib`default_terminate() + 24
    frame #5: 0x354b6a5a libobjc.A.dylib`_objc_terminate() + 146
    frame #6: 0x3504c11a libc++abi.dylib`safe_handler_caller(void (*)()) + 78
    frame #7: 0x3504c1b4 libc++abi.dylib`std::terminate() + 20
    frame #8: 0x3504d62a libc++abi.dylib`__cxa_rethrow + 94
    frame #9: 0x354b69b4 libobjc.A.dylib`objc_exception_rethrow + 12
    frame #10: 0x391ff2a0 CoreFoundation`CFRunLoopRunSpecific + 456
    frame #11: 0x391ff0c8 CoreFoundation`CFRunLoopRunInMode + 104
    frame #12: 0x313fb33a GraphicsServices`GSEventRunModal + 74
    frame #13: 0x39380288 UIKit`UIApplicationMain + 1120
    frame #14: 0x000af0a0 Game Name`main + 100 at main.m:14

I've seen people talking about "moving up a couple stacks to get to the root item" and have no idea how to move up stacks?

Any help, suggestions, or pointers would be greatly appreciated! Thanks in advance!

4

2 回答 2

2

尝试让 Xcode 在你的程序中放置一个异常断点——你应该能够在抛出异常时捕获它。在 Xcode 中,查看 > 导航器 > 显示断点导航器,点击 + 按钮添加新断点,您可以在“添加异常断点”和“添加符号断点”之间进行选择(后者是 main() 上的断点或其他)。

于 2012-10-02T02:55:00.290 回答
0

问题

如何导航堆栈帧以使用 LLDB 跟踪 xCode 中调用的原始行

解决方案

在 Xcode 中打破异常后,您可以通过键入单词“up”或“down”(不带引号)然后按 [enter] 键来向上/向下导航堆栈帧。调试器将一次一步导航到适当的帧。您可能还想查看日志导航器以查看调试会话的完整历史记录 (⌘ + 8)。

于 2014-03-19T18:23:49.127 回答