1
我編碼一個遊戲的Mac在C++中,我得到一個SIGABRT和控制檯打印如下:的Mac:我得到SIGABRT但調用堆棧是沒用
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
what(): bad lexical cast: source type value could not be interpreted as target
Program received signal: 「SIGABRT」.
所以,我做一個糟糕的lexical_cast。但問題是我不知道在哪裏,因爲調用堆棧如下:
#0 0x7fff85fb629a in mach_msg_trap
#1 0x7fff85fb690d in mach_msg
#2 0x7fff81f58932 in __CFRunLoopRun
#3 0x7fff81f57dbf in CFRunLoopRunSpecific
#4 0x7fff88dba7ee in RunCurrentEventLoopInMode
#5 0x7fff88dba5f3 in ReceiveNextEventCommon
#6 0x7fff88dba4ac in BlockUntilNextEventMatchingListInMode
#7 0x7fff84f85e64 in _DPSNextEvent
#8 0x7fff84f857a9 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#9 0x7fff84f4b48b in -[NSApplication run]
#10 0x7fff84f441a8 in NSApplicationMain
#11 0x1000ef759 in os_gameMainLoop at main-osx.mm:22
#12 0x10009a97d in main at words.cpp:18
這不是正確的堆棧。
什麼是match_msg_trap?
我能接到這個調用堆棧嗎?
我有什麼方法可以在崩潰時獲得良好的調用堆棧嗎?
謝謝!
非常感謝!這是問題所在 – Damian 2011-04-08 11:14:05