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
I'm trying to implement something using SDL timers, but I was getting a segfault whenever the timer first triggered. I've got this down to a fairly small failing example:
sdl-experiment: schedule: re-entered unsafely.
Perhaps a 'foreign import unsafe' should be 'safe'?
This also occurs if I try to use the raw API, but does not occur if I try to port this to C.
Note that in my original larger example, I only got Segmentation fault (core dumped) as the error message, so there might be more than one thing going on here.
GHC 8.10.7, sdl2 Haskell library version 2.5.3.0, SDL2 C library 2.0.14, NixOS
The text was updated successfully, but these errors were encountered:
Oops, that's no good! Would you be able to try GHC's suggestion of changing the FFI imports to be safe? I imagine something addTimer uses is causes this re-entrance
I can't find anything called schedule. Explicitly marking safe all the FFI calls that addTimer seems to use (addTimerFFI, removeTimerFFI, mkTimerCallback) doesn't seem to help at all.
Hmmm, possibly initialize itself then? Other than that, it can only imagine it's how we create the callback, but I'll have to get into the code to understand that
I'm trying to implement something using SDL timers, but I was getting a segfault whenever the timer first triggered. I've got this down to a fairly small failing example:
This fails with
This also occurs if I try to use the raw API, but does not occur if I try to port this to C.
Note that in my original larger example, I only got
Segmentation fault (core dumped)
as the error message, so there might be more than one thing going on here.GHC 8.10.7, sdl2 Haskell library version 2.5.3.0, SDL2 C library 2.0.14, NixOS
The text was updated successfully, but these errors were encountered: