Opened 14 months ago

Closed 5 months ago

#9630 closed defect (fixed)

SDL2: Crashes when using MT-32 emulation

Reported by: domino1983 Owned by: wjp
Priority: normal Component: --Unset--
Keywords: Cc:


The latest Win32 daily build (October 24, 2016, 10:34 pm) seems to have problem with that game. It crashes when trying to start. It's CD/DOS/English version.
It works without problems with latest official build and it worked without problems with some older daily build (week ago).

Change History (10)

comment:1 Changed 14 months ago by Kirben

The crash is caused by SDL 2.0.5. but I'm unable to get a useful back trace via MinGW.

comment:2 Changed 14 months ago by OmerMor

I tried to build from the source w/VS2015 using the wiki instructions, but it appears to be using SDL1 and not SDL2.

If you could update the instructions, I would be able to help get a stack trace.

comment:3 Changed 14 months ago by dreammaster

That's correct. Although support for SDL2 has been added previously, by LordHoto I think, I'm pretty sure it does indeed still link to SDL1. Given the recent problems with SDL2, I didn't see much point in updating the project creation to use SDL2 by default yet.

You should be able to go to dists/msvc14/create_msvc14.bat, and copy either of the stable or all engines lines that call create_project, and simply add "-use-sdl2" as an extra parameter. From memory, that should allow you to generate project files that link against SDL2. As has been previously mentioned, SDL 2.0.4 DLL is being provided with the libs package, so you'd also need to get the 2.0.5 and replace the DLL.

Last edited 14 months ago by wjp (previous) (diff)

comment:4 Changed 14 months ago by wjp

I think the MT-32 emu might be calling OSD functions in the audio thread. (See also #9609)

comment:5 Changed 14 months ago by criezy

If OSD is the issue then PR 855 should fix it. I was planning to merge it into master this weekend (after taking the time to look at the comment from fuzzie) but not into the 1.9 branch since cloud is not enabled there anyway. But if this fixes this bug I will revise that plan.

comment:6 Changed 14 months ago by Kirben

I tried adding ​PR 855, but the crash still occurs.

comment:7 Changed 10 months ago by Kirben

Component: Engine: Kyra--Unset--
Game: Kyrandia 1
Summary: KYRA: Legend of Kyrandia Book I crashes when using MT-32 emulationSDL2: Crashes when using MT-32 emulation

comment:8 Changed 10 months ago by eriktorbjorn

There's also this SDL bug:

So presumably it will work with their next release, whenever that is.

comment:9 Changed 10 months ago by wjp

Munt 2.0.3 also reduces its stack footprint ( ). I've now updated our internal version to this, so hopefully this is now resolved, even with SDL-2.0.5.

comment:10 Changed 5 months ago by csnover

Owner: set to wjp
Resolution: fixed
Status: newclosed

I have not seen any reports of this being a problem since the Munt update, so I’m going to mark this ticket as resolved for now. Please feel free to comment or reopen if anything changes.

Note: See TracTickets for help on using tickets.