Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing panic line when running app in release mode #693

Open
gdesmott opened this issue Oct 3, 2024 · 0 comments
Open

Missing panic line when running app in release mode #693

gdesmott opened this issue Oct 3, 2024 · 0 comments

Comments

@gdesmott
Copy link

gdesmott commented Oct 3, 2024

Environment

Using crate sentry 0.34.0

Steps to Reproduce

Run the following test app in release mode.

fn main() {
    let _guard = sentry::init(("XXX", sentry::ClientOptions {
    release: sentry::release_name!(),
    ..Default::default()
  }));

    let a = None::<bool>;
    #[allow(clippy::unnecessary_literal_unwrap)]
    a.unwrap();
}

Expected Result

The app crashes and provides the line with the failing assertion:

thread 'main' panicked at src/bin/sentry.rs:9:7:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This line should be part of the sentry crash report.

Actual Result

Unfortunately the line is missing from the report:

Image

Note that it works fine when running in debug mode:

Image

At the very least the release report should have the line where the assertion failed as it's part of the crash output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant