[Top][All Lists]

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

Re: [Bug-gnubg] Mac OSX Hang - more info

From: Michael Petch
Subject: Re: [Bug-gnubg] Mac OSX Hang - more info
Date: Fri, 23 Apr 2004 16:18:41 -0600

I ended up return NULL in that function to cause no images to be loaded.
The Gdk_X_error disappears and it still hangs. Seems to be a red
herring. The other one that seems to happen sporadically occurs right
when you click the prefs and I can not get it to happen again :( 

I believe I have narrowed down the culprit. I am not sure where the
fault lies yet. However I decided to install DarwinX rather than Apple's
X and what I saw was entertaining. Upon entering the Board Preferences I
get a Bus Error and the X server dies! So I started stepping through the
code and found that things go wrong in gtkprefs.c at or around line
2884. The code snippet below is of that area. It took me 3 attempts to
notice the odd behavior while in the debugger. HAVE_LIBXML2 is true in
this case.

plBoardDesigns = read_board_designs (); executes, and then        
AddPages(bd, pwNotebook) executes but the instruction pointer upon
returning from Addpages puts the point of execution Back on the call to
read_board_designs! (not gtk_window_set_modal).On DarwinX this causes
the bus error after the add_pages executes the second time.

Running with the --sync flag does the same thing but the system doesn't
seem to get screwed up - BUT its definitelynot working right (Even
though the result appears correct) 

I stepped into the first call of read_board_design and saw unusual
behavior there too. Calls to ParseBoardDesign return point of execution
to the line before (not the line after). So soem code is being executed
twice. I will continue to investigate but maybe someone here has an idea
of what might be going on.

I did happen to try compiling without an optimizations flag (removed the
-O2 and rebuilt the project).

    plBoardDesigns = read_board_designs ();
        AddPages(bd, pwNotebook);

    gtk_window_set_modal( GTK_WINDOW( pwDialog ), TRUE );
    gtk_window_set_transient_for( GTK_WINDOW( pwDialog ),
                                  GTK_WINDOW( pwMain ) );

On Fri, 2004-04-23 at 06:05, Jon Kinsey wrote:
> Michael Petch wrote:
> > This morning I did a bit of investigation on Mac OSX. On a whim I ended
> > up setting a breakpoint on gdk_x_error to see if there was anything
> > unusual (When it hangs there is no X error put on the console, so this
> > was a shot in the dark).
> > 
> > Now I don't know if this has anything to do with the problems. But here
> > is a backtrace of one error near startup (It seems that the first call
> > to gdk_pixmap_colormap_create_from_xpm_d in the app causes this):
> Do you get any gdk_x_error's when you run the test program?
> Also you could try commenting out the 
> gdk_pixmap_colormap_create_from_xpm_d line from image_from_xpm_d (just 
> return null above it) and see if this stops the hangs.
> > Occasionally I see (and when I get a backtrace of it I will post it)
> > another eror right when you click on the Settings/Appearance menu
> > option. What I do remember is that gdk_x_error stops trying to Setup the
> > Colour Picker.
> > 
> > With all this in mind, I happened to run gnubg with the --sync flag.
> > (This makes sure that GDK/X errors are processed synchronously) -
> > normally they are asynchronous, and can occur well after the operation.
> > 
> > Now the fnny thing is that if I run gnubg with --sync, the GDK_X_error
> > breakpoints get hit,BUT the hangs disappear. Yes for some reason --sync
> > seems to make the problem disappear.
> Doesn't look straightforward :)
> Jon
Mike Petch
CApp::Sysware Consulting Ltd.
Suite 1002,1140-15th Ave SW.
Calgary, Alberta, Canada.
T2R 1K6.

reply via email to

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