Crash, if try to shift window

Hi, I would like to report a very strange behaviour, but I’m not sure
whether I have completely misunderstood something or if there is a bug.

My environment: Windows XP, I got the same behaviour with mingw and
SDL-devel-1.2.13-mingw32.tar.gz or with Microsoft VisualC 6 and
SDL-devel-1.2.13-VC6.zip.

I could concentrate the problem to a code of only those lines:

// *********************************************
SDL_Surface *screen=NULL;
SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER); // same with other values
screen = SDL_SetVideoMode(640, 480, 24, SDL_HWSURFACE);

for(;;){
// here you would normally do some things
SDL_Delay(100);
}
// *********************************************

What happens: the SDL window occurs, but if you try to grap it at the
title bar to shift it and then click into the window, the application
stops (you may see it with that rudiment code lines observing the task
manager).

I’m not a complete newby to SDL and have also successfully completed
some event driven programs using SDL, but here I tried to get some
kind of a fully automatically running animation and run into that
principal problem with no idea, what went wrong here?

compiling and linking was without warnings or erros, I linked against:
-lmingw32 -lSDLmain -lSDL -lm.

Has anyone an idea here?
Thanks for any hint!
Regards
Gerhard

Hi Gerhard,

One thing that I noticed is that you don’t handle SDL events in this
code. Has that part been removed?

Peter

2008/9/26 Gerhard P. Herbig :> Hi, I would like to report a very strange behaviour, but I’m not sure

whether I have completely misunderstood something or if there is a bug.

My environment: Windows XP, I got the same behaviour with mingw and
SDL-devel-1.2.13-mingw32.tar.gz or with Microsoft VisualC 6 and
SDL-devel-1.2.13-VC6.zip.

I could concentrate the problem to a code of only those lines:

// *********************************************
SDL_Surface *screen=NULL;
SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER); // same with other values
screen = SDL_SetVideoMode(640, 480, 24, SDL_HWSURFACE);

for(;;){
// here you would normally do some things
SDL_Delay(100);
}
// *********************************************

What happens: the SDL window occurs, but if you try to grap it at the
title bar to shift it and then click into the window, the application
stops (you may see it with that rudiment code lines observing the task
manager).

I’m not a complete newby to SDL and have also successfully completed
some event driven programs using SDL, but here I tried to get some
kind of a fully automatically running animation and run into that
principal problem with no idea, what went wrong here?

compiling and linking was without warnings or erros, I linked against:
-lmingw32 -lSDLmain -lSDL -lm.

Has anyone an idea here?
Thanks for any hint!
Regards
Gerhard


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Peter Mackay <mackay.pete+sdl gmail.com> writes:

Hi Gerhard,

One thing that I noticed is that you don’t handle SDL events in this
code. Has that part been removed?

Peter

Hi Peter

in my code I didn’t use any event control. Is that necessary?
In this project a fully automatic running animation was the goal.

By the way, all is working OK - so far I didn’t try to shift the window!
Regards Gerhard