Opened 12 months ago

Last modified 12 months ago

#15927 new defect

AUDIO: MidiPlayer::createDriver() assert in DW1 with gm_device=mac

Reported by: dwatteau Owned by:
Priority: normal Component: Audio
Version: Keywords: gm_device
Cc: Game: Discworld

Description (last modified by dwatteau)

With ScummVM 2.9.0 and current Git HEAD.

It's been reported on the #ios-support Discord channel, with the dw.gra: c8808ccd988d603dd35dff42013ae7fd Discworld 1 CD/DOS/English release. I can also reproduce it on Intel x64 with the similar dw.gra CD/DOS/French release I have.

Steps to reproduce:

  • Build with debug support
  • Have gm_device=mac set in your ScummVM config
  • Start the game

The following crash will happen:

User picked target 'dw-cd-fr' (engine ID 'tinsel', game ID 'dw')...
Running Discworld (CD/DOS/French)
dw.gra: c8808ccd988d603dd35dff42013ae7fd, 781656 bytes.
english.smp: 4710bd5cc788df1d517370d43abe1101, 343755891 bytes.
french.txt: e7020d35f58d0d187052ac406d86cc87, 271514 bytes.
german.txt: 4b9ee3e2ed0f7500d31430ac80c8368e, 261734 bytes.
italian.txt: 15f0703f85477d7fab4280bf938b61c1, 237774 bytes.
spanish.txt: c324170c3f1922c605c5cc09ba265aa5, 234618 bytes.
Assertion failed: (_driver), function createDriver, file midiplayer.cpp, line 65.
Process 9577 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = hit program assert
    frame #4: 0x000000010037b16a scummvm`Audio::MidiPlayer::createDriver(this=0x0000600003b0a760, flags=5128) at midiplayer.cpp:65:2
   62          _nativeMT32 = ((MidiDriver::getMusicType(dev) == MT_MT32) || ConfMan.getBool("native_mt32"));
   63      
   64          _driver = MidiDriver::createMidi(dev);
-> 65          assert(_driver);
   66          if (_nativeMT32)
   67              _driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
   68      }
Target 0: (scummvm) stopped.

(lldb) bt
  * frame #4: 0x000000010037b16a scummvm`Audio::MidiPlayer::createDriver(this=0x0000600003b0a760, flags=5128) at midiplayer.cpp:65:2
    frame #5: 0x00000001000876de scummvm`Tinsel::MidiMusicPlayer::MidiMusicPlayer(this=0x0000600003b0a760, vm=0x0000000102042070) at music.cpp:502:16
    frame #6: 0x00000001000877cd scummvm`Tinsel::MidiMusicPlayer::MidiMusicPlayer(this=0x0000600003b0a760, vm=0x0000000102042070) at music.cpp:421:52
    frame #7: 0x00000001000d0a96 scummvm`Tinsel::TinselEngine::run(this=0x0000000102042070) at tinsel.cpp:1002:19
    frame #8: 0x000000010001914b scummvm`runGame(enginePlugin=0x00006000002135e0, system=0x0000000102104080, game=0x00007ff7bfefd690, meDescriptor=0x0000000102037980) at main.cpp:311:33
    frame #9: 0x0000000100016f16 scummvm`scummvm_main(argc=1, argv=0x00007ff7bfeff738) at main.cpp:796:13
    frame #10: 0x000000010000fe3a scummvm`main(argc=1, argv=0x00007ff7bfeff738) at macosx-main.cpp:44:12
    frame #11: 0x00007ff817bcc418 dyld`start + 1896

For now, I can't say if the issue is audio-specific or iOS/maOS-specific. I'm logging the issue here so that we don't miss it.

Change History (1)

comment:1 by dwatteau, 12 months ago

Component: Engine: TinselAudio
Description: modified (diff)
Summary: TINSEL: AUDIO: MidiPlayer::createDriver() assert in DW1 with gm_device=macAUDIO: MidiPlayer::createDriver() assert in DW1 with gm_device=mac

I'm moving this to the AUDIO component, because it doesn't only happen with the Discworld games. I can also reproduce the error with DOTT for example, where it will lead to ERROR: IMuse initialization - Cannot connect with gm_device=mac.

Also, regarding Discworld, it's also possible to reproduce this with the dw-demo-cd demo.

I also tested if the new https://github.com/scummvm/scummvm/pull/6682 PR could have fixed it, but the problem is still there on an up-to-date tree.

Note: See TracTickets for help on using tickets.