-
Notifications
You must be signed in to change notification settings - Fork 568
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The SHOW_OPEN_PANEL command panics on gtk #571
Comments
interesting. That comment refers to an attempt to avoid this problem; instead of holding the borrow we clone the handle and release the borrow before we try to show the open panel, but it's very possible that I messed something else up in that refactor. Does everything work in 94ebecd? |
It also crashes on that branch, with the same error. Here's a minimal version. I'm not really familiar with RC, but it looks like maybe we're still in the scope of the borrow from the button release event on line 53 of the trace above? |
yea, there's something quite broken in the gtk backend on master, I haven't had a chance to really dig into it (and probably actually won't for a few weeks 😢) |
reproduced sample in a project to work on it https://github.com/Dmitry-Borodin/druid/blob/crashfix-gtk-open-panel/druid/examples/crash_show_open_panel.rs |
Panic happening because we borrowing Handle in
Everything works as it should. |
I tried that as well, but the borrow was to fix the bug in the gif on #552. I think it only feels good for the file dialog because the window is being replaced. It looks like there might be a more fundamental problem that one callback triggering another callback is going to have this problem in general. |
I ran into a similar (but not identical) double-borrow-mut error while trying to show the save panel. The relevant part of the backtrace follows, and the borrow_mut is first taken in frame 61, and then again in frame 16.
|
This is where the panic happens. I'm not sure what the real root cause is. That code is new from #552, but this comment looks suspicious.
backtrace:
The text was updated successfully, but these errors were encountered: