0x1F9F1 / Open1560

A mod for Midtown Madness 1, primarily focused on supporting modern computers and fixing bugs.
https://0x1F9F1.github.io/Open1560
GNU General Public License v3.0
110 stars 9 forks source link

Sound related crashes #79

Open 0x1F9F1 opened 3 years ago

0x1F9F1 commented 3 years ago

Crash when no sound devices are available:

ACCESS_VIOLATION (0xC0000005) at EIP=0x004EFC5A (DSGlobal::InitPrimarySoundBuffer + 0x8A)
EAX=00000000 EBX=0BBCFE80 ECX=00000000 EDX=00706150
ESI=007061BE EDI=00000000 EBP=0019F7CC ESP=0019F7A8
10. 0x004EFC5A (DSGlobal::InitPrimarySoundBuffer + 0x8A)
9. 0x004EF705 (DSGlobal::Init + 0x1B5)
8. 0x004E87E5 (AudManager::Init + 0xF5)
7. 0x00402FE5 (InitAudioManager + 0xA5)
6. 0x00402900 (ApplicationHelper + 0x10D0)
5. 0x7C07ADF7 (Application + 0x137)
4. 0x7C07B47F (MidtownMain + 0x25F)

Crash when exceeding max sounds:

ERROR: AudSound::AudSound max sounds exceeded or no sound card. Max sounds = 150
...
ACCESS_VIOLATION (0xC0000005) at EIP=0x004EA960 (AudSound::Load + 0x90)
EAX=00000013 EBX=159D5088 ECX=00000013 EDX=00000000
ESI=13C5B1C8 EDI=00000000 EBP=0019F748 ESP=0019F728
13. 0x004EA960 (AudSound::Load + 0x90)
12. 0x00443040 (aiAudioManager::LoadCopVoice + 0xB0)
11. 0x004173DB (mmGameSingle::Reset + 0x3B)
10. 0x00404520 (mmGameManager::Update + 0x50)
9. 0x7C0366E0 (asNode::Update + 0x120)
8. 0x00522535 (asSimulation::Update + 0x275)
7. 0x00522AE7 (asSimulation::Simulate + 0x87)
6. 0x00402CCC (ApplicationHelper + 0x149C)
5. 0x7C07ADF7 (Application + 0x137)
4. 0x7C07B47F (MidtownMain + 0x25F)
0x1F9F1 commented 3 years ago

Also seems to be related to tabbing in/out (calling DSGlobal::Init multiple times)

0x1F9F1 commented 3 years ago

Need to call DSGlobal::DeInit before calling DSGlobal::Init again

0x1F9F1 commented 3 years ago

Crash when audio.ar is missing:

ACCESS_VIOLATION (0xC0000005) at EIP=0x004F4CDF (StreamObj::~StreamObj + 0x3F)
EAX=00000000 EBX=16590F70 ECX=00000000 EDX=164362E0
ESI=16591048 EDI=16591048 EBP=0019EC20 ESP=0019EC10
15. 0x004F4CDF (StreamObj::~StreamObj + 0x3F)
14. 0x004F3A52 (AudStream::Load + 0x142)
13. 0x004EC0D7 (mmVoiceCommentary::mmVoiceCommentary + 0x67)
12. 0x0040EF8D (mmGame::Init + 0x58D)
11. 0x00416E13 (mmGameSingle::Init + 0x23)
10. 0x00404128 (mmGameManager::mmGameManager + 0x2D8)