Re: How to locate the 'Gtk-WARNING' line number
G_DEBUG=fatal_warnings gdb --args foo.binary arg1 arg2 in gdb, it will crash at some point and if you compiled your program with -g or -ggdb the `backtrace` command will give you some meaningful information For more see: https://developer.gnome.org/glib/stable/glib-running.html https://developer.gnome.org/gtk3/stable/gtk-running.html On Mon, Feb 17, 2014 at 9:44 AM, Wiky wii...@yeah.net wrote: Hi,all. I'm currently writing a program based Gtk+-3.0. When it runs, I get '(a.out:10874): Gtk-WARNING **: Failed to ...' in the terminal. I know the problem is about GtkLabel, but I really don't know which GtkLabel. Is there a way to locate the line numer that give the warning? Sorry for my english ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to locate the 'Gtk-WARNING' line number
On Mon, 2014-02-17 at 16:44 +0800, Wiky wrote: Hi,all. I'm currently writing a program based Gtk+-3.0. When it runs, I get '(a.out:10874): Gtk-WARNING **: Failed to ...' in the terminal. I know the problem is about GtkLabel, but I really don't know which GtkLabel. Is there a way to locate the line numer that give the warning? Sorry for my english ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list If your UI is hand-coded, and in main() (not using GtkApplication), then I suppose you can run it through gdb and step through each line to see where it prints the error. Be sure to compile with -Og -g and without optimisations though -- Marco Scannadinari m...@scannadinari.co.uk ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Fwd: Re: How to locate the 'Gtk-WARNING' line number
On 17.02.2014 10:36, Marco Scannadinari wrote: On Mon, 2014-02-17 at 16:44 +0800, Wiky wrote: Hi,all. I'm currently writing a program based Gtk+-3.0. When it runs, I get '(a.out:10874): Gtk-WARNING **: Failed to ...' in the terminal. I know the problem is about GtkLabel, but I really don't know which GtkLabel. Is there a way to locate the line numer that give the warning? Sorry for my english ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list If your UI is hand-coded, and in main() (not using GtkApplication), then I suppose you can run it through gdb and step through each line to see where it prints the error. Be sure to compile with -Og -g and without optimisations though I think just setting a break-point on g_log and then asking for a backtrace when you hit the breakpoint should also work and is possibly quicker. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to locate the 'Gtk-WARNING' line number
On Mon, Feb 17, 2014 at 04:44:53PM +0800, Wiky wrote: Hi,all. I'm currently writing a program based Gtk+-3.0. When it runs, I get '(a.out:10874): Gtk-WARNING **: Failed to ...' in the terminal. I know the problem is about GtkLabel, but I really don't know which GtkLabel. Is there a way to locate the line numer that give the warning? Run it with G_DEBUG=fatal-warnings, let it dump core and look at the stack trace. Yeti ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to locate the 'Gtk-WARNING' line number
On 02/17/2014 03:44 AM, Wiky wrote: Hi,all. I'm currently writing a program based Gtk+-3.0. When it runs, I get '(a.out:10874): Gtk-WARNING **: Failed to ...' in the terminal. I know the problem is about GtkLabel, but I really don't know which GtkLabel. Is there a way to locate the line numer that give the warning? Sorry for my english ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list Being that it's a warning, you may disregard it. Still to this day I also get Gtk-WARNING from synaptic. (synaptic:19289): Gtk-WARNING **: GtkNotebook 0x22f3510 is mapped but visible child GtkLabel 0x2382cc0 is not mapped emacs has a trick to remove this annoying warning: http://code.ohloh.net/file?fid=oEG5UBbvy8a3udXaR1-LNWIHNrQcid=u98OF8Evg70s=gtk-WARNING#L14 If you are adamant about seeing the exact source for this warning, it's in the gtk sources. Install the gnome-dbg and anything gtk -dbg. That will help to point to source files and line numbers. Cheers, David Marceau ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list