<p></p>
<p>SDL_mixer 1.2.11 (Mac) and 1.2.15 (Linux) crash when loading many .wavs that have been cut short (e.g. interrupting a download). Both Mix_LoadMUS and Mix_LoadWAV seem to do so. kylekrack reported that this also happens when trying to play a .wav exported normally from Logic.</p>
<p>SDL_mixer 2.0.3 doesn't crash, so maybe I can find the bugfix and backport it, if it isn't already backported in hg.</p>
<p>On Linux the backtrace looks like</p>
<pre><code>free(): double free detected in tcache 2
Thread 1 "ohrrpgce-custom" received signal SIGABRT, Aborted.
[Switching to Thread 0xf7644740 (LWP 18426)]
0xf7754f9d in raise () from /lib/libc.so.6
(gdb) bt
#0 0xf7754f9d in raise () from /lib/libc.so.6
#1 0xf77322b9 in abort () from /lib/libc.so.6
#2 0xf779fb1c in __libc_message () from /lib/libc.so.6
#3 0xf77a9858 in malloc_printerr () from /lib/libc.so.6
#4 0xf77ab471 in _int_free () from /lib/libc.so.6
#5 0xf7793a8c in fclose@@GLIBC_2.1 () from /lib/libc.so.6
#6 0xf7e3742b in ?? () from /usr/lib/libSDL-1.2.so.0
#7 0xf7dadc51 in Mix_LoadWAV_RW () from /usr/lib/libSDL_mixer-1.2.so.0
#8 0x08320726 in SOUND_LOAD (FILENAME=..., NUM=-1) at music_sdl.bas:650
#9 0x083b25c9 in SFXPREVIEWER::LOAD_PREVIEW (THIS=..., FILEPATH=..., BR=...) at browse.bas:447
#10 0x083b2ff2 in BROWSE_HOVER (TREE=..., BR=...) at browse.bas:533
</code></pre>
<p>And on Mac like</p>
<pre><code>abort() called
ohrrpgce-custom(11863,0x107a6d5c0) malloc: *** error for object 0x600004421860: pointer being freed was not allocated
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff70f842c6 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff71039bf1 pthread_kill + 284
2 libsystem_c.dylib 0x00007fff70eee6a6 abort + 127
3 libsystem_malloc.dylib 0x00007fff70ffcaef malloc_vreport + 545
4 libsystem_malloc.dylib 0x00007fff70ffc8b0 malloc_report + 151
5 SDL_mixer 0x000000010033e8f0 WAVStream_LoadSong_RW + 495
6 SDL_mixer 0x00000001003333bc Mix_LoadMUS_RW + 294
7 ohrrpgce-custom 0x000000010017fed0 MUSIC_PLAY(FBSTRING&, MUSICFORMATENUM) + 144
8 ohrrpgce-custom 0x00000001001b8418 BROWSE_HOVER + 344
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/ohrrpgce/ohrrpgce/issues/1136">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AMWGWZTIJI7XXXI2Z6XH6E3R3JO3TANCNFSM4OYCOVWA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AMWGWZTNOYFZAIIVP7WRIP3R3JO3TA5CNFSM4OYCOVWKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JYSOORQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/ohrrpgce/ohrrpgce/issues/1136",
"url": "https://github.com/ohrrpgce/ohrrpgce/issues/1136",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>