Uncaught C++ exception has no message in crash log (.ips)

We've got an uncaught C++ exception caused crash. Two versions of the same product, one is arm64 another is x86_64, same bug, same crash, two reports. One from arm64 has a message

Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               0

Date/Time:             2023-01-26 09:23:24.8975 +0200
OS Version:            macOS 12.2.1 (21D62)
Report Version:        12

Crashed Thread:        18  Dispatch queue: NEFlow queue

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called
terminating with uncaught exception of type std::__1::regex_error: One of *?+{ was not preceded by a valid regular expression.

and another one doesn't

Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               0

Date/Time:             2023-01-26 05:40:35.2732 -0500
OS Version:            macOS 12.5.1 (21G83)
Report Version:        12

Crashed Thread:        19  Dispatch queue: NEFlow queue

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called

The first one is immensely helpful just because of the reference to std::regex and another one is close to useless. Crashed thread is identical in both cases:

0   libsystem_kernel.dylib        	    0x7ff80ef6300e __pthread_kill + 10
1   libsystem_pthread.dylib       	    0x7ff80ef991ff pthread_kill + 263
2   libsystem_c.dylib             	    0x7ff80eee4d24 abort + 123
3   libc++abi.dylib               	    0x7ff80ef55082 abort_message + 241
4   libc++abi.dylib               	    0x7ff80ef461a5 demangling_terminate_handler() + 242
5   libobjc.A.dylib               	    0x7ff80ee42e19 _objc_terminate() + 104
6   libc++abi.dylib               	    0x7ff80ef544a7 std::__terminate(void (*)()) + 8
7   libc++abi.dylib               	    0x7ff80ef54458 std::terminate() + 56
8   libdispatch.dylib             	    0x7ff80ede232b _dispatch_client_callout + 28
9   libdispatch.dylib             	    0x7ff80ede8317 _dispatch_lane_serial_drain + 672
10  libdispatch.dylib             	    0x7ff80ede8dfd _dispatch_lane_invoke + 366
11  libdispatch.dylib             	    0x7ff80edf2eee _dispatch_workloop_worker_thread + 753
12  libsystem_pthread.dylib       	    0x7ff80ef95fd0 _pthread_wqthread + 326
13  libsystem_pthread.dylib       	    0x7ff80ef94f57 start_wqthread + 15

There is no mentioning of string "regex" anywhere else in crash logs in backtraces or remaining parts. So the exception message here is the most important piece of information and yet it's mysteriously missing in one crash log and present in another. Any idea why the very same exception message is not always logged?

There is a long-standing issue with Apple’s crash reporter being unable to log useful information for C++ exceptions. See this post and the other posts on that thread.

It’s interesting that you’re seeing architecture-specific differences here. If that reproduces on macOS 13, I encourage you to file a bug against the Intel side of it.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Uncaught C++ exception has no message in crash log (.ips)
 
 
Q