Please help : Werid problem single stepping after breakpoint stop!

First off all, hello to everybody here as this is my first post in the
mailing list :wink:

Iā€™m using Visual C++ 6.0 (with latest service pack, at least I think, donā€™t
remember well) and Iā€™m coding a opengl application using sdl and sdl_mixer.
Now, my problem (Iā€™ve spent 3 days on it, searched the web, searched the
mailarchive, searched msdn : NO solution !) :

When a breakpoint is reached, the keyboard and the mouse are frozen for 3 or
4 seconds. Then each single step action takes 1 second (I mean : single
stepping the code is at an average speed of 1 line per second).
When the breakpoint is placed BEFORE SDL_PollEvent, step debug is OK, but if
it is placed after step the problem occurs.

For example :
if(SDL_PollEvent(&event))
{
switch(event.type)
{
case SDL_QUIT :
m_quitNow = true;
break;

  1. Set breakpoint on if(SDL_PollEvent(&event))
    Can step after the line as long as I want (BUT not if I ā€œrunā€ to another
    breakpoint)
  2. Set breakpoint on switch(event.type)
    Mouse and keyboard frozen, breakpoint freeze 5 seconds, stepping is very
    slow

So Iā€™m quite unable to use the debugger and itā€™s very very annoyedā€¦

Last point : Iā€™ve tried to use windbg instead of visual studio built in
debugger : same behaviour

Please, does anybody knows how I can get out of this nightmare ???

Thank you___________________________________________________________
Do You Yahoo!? ā€“ Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com

Iā€™m using Visual C++ 6.0

Did you specify the SDL_INIT_NOPARACHUTE parameter when you called
SDL_Init() ?ā€“
Matthijs Hollemans
www.allyoursoftware.com

Hello!

Please, does anybody knows how I can get out of this nightmare ???

Iā€™m having similiar nightmares too, with or without SDL.
Iā€™m sorry I canā€™t help you, but Iā€™d be very, very, very
thankful for any hint as wellā€¦

Ciao,
Eike

breakpoint stop !

Iā€™m using Visual C++ 6.0

Did you specify the SDL_INIT_NOPARACHUTE parameter when you called
SDL_Init() ?

Yes, and it changes nothingā€¦ Unfortunately !


Do You Yahoo!? ā€“ Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com

----- Original Message -----
From: matthijs@allyoursoftware.com (Matthijs Hollemans)
To:
Sent: Tuesday, November 26, 2002 12:05 PM
Subject: Re: [SDL] Please help : Werid problem single stepping after

May be the problem comes from the directinput layer (and sdl use it). Iā€™ve
tried to find information about any problem within directX and breakpoints
in visual studio without successā€¦> ----- Original Message -----

From: sauer@nanocosmos.de (Eike Sauer)
To:
Sent: Tuesday, November 26, 2002 12:21 PM
Subject: RE: [SDL] Please help : Werid problem single stepping after
breakpoint stop !

Hello!

Please, does anybody knows how I can get out of this nightmare ???

Iā€™m having similiar nightmares too, with or without SDL.
Iā€™m sorry I canā€™t help you, but Iā€™d be very, very, very
thankful for any hint as wellā€¦

Ciao,
Eike


Do You Yahoo!? ā€“ Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com

May be the problem comes from the directinput layer (and sdl use it). Iā€™ve
tried to find information about any problem within directX and breakpoints
in visual studio without successā€¦

Do you have any surfaces locked?

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

breakpoint stop !

May be the problem comes from the directinput layer (and sdl use it).
Iā€™ve

tried to find information about any problem within directX and
breakpoints

in visual studio without successā€¦

Do you have any surfaces locked?

No, I use only one surface ā€¦ declared like that :
SDL_Surface *MainWindow = NULL;

And used like that :
MainWindow = SDL_SetVideoMode(gWindowWidth,gWindowHeight,32,SDL_OPENGL |
SDL_HWSURFACE | SDL_HWACCEL);

But, see my future post, may be this is the causeā€¦


Do You Yahoo!? ā€“ Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com

----- Original Message -----
From: slouken@devolution.com (Sam Lantinga)
To:
Sent: Tuesday, November 26, 2002 6:29 PM
Subject: Re: [SDL] Please help : Werid problem single stepping after

As has been said before, SDL_HWACCEL is not a flag that is valid to pass
to SDL_SetVideoMode()ā€¦ The only flags that are legal for this function
call are listed below. See http://sdldoc.csn.ul.ie/sdlsetvideomode.php
for details.

SDL_SWSURFACE
SDL_HWSURFACE
SDL_ASYNCBLIT
SDL_ANYFORMAT
SDL_HWPALETTE
SDL_DOUBLEBUF
SDL_FULLSCREEN
SDL_OPENGL
SDL_OPENGLBLIT
SDL_RESIZABLE
SDL_NOFRAME

Hope this helps,

-LorenOn Tue, 2002-11-26 at 10:13, Chris wrote:

And used like that :
MainWindow = SDL_SetVideoMode(gWindowWidth,gWindowHeight,32,SDL_OPENGL |
SDL_HWSURFACE | SDL_HWACCEL);

But, see my future post, may be this is the causeā€¦

This is a known bug with interactions between MSVCā€™s debugger,
DirectInput and Win2K; see:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dninput/html/nodelaydirectinput.asp

for details. Upgrade to DX 8.1b:

Open the DX control panel (not dxdiag), under DirectInput, turn on
the emulation options.

That alone was enough to remove the keyboard delays from the app Iā€™m
debugging. Itā€™s not using SDLā€™s input right now; it uses DI directly,
using the DI8 interface. Since SDL uses a much older version of DI, you
might need to turn on the debug DLLs, too. (That caused all kinds of
weird problems for me when I did it, thoughā€“garbage in the keyboard
inputā€“so YMMV.) Also, it supposedly only works with foreground,
exclusive access (DISCL_FOREGROUND|DISCL_EXCLUSIVE); I donā€™t know what
SDL uses. (It works for me with nonexclusive access on the keyboard, though.)

I havnā€™t yet been able to get rid of the mouse delays, though.On Tue, Nov 26, 2002 at 11:47:56AM +0100, Chris wrote:

Iā€™m using Visual C++ 6.0 (with latest service pack, at least I think, donā€™t
remember well) and Iā€™m coding a opengl application using sdl and sdl_mixer.
Now, my problem (Iā€™ve spent 3 days on it, searched the web, searched the
mailarchive, searched msdn : NO solution !) :

ā€“
Glenn Maynard

breakpoint stop !

This is a known bug with interactions between MSVCā€™s debugger,
DirectInput and Win2K; see:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dninput/htm
l/nodelaydirectinput.asp

for details. Upgrade to DX 8.1b:

http://msdn.microsoft.com/downloads/?url=/downloads/sample.asp?url=/MSDN-FIL
ES/027/001/771/msdncompositedoc.xml&frame=true

Open the DX control panel (not dxdiag), under DirectInput, turn on
the emulation options.

The simple fact off merging the .reg file for dxinput option gave me back
keyboard control :slight_smile:

That alone was enough to remove the keyboard delays from the app Iā€™m
debugging. Itā€™s not using SDLā€™s input right now; it uses DI directly,
using the DI8 interface. Since SDL uses a much older version of DI, you
might need to turn on the debug DLLs, too. (That caused all kinds of
weird problems for me when I did it, thoughā€“garbage in the keyboard
inputā€“so YMMV.) Also, it supposedly only works with foreground,
exclusive access (DISCL_FOREGROUND|DISCL_EXCLUSIVE); I donā€™t know what
SDL uses. (It works for me with nonexclusive access on the keyboard,
though.)

I havnā€™t yet been able to get rid of the mouse delays, though.

Me tooā€¦ But stepping at normal speed is a pleasure :wink:

Thank you


Do You Yahoo!? ā€“ Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com

----- Original Message -----
From: g_sdl@zewt.org (Glenn Maynard)
To:
Sent: Wednesday, November 27, 2002 12:21 AM
Subject: Re: [SDL] Please help : Werid problem single stepping after

Using SDL for input, it does work if you enable the debug DLLs. (Still
no fix for mouse lag, though.)On Tue, Nov 26, 2002 at 06:21:27PM -0500, Glenn Maynard wrote:

That alone was enough to remove the keyboard delays from the app Iā€™m
debugging. Itā€™s not using SDLā€™s input right now; it uses DI directly,
using the DI8 interface. Since SDL uses a much older version of DI, you
might need to turn on the debug DLLs, too. (That caused all kinds of
weird problems for me when I did it, thoughā€“garbage in the keyboard
inputā€“so YMMV.) Also, it supposedly only works with foreground,

ā€“
Glenn Maynard