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
Windows & Android: "Close Content" crashes when the core uses RETRO_ENVIRONMENT_SET_AUDIO_CALLBACK with RETRO_ENVIRONMENT_SET_FRAME_TIME_CALLBACK #7647
Comments
When using "info sharedlibrary" on startup and when the segfault occurs I see that the library was relocated:
|
What game are you running through Lutro? I'm unable to replicate this issue on Linux. |
It works on Linux that's why I prefixed the issue with "Windows:"
iirc it was Tetris but shouldn't matter |
@Ghabry did you try it with 'wasapi' audio driver? |
Don't ask me which commit solved this but it works now for me with any audio backend. Except Dinothawr but this must be a different bug. 👍 |
Actually this was not really fixed, happened later again, maybe some race condition. Related issue: libretro/easyrpg-libretro#36 (comment) Workaround: RETRO_API void retro_unload_game() {
// Workaround a crash on Windows & Android because the callbacks are invoked after the DLL/SO was unloaded
static retro_audio_callback no_audio_callback_definition = {
nullptr,
nullptr
};
environ_cb(RETRO_ENVIRONMENT_SET_AUDIO_CALLBACK, &no_audio_callback_definition); cc @RobLoach |
Can second this is not resolved. This is probably why I'm having Access Violations whenever I move or resize RA's window while OBS is capturing RA via Game Capture, and likewise in the Lutro core if I move the windows around mid-sound effect then immediately select Close Content on the Quick Menu. I can reproduce the bug consistently on Windows 10. |
okay will reopen this. |
Because it affects all cores which use these APIs (RETRO_ENVIRONMENT_SET_AUDIO_CALLBACK with RETRO_ENVIRONMENT_SET_FRAME_TIME_CALLBACK) I assume this is a RetroArch bug.
Description
Load Content through Dinothwar, lutro or easyrpg and then press F1 and select "Close Content".
These are the only 3 cores which use that API.
Stacktrace:
Only the first function on the stackframe is from the core, the rest on the stackframe is RetroArch. The crash is at the prolog of the function which means the memory is unmapped (DLL unloaded?). I can't even read any core variable through gdb, just get "Cannot access memory".
I guess audio_driver_callback should stop invoking the audio callback after unloading the core, but I'm not familiar enough with the code to fix this on my own.
Dinothwar (no idea why, i have symbols loaded)
Lutro
Easyrpg core shows this:
Version/Commit
Environment information
The text was updated successfully, but these errors were encountered: