adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Mac Gui Problems ... and a workaround


From: Kai Sterker
Subject: [Adonthell-devel] Mac Gui Problems ... and a workaround
Date: Sun, 15 Feb 2009 13:42:51 +0100

Today I've spent some time on the mac gui issue. It does not show any
of the actual widgets, just some of the lines and text that is drawn
directly to the screen. Further, exiting guitest produces a segfault:

(gdb) bt
#0  0x00000000 in ?? ()
#1  0x020317d8 in SDL_FreeSurface (surface=Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
0x1551960) at ./src/video/SDL_surface.c:915
#2  0x02033fac in SDL_VideoQuit () at ./src/video/SDL_video.c:1354
#3  0x02009300 in SDL_QuitSubSystem (flags=32) at ./src/SDL.c:202
#4  0x002d77ac in gfx::cleanup () at ../../../adonthell/src/gfx/gfx.cc:165
#5  0x00665700 in adonthell::app::cleanup (this=0x6260) at
../../../adonthell/src/main/adonthell.cc:249
#6  0x007d7b94 in -[SDLMain applicationDidFinishLaunching:] ()
#7  0x90b04e1c in _nsnote_callback ()
#8  0x902d8ec0 in __CFXNotificationPost ()
#9  0x902d0f20 in _CFXNotificationPostNotification ()
#10 0x90aef224 in -[NSNotificationCenter
postNotificationName:object:userInfo:] ()
#11 0x9ea40be8 in -[NSApplication _postDidFinishNotification] ()
#12 0x9ea40ad4 in -[NSApplication _sendFinishLaunchingNotification] ()
#13 0x9ea4061c in -[NSApplication(NSAppleEventHandling) _handleAEOpen:] ()
#14 0x9ea401c4 in -[NSApplication(NSAppleEventHandling)
_handleCoreEvent:withReplyEvent:] ()
#15 0x90b05e28 in -[NSAppleEventManager
dispatchRawAppleEvent:withRawReply:handlerRefCon:] ()
#16 0x90b05c88 in _NSAppleEventManagerGenericHandler ()
#17 0x964ae960 in aeDispatchAppleEvent ()
#18 0x964ae7fc in dispatchEventAndSendReply ()
#19 0x964ae654 in aeProcessAppleEvent ()
#20 0x9e5e32e0 in AEProcessAppleEvent ()
#21 0x9ea3e90c in _DPSNextEvent ()
#22 0x9ea3e3f8 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#23 0x9ea3a93c in -[NSApplication run] ()
#24 0x007d7ae4 in CustomApplicationMain ()
#25 0x007d7bbc in main_init ()
#26 0x006663ac in adonthell::app::init (this=0x6260) at
../../../adonthell/src/main/adonthell.cc:237
#27 0x00666418 in main (argc=3, argv=Cannot access memory at address 0x0
Cannot access memory at address 0x0
0x1551960) at ../../../adonthell/src/main/main.cc:81

My first choice was trying to come up with a simple test case, however
I couldn't get it to fail :-(. Maybe I left out the wrong bits?

So instead I started toying around with guitest itself. I tried a
couple of things but nothing really made a difference. Then I finally
created another surface to render everything on:

    gfx::surface * screen = gfx::create_surface();
    screen->resize (512, 512);

    while (!ih.letsexit) {
        screen->fillrect (0, 0, 512, 512, 0);
        ...
        screen->draw (0, 0);
        base::Timer.update ();
        gfx::screen::update ();
        gfx::screen::clear ();
    }

And it works! So the problem seems to be drawing onto the screen
surface directly. The thing is, it's the same what I do in worldtest.
Why isn't it an issue there?

I will check a bit further, maybe post something to the SDL mailing
list too ... although I doubt they will be able to do much without a
simple test program.

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]