[SDL] Can't run SDL apps in OSX 10.6

Lagrange Marc markocpc at gmail.com
Sat Dec 11 06:48:02 PST 2010


On Sat, Dec 11, 2010 at 1:52 PM, Zoltán Kócsi <zoltan at bendor.com.au> wrote:
> My apologies if the stuff below sounds stupid or ignorant but
>
>> ... snip ...
>> /*
>>  * Built with
>>  * cc -g -ggdb3 -fno-inline -o test_sdl test_sdl.c
>> -I/opt/local/include -L/opt/local/lib -lsdl -lsdlmain
>>  */
>> void run();
>>
>> int main(int argc, char *argv[]) {
>>     run();
>> }
>>
>> #include <SDL/SDL.h>
>>
>> void run()
>> {
>>     SDL_Init(SDL_INIT_VIDEO);
>>     SDL_SetVideoMode(640,480,0,SDL_OPENGL);
>> }
>> ... snip ...
>
> main() enters, calls run() which initialises SDL then run() returns and
> main() returns (without actually returning an exit code). The SDL event
> loop never entered.
>
> If some threads are started when SDL talks to OpenGL (don't know if that
> happens or not) which would need to be synchronised by the event loop,
> that might be an issue.
>
> Also, does SDL return any error code from either calls?
> Do you know which one fails?

I've the call stack :

2010-12-11 15:42:01.629 test_sdl[40997:903] *** Terminating app due to
uncaught exception 'NSInternalInconsistencyException', reason: 'Error
(1002) creating CGSWindow'
*** Call stack at first throw:
(
	0   CoreFoundation                      0x00007fff8909e7b4
__exceptionPreprocess + 180
	1   libobjc.A.dylib                     0x00007fff85a870f3
objc_exception_throw + 45
	2   CoreFoundation                      0x00007fff8909e5d7
+[NSException raise:format:arguments:] + 103
	3   CoreFoundation                      0x00007fff8909e564
+[NSException raise:format:] + 148
	4   AppKit                              0x00007fff82a92ee2
_NSCreateWindowWithOpaqueShape2 + 473
	5   AppKit                              0x00007fff82a27489 -[NSWindow
_commonAwake] + 1214
	6   AppKit                              0x00007fff82a2416e -[NSWindow
_commonInitFrame:styleMask:backing:defer:] + 1501
	7   AppKit                              0x00007fff82a22dfa -[NSWindow
_initContent:styleMask:backing:defer:contentView:] + 1396
	8   AppKit                              0x00007fff82a22883 -[NSWindow
initWithContentRect:styleMask:backing:defer:] + 42
	9   libSDL-1.2.0.dylib                  0x0000000100051c7a
-[SDL_QuartzWindow initWithContentRect:styleMask:backing:defer:] + 349
	10  libSDL-1.2.0.dylib                  0x000000010004e1fe
QZ_SetVideoWindowed + 832
	11  libSDL-1.2.0.dylib                  0x000000010004eabc
QZ_SetVideoMode + 169
	12  libSDL-1.2.0.dylib                  0x00000001000403ec
SDL_SetVideoMode + 655
	13  test_sdl                            0x0000000100000eea run + 43
	14  test_sdl                            0x0000000100000ebd main + 25
	15  test_sdl                            0x0000000100000e9c start + 52
)
terminate called after throwing an instance of 'NSException'
zsh: abort      ./test_sdl

>
> (Note that I have no idea what libsdlmain is, I only ever linked against
> libsdl on Linux)
Seems to be an OSx specific thing.

>
> Regards,
>
> Zoltan
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>



More information about the SDL mailing list