Re: HELP: GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)'
Hi, finally it seems, that I solved the problem :-) after removing a GSList, which I used for some radiobuttons, all the warnings were gone, and it seems to work now. thanks for your tips! ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
HELP: GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)'
hi, I'm working on a gtk-project for some month; I already solved a lot of problems by myself, but I'm still learning. But now I have a problem, where I can't find any solution: In my application there's is one window, when I'm closing it, I always can see the following messages: GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)' GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed and sometimes the application segfaults after this. The interesting thing is, that there are other windows, that use exactly the same code, but they work without any problems... any hints or tips? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: HELP: GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)'
On Wed, May 23, 2007 at 12:16:51PM +0200, Guenther Meyer wrote: I'm working on a gtk-project for some month; I already solved a lot of problems by myself, but I'm still learning. But now I have a problem, where I can't find any solution: In my application there's is one window, when I'm closing it, I always can see the following messages: GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)' GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed and sometimes the application segfaults after this. The interesting thing is, that there are other windows, that use exactly the same code, but they work without any problems... any hints or tips? Use valgrind. And use gdb, since you get segfaults, have you tried to at least print backtrace to see where it crashes? gdb program core.12345 backtrace You can also make GLib abort (and dump core) on CRITICAL or WARNING messages using g_log_set_always_fatal() or more flexibily by setting the G_DEBUG environment variable (see GLib reference documentation). The first two points apply generally, not just to Gtk+ programs. Yeti -- http://gwyddion.net/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: HELP: GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)'
Am Mittwoch 23 Mai 2007 12:38 schrieb David Nečas: On Wed, May 23, 2007 at 12:16:51PM +0200, Guenther Meyer wrote: I'm working on a gtk-project for some month; I already solved a lot of problems by myself, but I'm still learning. But now I have a problem, where I can't find any solution: In my application there's is one window, when I'm closing it, I always can see the following messages: GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)' GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed and sometimes the application segfaults after this. The interesting thing is, that there are other windows, that use exactly the same code, but they work without any problems... any hints or tips? Use valgrind. yes, I already was told that. but it floods me with messages, so I can't make any use of it. is there agood howto or something like that anywhere? And use gdb, since you get segfaults, have you tried to at least print backtrace to see where it crashes? gdb program core.12345 backtrace yes, but that doesn't really help me... Program received signal SIGSEGV, Segmentation fault. 0x0ef042fc in ?? () from /lib/libc.so.6 (gdb) backtrace #0 0x0ef042fc in ?? () from /lib/libc.so.6 #1 0x0ef041fc in ?? () from /lib/libc.so.6 #2 0x0ef06874 in ?? () from /lib/libc.so.6 #3 0x0ef08ad4 in malloc () from /lib/libc.so.6 #4 0x0f84d2fc in cairo_create () from /usr/lib/libcairo.so.2 #5 0x0fb07f90 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #6 0x0fb08130 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #7 0x0fb09d14 in gdk_window_begin_paint_region () from /usr/lib/libgdk-x11-2.0.so.0 #8 0x0fd250f8 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #9 0x0fb0a1f0 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #10 0x0fb0a4e4 in gdk_window_process_all_updates () from /usr/lib/libgdk-x11-2.0.so.0 #11 0x0fb0a5b0 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #12 0x0f6cbe78 in ?? () from /usr/lib/libglib-2.0.so.0 #13 0x0f6ce674 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #14 0x0f6d2308 in ?? () from /usr/lib/libglib-2.0.so.0 #15 0x0f6d2774 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #16 0x0fd25464 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #17 0x10016750 in main (argc=1, argv=0x7fac3824) at gpsdrive.c:5825 You can also make GLib abort (and dump core) on CRITICAL or WARNING messages using g_log_set_always_fatal() or more flexibily by setting the G_DEBUG environment variable (see GLib reference documentation). The first two points apply generally, not just to Gtk+ programs. Yeti -- http://gwyddion.net/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: HELP: GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)'
On Wed, 2007-05-23 at 12:56 +0200, Guenther Meyer wrote: GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)' GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed and sometimes the application segfaults after this. it means you're trying to access a widget long after it has been destroyed. And use gdb, since you get segfaults, have you tried to at least print backtrace to see where it crashes? gdb program core.12345 backtrace yes, but that doesn't really help me... if you are developing with GTK+ it helps a lot to have debug symbols installed so that gdb can return a meaningful stack trace. you should follow your distribution's guidelines on how to install packages with debug symbols for glib and gtk+ at the very least. after that, you should run your application under gdb, launching your application with the --g-fatal-warnings command line switch, which will tell gtk+ to abort() as soon as a warning is issued. this will make tracing where the bug happens a lot easier. ciao, Emmanuele. -- Emmanuele Bassi, E: [EMAIL PROTECTED] W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: HELP: GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)'
On Wed, May 23, 2007 at 12:56:33PM +0200, Guenther Meyer wrote: Use valgrind. yes, I already was told that. but it floods me with messages, so I can't make any use of it. is there agood howto or something like that anywhere? The guide (and quick start guide) on valgrind.org was sufficient for me. If you can read backtraces, it typically prints two backtraces whenever it encounters a problem: of the point where the bad memory access occured and of the point where the memory involved was allocated or freed (in some cases it prints only the former). Well, then there are the problems (and apparent problems) in standard libraries. For start, you can run valgrind on a hello-world style Gtk+ app, let it generate suppressions for all encountered problems, and then use --suppressions to filter these out. You may also want to increase --num-callers and function calls are often nested deeply in Gtk+ apps. And use gdb, since you get segfaults, have you tried to at least print backtrace to see where it crashes? gdb program core.12345 backtrace yes, but that doesn't really help me... Program received signal SIGSEGV, Segmentation fault. 0x0ef042fc in ?? () from /lib/libc.so.6 (gdb) backtrace #0 0x0ef042fc in ?? () from /lib/libc.so.6 #1 0x0ef041fc in ?? () from /lib/libc.so.6 #2 0x0ef06874 in ?? () from /lib/libc.so.6 #3 0x0ef08ad4 in malloc () from /lib/libc.so.6 #4 0x0f84d2fc in cairo_create () from /usr/lib/libcairo.so.2 #5 0x0fb07f90 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #6 0x0fb08130 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #7 0x0fb09d14 in gdk_window_begin_paint_region () from /usr/lib/libgdk-x11-2.0.so.0 #8 0x0fd250f8 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #9 0x0fb0a1f0 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #10 0x0fb0a4e4 in gdk_window_process_all_updates () from /usr/lib/libgdk-x11-2.0.so.0 #11 0x0fb0a5b0 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #12 0x0f6cbe78 in ?? () from /usr/lib/libglib-2.0.so.0 #13 0x0f6ce674 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #14 0x0f6d2308 in ?? () from /usr/lib/libglib-2.0.so.0 #15 0x0f6d2774 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #16 0x0fd25464 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #17 0x10016750 in main (argc=1, argv=0x7fac3824) at gpsdrive.c:5825 It helps to install the debugging info packages, that's corrresponding -dbg, -debug, -debuginfo, or how you distro calls them, to get something better than ??. This look like a problem where the cause and effect are separated -- you g_object_unref()ed something too many times or something like that, and then it got destructed sooner than the holder of the other refences expected, but with luck, where the memory got freed too soon is visible from valgrind's output. Yeti -- http://gwyddion.net/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list