[SDL] OS X + SDL_SetEventFilter = Bus Error

Zedr0n Zedr0nRE at gmail.com
Fri Jan 4 12:25:41 PST 2008


Sam Lantinga <slouken <at> devolution.com> writes:

> 
> > The problem here is that the app fails with "Bus Error".
> 
> Have you tried running it under the debugger?
> 

Yes, as I see(I haven't used SDL sources) it doesn't crash in 
SDL_SetVideoMode but after return 1...

What happens as I see it: when I use SDL_PollEvent then SDL_VIDEORESIZE
 gets posted to internal queue only when the button is released - so no
 dynamic resizing - is it intended behaviour? By resorting to 
event filter I hack the code by catching all the SDL_VideoResize messages
 and handling it on my own. Or maybe the eventFilter handler is in another
 thread, and the thread with the main loop gets paused when dragging...
 If I remove the call to SDL_SetVideoMode from eventFilter handler the
 window gets redrawn but I see garbage outside the original window, if
 I don't use eventFilter at all then the window 
just blanks during resizing. 
What I actually want to do is that the window gets redrawn during 
resizing - the way it's done in glut 
for example. Or is it intended that it doesn't get redrawn?

> > And just an additional question - is it normal that when I resize the
> > window it also gets centered?
> 
> Nope, are you using SDL 1.2.13?
> 

Yes, 1.2.13... I've built it unix way(autogen.sh configure make make install)
with --without-x --disable-x11-video

Yes, I've read that setVideoMode recreates the window that's why it gets
centered so I thought it was default behaviour.

Maybe I should compile from SVN...

> See ya!
> 	-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment
> 








More information about the SDL mailing list