Mac osx freeze

I’ve sent this problem to the apple opengl mailing list but I’m not
having much luck…

I’m getting a total lock up in an SDL/OpenGL app that I’m working on. I
can ssh into the machine and it’s still alive but not very healthy. I
got a gdb stack trace…

#0 0x70000978 in mach_msg_overwrite_trap ()
#1 0x70005b34 in mach_msg_overwrite ()
#2 0x70498d58 in io_connect_map_memory ()
#3 0x020772f4 in gldFinish ()
#4 0x0200fb04 in gliSwapBuffers ()
#5 0x70b6a740 in CGLFlushDrawable ()
#6 0x70ea367c in _NS_CGLFlushDrawable ()
#7 0x70ea2290 in -[NSOpenGLContext flushBuffer] ()
#8 0x3002a1ac in QZ_GL_SwapBuffers ()
#9 0x30020c88 in SDL_GL_SwapBuffers ()

One of the apple guys says that it indicates that I have a single
buffered context even though I requested a double buffer.
SDL_SetVideoMode DOES NOT return an error to indicate that I didn’t get
what i asked for.

Just before I start rendering I have added

int value;
int result = SDL_GL_GetAttribute( SDL_GL_DOUBLEBUFFER, &value);

result always equals -1 which, according to the sdl docs, means that
SDL_GL_GetAttribute failed, though the docs don’t say why it would fail.

Anyone got any clues what the problem might be or how I should proceed?
I’ve lost 3 days on this already:(

henry

I’ve sent this problem to the apple opengl mailing list but I’m not
having much luck…

int value;
int result = SDL_GL_GetAttribute( SDL_GL_DOUBLEBUFFER, &value);

result always equals -1 which, according to the sdl docs, means that
SDL_GL_GetAttribute failed, though the docs don’t say why it would fail.

The call fails because this is unimplemented in the SDL version you have.

You can grab the SDL code from CVS and compile it. This error has been
fixed, and you will get back an appropriate value. If you don’t want to
recompile SDL, use glGetIntegerv (GL_DOUBLE_BUFFER, &value);

-DarrellOn Sat, 16 Mar 2002, Henry wrote:

The call fails because this is unimplemented in the SDL version you have.

Why the heck was this not implemented? In any case, if you’re not going to
implement something, then at least dump an error message to stderr, and you
can return an error code, have a define like this or something and return it
in these cases:

#define SDL_ERROR_UNIMPLEMENTED -99999

That way people at least know and don’t get all confused when things don’t
work like they don’t expect. Probably too late now, I realize, but
something to keep in mind in the future.

-Jason

----- Original Message -----
From: dwaliss1@purdue.edu (Darrell Walisser)
To:
Sent: Saturday, March 16, 2002 3:49 PM
Subject: Re: [SDL] mac osx freeze

“Jason Hoffoss” wrote in message
news:mailman.1016321826.21904.sdl at libsdl.org

Why the heck was this not implemented? In any case, if you’re not
going to
implement something, then at least dump an error message to stderr,

That would be impolite (bypassing the programmer to talk directly to
the user). Did you call ‘SDL_GetError’?> ----- Original Message -----

From: “Darrell Walisser”


Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com

I downloaded the source and checked the bugs and found that it wasn’t
implemented so that’s OK. (rtfm) After seeing the bug list though I
decided to rip SDL out and replace it with AGL code. Didn’t fix the
problem. Which is good for SDL (I can keep using it) but bad for me
because I’m no closer to finding the problem.On Sunday, March 17, 2002, at 11:39 AM, Jason Hoffoss wrote:

The call fails because this is unimplemented in the SDL version you
have.

Why the heck was this not implemented? In any case, if you’re not
going to
implement something, then at least dump an error message to stderr, and
you
can return an error code, have a define like this or something and
return it
in these cases:

#define SDL_ERROR_UNIMPLEMENTED -99999

That way people at least know and don’t get all confused when things
don’t
work like they don’t expect. Probably too late now, I realize, but
something to keep in mind in the future.

Newsgroups: loki.open-source.sdl

“Jason Hoffoss” wrote in message
news:mailman.1016321826.21904.sdl at libsdl.org

Why the heck was this not implemented? In any case, if you’re not
going to
implement something, then at least dump an error message to stderr,

That would be impolite (bypassing the programmer to talk directly to
the user). Did you call ‘SDL_GetError’?

Well ok, that would work then. This is a library, and you shouldn’t decide
policy for the application that uses it, so you’re right, writing to stderr
probably isn’t a good idea for this. So the question is, then, is an sdl
error message set stating it isn’t implemented? If it isn’t, it should be.
That’s what the point I was trying to make was. The idea, not the specifics
of how to do it. :slight_smile:

----- Original Message -----
From: root@rainerdeyke.com (Rainer Deyke)
To:
Sent: Saturday, March 16, 2002 7:13 PM
Subject: Re: [SDL] mac osx freeze

----- Original Message -----
From: “Darrell Walisser”