You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by AlexanderHarrison November 9, 2024
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 the EventHandlerData, and somehow we are not dropping the RefMut 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 dropping RefMut. 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.
@AlexanderHarrison: Since I cannot run your sample code (it is not a minimum reproducible one), it's a bit hard to test.
What Winit version are you using? (I'm assuming v0.30.5?) And could you try it on the latest master? And could you post the backtrace (set RUST_BACKTRACE=1)?
EDIT: Wait nevermind, you said you're limited in the amount of debugging... Hmm...
Yes, inside Ctx::new I'm initiating a wgpu context and creating a surface using window, then setting the window icon, and finally configuring the surface with the result of window.inner_size().
Discussed in #3990 by @AlexanderHarrison
Originally posted by AlexanderHarrison November 9, 2024
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.
The text was updated successfully, but these errors were encountered: