I was running the core on iOS, and noticed that it would crash on saving the state. I compiled the core with DEBUG=1, and ran RetroArch in Xcode with exception breakpoints set so I can see where in the code the crash was happening.
From the stack trace, it cannot get a mutex lock on the file handle. I don't know why that's happening, but I suspect that this is happening only in libretro builds, and it looks like it's happening for other platforms on libretro as well.
I removed the fileno call for libretro, and it results in saving states successfully. I was able to load states successfully as well.
I was running the core on iOS, and noticed that it would crash on saving the state. I compiled the core with
DEBUG=1
, and ran RetroArch in Xcode with exception breakpoints set so I can see where in the code the crash was happening.It crashes here: https://github.com/AZO234/NP2kai/blob/master/sdl/dosio.c#L298
It crashes on executing the
fileno
command:From the stack trace, it cannot get a mutex lock on the file handle. I don't know why that's happening, but I suspect that this is happening only in libretro builds, and it looks like it's happening for other platforms on libretro as well.
I removed the
fileno
call for libretro, and it results in saving states successfully. I was able to load states successfully as well.