Re: gtk_init() crashes



On Mon, 2003-03-10 at 05:02, Russell Shaw wrote:
Hi,

I'm trying to get a gtk example to run which i just compiled:

russell main~/gtk: ./example

** (example:2922): WARNING **: Couldn't load font "Sans 10" falling back to "Sans 10"
** (example:2922): WARNING **: Couldn't load font "Sans 10" falling back to "Sans 10"
** (example:2922): WARNING **: All font failbacks failed!!!!

In gdb, the crash happens in gtk_init(). How can i trace into gtk_init() with gdb?

I wouldn't bother ... you need to fix the above error, and then things 
will work. (Though I don't think it is actually occuring inside
gtk_init() ... gtk_init() doesn't do any font stuff as far as I recall.
So, I think your program is actually getting past gtk_init(). Most
likely, it's just that since your GTK+ version doesn't have debugging
symbols, gdb's output is very approximate.

I currently compile with:

   CCFLAGS = -Wall -g `pkg-config --cflags glib-2.0 gtk+-2.0` ;
   LINKLIBS = `pkg-config --libs glib-2.0 gtk+-2.0` ;

If you want to step into gtk_init(), then you need GTK+ compiled
with debugging symbols, not your program.

Can i change what font is to be loaded?

Well, you could, but Sans needs to be a valid font. There's something
wrong about your GTK+ installation. 

 If you are using classic X fonts, there is something wrong
  with /etc/pango/pangox.aliases

 If you are using Xft1, /etc/X11/XftConfig is the relevant file

 If you are using Xft/fontconfig /etc/fonts/fonts.conf is the
 relevant file.

Regards,
                                             Owen





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