Re: Tricks of the trade



On Tue, 2005-02-22 at 20:45 +0000, Russel Winder wrote:
> I suspect this question labels me as a total newbie but...
> 
> I have a libglademm, GTKmm based program that uses Pango and Fontconfig.
> Earlier versions of the program have worked fine except for coming
> across Pango issues which the current incarnation is trying to
> circumvent.  The program compiles and links fine then on executing it
> issues the error:
> 
> (process:16588): GLib-GObject-CRITICAL **: gtype.c:2254: initialization assertion failed, use IA__g_type_init() prior to this function

Maybe you have a static instance that is executed before the Gtk::Main.

> but nonetheless displays the windows as expected.  Indeed all the
> behaviour of the main window itself is fine.  Of course there is an
> action that uses the state that has not been initialized that when
> activated makes things go totally crazy but that is only to be expected
> given the incorrect initialization that has happened.
> 
> The question is:  How do you backtrack from the fact that there is a GTK
> initialization problem to the feature of the perfectly legal C++ code
> that is not correct.   I am hoping that the answer does not involve
> divination and rat entrails but instead there is a more rational way of
> finding the problem.

A debugger (running with gtk applications with --g-fatal-errors gives
helpful stacktraces when there are gtk+ warnings) and or valgrind can
help.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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