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