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

[BUG] Fatal crash when I return to joshuto from a shell #518

Open
Beethoven-n opened this issue Apr 1, 2024 · 4 comments
Open

[BUG] Fatal crash when I return to joshuto from a shell #518

Beethoven-n opened this issue Apr 1, 2024 · 4 comments

Comments

@Beethoven-n
Copy link
Contributor

this is hard to explain conversationally so i'll try laying it out

What's the bug?

If I run :shell zsh to start a shell session wherever I'm at, then do certain commands, I get this error:

thread 'main' panicked at src/ui/backend.rs:80:32:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It's testable with sudo -s, but I noticed it happening with lessc, so it can't just be involved with sudo.

How do I replicate it?

  1. Start joshuto
  2. do :shell <whatever shell you like>
  3. do sudo -s, then hit Ctrl-D twice to exit out of both the root shell and the shell joshuto spawned
  4. observe error

Context

Linux version: 6.8.2-arch2-1
joshuto --version output:

joshuto-0.9.8
branch:main
commit_hash:a103c886
build_time:2024-03-31 23:55:15 +00:00
build_env:rustc 1.77.1 (7cf61ebde 2024-03-27),stable-x86_64-unknown-linux-gnu

AUR package version: r1343.a103c88-1
Cargo version: 1.77.1

@Beethoven-n Beethoven-n changed the title [BUG] Fatal crash when I return to Joshuto from exiting a shell [BUG] Fatal crash when I return to joshuto from a shell Apr 1, 2024
@Akmadan23
Copy link
Contributor

This should be fixed by #515.

@Beethoven-n
Copy link
Contributor Author

can you reproduce the crash on your branch?

@Akmadan23
Copy link
Contributor

I reproduced it on the main branch, whereas on the patched branch joshuto displays the exit code of the shell and keeps going instead of crashing.

@Beethoven-n
Copy link
Contributor Author

with the merge, it's fixed!
bit of a note though, now it displays the exit code of the program. might have to fix that on my end for my use case but it sounds useful for pretty much every other case

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

2 participants