SDL problems during debugging

I’m just starting to learn SDL using OpenGL on Windows, and I find that whenever
I step a line in the MSVC debugger my mouse and the IDE become horribly jerky
for about 3-5 seconds. If I break just before SDL_PollEvent and step over it
manually, I can (usually) continue without any problems (until the next
SDL_PollEvent call). Does anybody have any clue what might be causing this
(perhaps threads or DirectX?), and what I can do to get SDL to behave?

If you set the environment variable SDL_VIDEODRIVER to ‘windib’, it will fix
this.

Its in the faq, I was going to post a url, but I cant seem to access it just
now…

Will McGugan> -----Original Message-----

From: sdl-bounces+will=willmcgugan.com at libsdl.org
[mailto:sdl-bounces+will=willmcgugan.com at libsdl.org]On Behalf Of Kurt
Blackwell
Sent: 11 June 2004 17:38
To: sdl at libsdl.org
Subject: [SDL] SDL problems during debugging

I’m just starting to learn SDL using OpenGL on Windows, and I
find that whenever
I step a line in the MSVC debugger my mouse and the IDE become
horribly jerky
for about 3-5 seconds. If I break just before SDL_PollEvent and
step over it
manually, I can (usually) continue without any problems (until the next
SDL_PollEvent call). Does anybody have any clue what might be
causing this
(perhaps threads or DirectX?), and what I can do to get SDL to behave?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Kurt Blackwell <kurt blackwell.id.au> writes:

I’m just starting to learn SDL using OpenGL on Windows, and I find that
whenever
I step a line in the MSVC debugger my mouse and the IDE become horribly jerky
for about 3-5 seconds. If I break just before SDL_PollEvent and step over it
manually, I can (usually) continue without any problems (until the next
SDL_PollEvent call). Does anybody have any clue what might be causing this
(perhaps threads or DirectX?), and what I can do to get SDL to behave?

Apparently, “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.”

If you’ve already done that, then sorry I don’t know.

This is a known bug; see:

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx8_c/directx_cpp/input_tipsetc_6qic.asp

for a workaround.On Fri, Jun 11, 2004 at 04:38:21PM +0000, Kurt Blackwell wrote:

I’m just starting to learn SDL using OpenGL on Windows, and I find that whenever
I step a line in the MSVC debugger my mouse and the IDE become horribly jerky
for about 3-5 seconds. If I break just before SDL_PollEvent and step over it
manually, I can (usually) continue without any problems (until the next
SDL_PollEvent call). Does anybody have any clue what might be causing this
(perhaps threads or DirectX?), and what I can do to get SDL to behave?


Glenn Maynard

Glenn Maynard <g_sdl zewt.org> writes:

This is a known bug; see:

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx8_c/
directx_cpp/input_tipsetc_6qic.asp

for a workaround.

The DX mouse and keyboard fix seemed to do nothing to help the problem. I added
SDL_INIT_NOPARACHUTE on as well (even though I had no problems setting
breakpoints before), and that didn’t do anything either. Any other ideas?

I just read the FAQ properly (it seemed to be broken yesterday), and I solved my
problem by setting SDL_VIDEODRIVER to windib. I feel silly asking asking a
question that was already answered in the FAQ :slight_smile:

The real reason it’s being “fixed” is probably that “windib” is, in addition
to using a different graphics API, causing DirectInput to not be used for
keyboard input.On Sat, Jun 12, 2004 at 09:21:14AM +0000, Kurt Blackwell wrote:

I just read the FAQ properly (it seemed to be broken yesterday), and I solved my
problem by setting SDL_VIDEODRIVER to windib. I feel silly asking asking a
question that was already answered in the FAQ :slight_smile:


Glenn Maynard