Sign in to follow this  

SDL Visual C++ debug lockup?

This topic is 4836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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....

Share this post


Link to post
Share on other sites

This topic is 4836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this