Discussion:
[SDL] Mix_OpenAudio makes crash Windows Kernel
GameCodingNinja
2016-10-29 17:16:42 UTC
Permalink
Are you calling Mix_OpenAudio "after" you've called SDL_Init? Does your SDL_Init include SDL_INIT_AUDIO | SDL_INIT_EVENTS? What are you passing to the SDL_Init?

Are you compiling the SDL Mixer or are you using the DLL's?

I have not encountered any problem using the mixer and I compiling for Windows, Linux and Android. For Windows I use all the provided SDL DLL's. Life is simpler that way.

The sound settings I use are...
frequency="44100" sound_channels="2" mix_channels="8" chunksize="1024"

Just an FYI. A lower chunk size and a higher frequency provides lower sound latency. I've noticed this mostly in Windows.

Do you really need "16" mix channels? I'd try 8 to see if that is related to your problem.
GameCodingNinja
2016-10-29 23:31:16 UTC
Permalink
What is GDB?
DjPoke
2016-10-30 01:48:45 UTC
Permalink
GDB is the GNU Debugger.

You can compile with GCC for a normal compilation, or GDB to debug your game.

------------------------
10 REM *** This is the universe ***
20 GOTO 20

Mason Wheeler
2016-10-30 11:58:12 UTC
Permalink
The worst excuse for an interactive debugger ever to be foisted upon a population of developers that somehow ended up taking it seriously.
GameCodingNinja
2016-10-30 14:19:07 UTC
Permalink
Oh, that GDB. I'm bad with acronyms.

When I build and run in Linux, I use Netbeans as the IDE and it uses GDB. Everything works fine.

For Windows, why not just use the free community version of Visual Studio? It has all the features you'll ever need. That's what I do. Chances are there's a problem with the debugger since it was ported to Windows.

The debugger in Visual Studio is really great!
Russell
2016-11-07 06:16:35 UTC
Permalink
Hello

You'll need to add SDL_SetHint(SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, "1"); BEFORE calling any SDL initialization functions, including Mix_Init(...) (even SDL_INIT(SDL_INIT_TIMER); will trigger it)

I believe this is because SDL calls RaiseException when the GNU debugger is attached under windows, it appears versions of GDB greater than 7.11 (?) will trigger on this exception, maybe because it doesn't support exceptions that can continue?

Check https://bugzilla.libsdl.org/show_bug.cgi?id=2089 for more info
Loading...