0





61
1

for example:below call stack

call stack unwind stop at CFRunLoopRunSpecific, why it does not unwind until main, even empty?

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x36398848 __kill + 8
1   FrogFinder                      0x000b5034 0x69000 + 311348
2   CoreFoundation                  0x3447e980 __handleUncaughtException + 68
3   libobjc.A.dylib                 0x346ce2ca _objc_terminate + 122
4   libc++abi.dylib                 0x338a33be _ZL19safe_handler_callerPFvvE + 70
5   libc++abi.dylib                 0x338a344a std::terminate() + 14
6   libc++abi.dylib                 0x338a481e __cxa_rethrow + 82
7   libobjc.A.dylib                 0x346ce22e objc_exception_rethrow + 6
8   CoreFoundation                  0x343d453e CFRunLoopRunSpecific + 398
9   CoreFoundation                  0x343d439e CFRunLoopRunInMode + 98
10  GraphicsServices                0x30c58fc6 GSEventRunModal + 150
11  UIKit                           0x3785573c UIApplicationMain + 1084
12  FrogFinder                      0x0006a7e6 0x69000 + 6118
13  FrogFinder                      0x0006a7a4 0x69000 + 6052
Question author User3599379 | Source

0


1

But the backtrace you copied here does go all the way to main. What is your question exactly? If your question is: "why doesn't the exception go all the way to main?" Then the answer is that CFRunLoop installs a catch-all handler. I believe for both Objective-C and C++ exceptions.

Answer author Steven-kramer

Ask about this question here!