MacOS panic: "tried to handle event while another event is currently being handled" #3990
Replies: 1 comment
-
Opened as an issue instead: #3992 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm running into the aforementioned error on startup on macos. Linux and windows both work fine. I couldn't find any information about this error, or find anyone who has run into it before.
Unfortunately, I am relying on the help of a volunteer to compile on macos, so I am very limited in the amount of debugging I can do myself.
From looking at the winit source, it looks like each event call borrows a
RefCell
of theEventHandlerData
, and somehow we are not dropping theRefMut
before handing another event. The comment states that the panic "avoids re-entrancy". I assume that one of my handled events is somehow causing the event loop to handle another event, before droppingRefMut
. Would this be caused by a method call into the event loop? Or a some method on the window? Not sure, I would love a pointer as to how this panic could come about.Here's the (abridged) structure of my app. I don't think I'm doing anything crazy.
Beta Was this translation helpful? Give feedback.
All reactions