Re: How should I fix crash during error dialogs with GTK?


Subject: Re: How should I fix crash during error dialogs with GTK?
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Wed Aug 30 2000 - 03:35:46 CDT


On Tue, 29 Aug 2000, Peter Haight wrote:

> >
> >>
> >> I had the fonts setup wrong so the 'Symbol' font was missing from X. This
> >> means that when I chose 'Insert->Symbol', AbiWord would try and launch a
> >> dialog informing me that the font was missing. This would cause an ASSERT
> >> which would stop my debug build.
> >>
> >
> >The easiest way to fix this is to update "abidistfiles" from CVS. The next
> >thing someone has to do is to stop asserts in the gno debug build
> >immediately crashing abi. It's one reason I mostly do unix builds do.
>
> Why update abidistfiles? What is in there that affects this issue? I pretty
> much had the latest version as of yesterday. I think you are right about not
> having the asserts crash abi. On the other hand, it is a great motivator for
> me to figure out the problem. But the default should be no crash.
>

Sorry I should have said unixfonts. I changed things so that "symbol" is
defined and the default for "insert symbol" since 0.7.10."Symbol" is
defined on windows so text containing "symbol" font can be correctly
exchanged between windows and Unix.

> >> The problem is that the dialog box runs 'gtk_main' which will handle any
> >> pending signals (events). In this case, we were in the middle of
> >> constructing the Insert Symbol dialog and it was not fully ready to handle
> >> signals, but its signals get called. This hits some well placed ASSERTS.
> >>
> >
> >Actually it doesn't. The insert symbol dialog is modeless and does not
> >block with gtk_main().
>
> Ahh. I didn't explain correctly. The dialog box that runs gtk_main() is not
> the Insert Symbol dialog, it is the dialog created by messageBoxOK(). Take a
> look at the stack trace I sent in my last email. You'll see it is an signal
> fired off by the gtk_main called from messageBoxOK() that causes all the
> problems.

I see.

> >Are you using the CVS build?
>
> Yep. Updated right before I looked into all this.
>
> Just for your info, here's a patch that fixes the problem. It just moves
> _connectSignals so that the signals don't get setup until after the
> Insert Symbol dialog is ready to handle them. I don't think it is the right
> fix, though. It would be better if 'messageBoxOk' didn't call any signals
> for other windows (at least for error messages).
>

Thanks very much. We worked very hard to work out the right order to show
widgets and connect signals. Clearly we didn't quite get it right. I can't
commit right now so I haven't checked this out.

Cheers

Martin



This archive was generated by hypermail 2b25 : Wed Aug 30 2000 - 03:36:16 CDT