Skip to content

Missing panic line when running app in release mode #693

@gdesmott

Description

@gdesmott

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingCoreCore features of the SDK

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions