RUST_BACKTRACE=1 did not work

Rust version: 1.39.0

When I ran my program before enabling the trace env. variable, I got this error.

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }', src/libcore/result.rs:1165:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
Error: Os { code: 98, kind: AddrInUse, message: "Address already in use" }

Then I enabled the trace by setting the env. variable:

RUST_BACKTRACE=1 cargo run -- -p 3100

There is no trace showing up, and the error is shorter:

Error: Os { code: 98, kind: AddrInUse, message: "Address already in use" }

In what cases, RUST_BACKTRACE=1 would not work?

Are you sure that the last line of the first error doesn't come from some println in another thread? It looks like the panic didn't happen on the second run.

1 Like

Are you still having this issue? I am. Rust 1.39.0. Running a debug build directly like so:

RUST_BACKTRACE=1 target/debug/nu

And when it crashes, I don't get a backtrace.

My main shell is Fish but I've also tried from a Bash subshell. No luck. This used to work but no longer does.

Thanks.

What does it print when it crashes? Do you know whether it's hitting a panic, or some other type of crash?


nolan@desktop:~/src/nushell$ RUST_BACKTRACE=1 target/debug/nu
/home/nolan/src/nushell(master)> ls
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', 
/rustc/
0de96d37fbcc54978458c18f5067cd9817669bc8/src/libcore/macros/mod.rs:15:40
note: run with `RUST_BACKTRACE=1` environment variable to display a 
backtrace.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.