-
Notifications
You must be signed in to change notification settings - Fork 7
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
fatal runtime error: IO Safety violation: owned file descriptor already closed #18
Comments
I just remembered another detail: before i added update and subscription checks, the app wasn't crashing, but the container that was supposed to hold the term view was empty. |
Ok, never mind, seems to be a NixOS devshell issue, cuz I just tried running it with |
Ok, no, it seems to be debug vs release builld issue, i tried running dev build through nix to check debug logs and was greeted witht the same error. On release builds it doesn't crash, but it is incredibly slow, my shell (nushell), isnt able to start up properly, it just hangs there, while other ui components are responsive. I'll try forcing it to be bash to see if that's related to my shell breaking the widget somehow. |
Bash works fine in release mode (I guess my nushell config does something the widget can't handle, that's on me), but it still crashes in debug mode. |
Just tried switching to stable... and it works. I guess I managed to find a compiler bug XD. Sorry again for disturbing. |
Looking at the core dump, it does seem to be coming from Alacritty. It's fixed (but I think not released to crates.io yet): alacritty/alacritty#7996 Core dump
|
Yep, I'm waiting for this fix will be appeared in crates.io (zed is also waiting). I can add version from target commit (like zed does). |
Hey, been trying to set the term view up but have been getting the error in the title. Coredump isn't helpful unfortunately, core rendering stuff and stacktrace im too dumb to decipher (pointers to memory in the binary im assuming, but idk how that would help in current situation), and
RUST_BACKTRACE=full
doesnt show anything either. I'm pretty much following the examples, i create and storeTerm
inApp
innew()
and pass reference to it from&self
toterm_view()
inview()
, check for events inupdate()
, closing window onShutdown
request, and doing the subscription thing as well.My theory is that the Fd gets dropped unexpectedly at some point but I can't figure out why since judging by the code (at first glance at least) and types used to store the Fd, it shouldn't happen? Mb I'm blind and missing some crucial step required to keep the descriptor alive, but as i said before, semantically my logic for handling Term is identical to the examples.
I will say that I don't store settings in
App
, but just generate them in separate function to immediately pass them toTerm
constructor (I'm planning to make some customizable behavior for opening new terminals, so i wanna generalize it under one function), which will get returned from said external function upon initialization. But I don't think this would cause the issue right?Does Rust stable/nightly matter? (I'm on nightly 2024-05-01). Also, in case it's useful, I'n on NixOS, using nix-cargo-integration flake template, with dependencies to run the application set up (checked before termview was added).
I thought that maybe it could've been alacritty crate that's at fault but I didn't find any issues regarding this error in their repo.
Thanks in advance!
The text was updated successfully, but these errors were encountered: