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
ghcup tui
reliably segfaults if you hit Enter before it starts the TUI
#887
Comments
Can't reproduce on the released version (0.1.19.4). I can't seem to hit Enter fast enough. :D I tried with Running 0.1.19.4 on the |
Actually I seem to have 0.1.19.5, and moving it out of the way and running I also note that, while it didn't draw the TUI, it did change terminal modes (I need to |
I ran that on an empty Docker container and ended up with 0.1.19.4, which is one minor version less than what you're getting. Is it you that's on a prerelease channel somehow? :P |
I am, yes (for ghc prereleases), that was why I asked about it. |
There's unsafe code in the TUI. We use unsafePerformIO for some state: ghcup-hs/app/ghcup/BrickMain.hs Line 606 in 371eda9
@geekosaur can you try the TUI rewrite at #850 |
I notice CI didn't seem to like it either, although I have not checked to see if it had the same failures. |
I switched back to
I must admit I can't think of a reason why an extra Enter would cause |
This is looking bad; the address is different every time I run it, suggesting it's C heap corruption. The most recent crash was post- |
So we did some debugging:
|
He also had me try with the non-threaded runtime, but that just revealed that |
I can reproduce. I tested against #850 and it also exhibits the same issue. I'm concluding this isn't due to GHCup's code. |
I think it's actually |
@hasufell Yeah, unfortunately, I believe this is a |
@jtdaugherty is there a ticket or, even better, minimal reproducer? |
@bgamari there is now a ticket with a minimal example here: jtdaugherty/vty#266 |
A fix for this issue has been released in |
Sadly gdb shows nothing interesting:
This is ghcup 0.1.19.5 on Ubuntu 22.04.2 x86_64.
The text was updated successfully, but these errors were encountered: