SDL Visual C++ debug lockup?

Started by
2 comments, last by xria 19 years, 7 months ago
Has anyone had problems with SDL in Visual C++ where you try to run the debugger and it simply locks up the debugger? I initialize SDL's video and input in my program, which is an opengl game. If I leave the sdl code paths in my program and run the debug it locks up, yet if I comment out the SDL code paths the debug runs fine. Does anyone have any idea what could cause an error like this?
Advertisement
I've had no problems whatsoever using SDL in debug mode in VC6 and VC7. Do you have the most recent version of SDL, I think its at 1.2.7 or something now.
From the SDL FAQ

Q: Why can't I use Visual C++ debugger with SDL applications?
A: You need to pass the SDL_INIT_NOPARACHUTE flag to your calls to SDL_Init() to make the msvc debugger work. Otherwise the debugger will be unable to trace exceptions, and other debugging features like run to cursor won't work.


and the next one:

Q: Why does the Visual C++ debugger freeze at every breakpoint when debugging SDL apps?
A: The DirectX drivers have a system lock while you have video surfaces locked. To avoid this, you can set the video driver to GDI by setting the SDL_VIDEODRIVER environment variable to: windib
Since this changes video and mouse/keyboard input drivers, you'll see a difference in performance and features available, but you'll be able to debug your application more easily.
Thanks for the reply. I should kick myself for not finding that SDL faq in the first place, but I have it working now so I'm off to cause assertion errors and crashes....

This topic is closed to new replies.

Advertisement