sentry-native icon indicating copy to clipboard operation
sentry-native copied to clipboard

Sentry-native catch exception stacktrace

Open junhuplim opened this issue 3 years ago • 1 comments

Description

When capturing an exception with sentry-native, it claims that it is unable to find the debug info file of my executable with debug id 0000000-0000-0000-0000-000000000

2 things;

  1. i have uploaded my debug info files and when an exception is 'auto-captured' via throw exception and not with sentry, it manages to find the correct debug info file with the right debug id and shows its stacktrace.

  2. my debug info file debug id is not 0000000-0000-0000-0000-000000000, and it seems like when manually capturing the exception and creating a new stacktrace as shown in code, it generates a debug id full of 0s instead of the correct one.

i compared the event payload json file, and for the event of capturing an exception that generates the debug id of 0s, there is no code_id in debug_meta info, while code_id exists when exception is 'auto-captured'.

When does the problem happen

  • [] During build
  • [] During run-time
  • [x] When capturing a hard crash

Environment

  • OS: Linux
  • Compiler: [e.g. MSVC 19]
  • CMake version and config: 3.18.4, SENTRY_BACKEND=(i am not sure)]

Steps To Reproduce

sentry_value_t exc = sentry_value_new_exception("dummyexception, "dummy");
sentry_value_t stacktrace = sentry_value_new_stacktrace(NULL, 0);
sentry_value_set_by_key(exc, "stacktrace", stacktrace);

sentry_value_t event = sentry_value_new_event();
sentry_event_add_exception(event, exc);
sentry_capture_event(event);

Log output

junhuplim avatar Mar 17 '22 04:03 junhuplim

You noted that you are on Linux, and manually capturing an event via sentry_capture_event. By "auto-captured", you probably mean a hard crash (unhandled exception) that is captured with the crash reporting backend (by default breakpad on linux)?

Can you tell us which Sentry version you are running? There were a few changes to the "module finder" that captures these debug IDs recently. And are you running the app in a container?

Swatinem avatar Mar 17 '22 09:03 Swatinem

Closing since there was no response for over a year. Feel free to reopen if the problem reoccurs.

supervacuus avatar May 06 '23 08:05 supervacuus