backtrace-labs / crashpad

A fork of Crashpad with file attachment support and other improvements.
Apache License 2.0
100 stars 31 forks source link

Backtrace error.message does not reflect assert #49

Open alecazam opened 1 year ago

alecazam commented 1 year ago

This is the error.message recorded from an abort. But the prior command to this abort was an assert with useful text. Can we override this? And why does this default string contain a formatting token?

error.message samples: STATUS_FATAL_APP_EXIT: {Fatal Application Exit} %hs <- reported from stack below EXCEPTION_ACCESS_VIOLATION_WRITE EXCEPTION_ACCESS_VIOLATION_READ EXCEPTION_BREAKPOINT

Is this mangled string supposed to be what we see in traces. Most crash reports skip some number of stack levels to report what is at 03.

[ 00 ] ??$FromPointerCast@_KPEAU_EXCEPTION_POINTERS@@@crashpad@@YA_KPEAU_EXCEPTION_POINTERS@@@Z
[ 01 ] raise(int) ( signal.cpp:547 )
[ 02 ] abort() ( abort.cpp:71 )
[ 03 ] VulkanRenderer::CreateTexture(char const *,TextureDescriptor const &) ( VulkanRenderer.cpp:5969 ) <- our code
alecazam commented 1 year ago

For now, we'll just record file/line message of the assert in simple_annotations(). But I'd still like to know if we can override error.message so that becomes the bug title.

alecazam commented 1 year ago

Seems like we can override error.message and have it reflect our "file:line: msg"