Hi,
I just switched from OpenAL to SDL_mixer. Now I have an intermittent
crash that happens only in the release build on Windows; not in debug
and not on Linux. Building a simple test program would not
duplicate the problem. I can duplicate it only about half the time by
blowing up the same series of evil aliens when my game starts. I’m
using current SDL_mixer and very close to current SDL from svn.
If I comment out my call to MIX_SetPanning(), the problem goes away.
So I dug deeper and found that it also goes away if I remove this
chunk of code that assigns effects in _Mix_register_effect():
if (*e == NULL) {
*e = new_e;
} else {
effect_info *cur = *e;
while (1) {
if (cur->next == NULL) {
cur->next = new_e;
break;
}
cur = cur->next;
}
}
Unfortunately, I haven’t been able to narrow it down to any particular
part of the effect handling code. And with a bug like this (probably
some nasty invalid pointer somwhere), there’s no way to know if the
problem is in SDL_mixer or if it has been lurking somewhere else in my
game code for a long time.
Anyone else having any trouble like this, or have any suggestion for
me? I’ve tried everything I can think of so far.–
Terry
P.S. The malloc at the start of _Mix_register_effect() should
probably be moved down a few lines past all the return statements to
avoid a memory leak.