如何检测应用程序崩溃的原因?

时间:2018-03-02 06:44:42

标签: c++ macos crash-reports

我稍微修改了PostgreSQL odbc驱动程序,内置在Mac OS X上,然后运行iODBC管理员,它与dump崩溃了:

Process:               iODBC Administrator64 [2817]
Path:                  /Applications/iODBC/iODBC Administrator64.app/Contents/MacOS/iODBC Administrator64
Identifier:            org.iodbc.iODBCAdministrator64
Version:               iODBC Administrator64 version 3.52.12 (3.52.12)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           iODBC Administrator64 [2817]

OS Version:            Mac OS X 10.13.3 (17D102)
Report Version:        12
Anonymous UUID:        EBAEDCCA-DFB6-7D4B-77DE-98E6D56BD279


Time Awake Since Boot: 6000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000068
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x68:
--> 
    __TEXT                 0000000104715000-0000000104719000 [   16K] r-x/rwx SM=COW  /Applications/iODBC/iODBC Administrator64.app/Contents/MacOS/iODBC Administrator64

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_c.dylib               0x00007fff5b869ea9 flockfile + 18
1   libsystem_c.dylib               0x00007fff5b87292d vfprintf + 24
2   pgodbc.so                       0x000000010a0aa248 mylog + 408
3   pgodbc.so                       0x000000010a057e3a PGAPI_AllocEnv + 42
4   pgodbc.so                       0x000000010a0a108c SQLAllocHandle + 76
5   org.iodbc.core                  0x0000000104746079 _iodbcdm_driverload + 1113
6   org.iodbc.core                  0x0000000104748345 SQLDriverConnect_Internal + 
  1. 如何理解崩溃的原因是什么?
  2. 是否可以在Mac OS X上使用try {} catch(...){}来处理此类异常?它会抓住它们吗?

0 个答案:

没有答案