Closed ehaupt closed 4 months ago
Hi.
I can't trigger this crash on my Ubuntu test machine, but I found out that I had commented out the MIDI callback initialization code... Not that it should fix your issue, but it's pretty serious anyway. 🤣
Thank you for the update and for checking the issue on your Ubuntu setup!
To make things as easy as possible, I'm willing to set up a virtual FreeBSD image complete with a desktop environment and all the necessary tools for building and testing. This could help you avoid any extra setup on your side and jump straight into resolving the issue. If this sounds good to you, I can get everything ready and send it your way.
Just let me know if you’re interested, and I'll take care of the preparations.
I'm pretty sure the crash comes from the MIDI initialization thread. It even crashes on Windows XP, but works fine on Windows Vista and later. The reason I put the MIDI init in its own thread is because it can take several seconds on macOS. Maybe I should init it in the main thread, and only do the threaded solution (nasty) on macOS instead.
And yes, it may sound strange that it could come from the MIDI init thread when it worked in v1.80, but I think it's extremely sensitive to timing (the amount of code executed after thread is started).
Can you try to comment out line 235 to 247 (all of them) in current ft2_main.c from the github repo, and see if it still crashes when loading a module through the command line parameter?
EDIT: As this test requires the latest github code (not the code from "Releases"), make sure you try the code as is to make sure you're not trying to fix something that fixed itself. 😏
Can you try to comment out line 235 to 247 (all of them) in current ft2_main.c from the github repo, and see if it still crashes when loading a module through the command line parameter?
As usual, you were right :smile:
Commenting those lines from rev d12b46e 'fixes' the issue.
Argh... Almost tempting to remove MIDI support alltogether, as all it does is causing issues!
Definitely tempting.
OK I'll try the threaded method for macOS only, as a last resort. I haven't had any crashes on Mac so far, so maybe it's "safe" to do it there. I'll make a new version later today.
Sounds like a good plan! I really appreciate you taking the time. Looking forward to testing the new version.
Ok I have released v1.82 now. Could you test it out and see if the problem still persists?
I am happy to report that v1.82
has solved the problem. Thank you!
After updating from version
v1.80
tov1.81
, the following regression occurs:The audio track plays normal but 'Error' box appears:
As soon as OK is pressed the player crashes:
Here is what I get from gdb:
The following SDL versions are present on the system: