Treeview CRITICAL Error
- From: dhk <dhkuhl optonline net>
- To: gtk-app-devel-list gnome org
- Subject: Treeview CRITICAL Error
- Date: Sat, 25 Apr 2009 18:23:52 -0400
I have a program that I'm trying to clean up. There is a lot going on
so please bear with me and I try to keep it brief.
First - the build environment uses autoconf. The only reason I mention
this is because in the Makefile.am when the -g options is added to the
CFLAGS is only seems to compile when the -O (Optimization) option is
present. However the options is set as -O0 (that's Dash-Oh-Zero) which
should turn optimization off.
Second - when stepping through the program with the debugger the usual
strange looping occurs due to optimization; I can't explain why it
happens, but it does. This leads to a problem where many variables are
optimized out. In the debugger variables are set as "<value optimized
out>". Does anyone know if this is normal/ok or does it indicate sloppy
programming? I'd like to be able to compile the program without
optimization, but so far this has just been an annoyance.
Third - the problem. The application window has a notebook with a
handful of tabs, each with different tree views on them. The program
seems to run fine. However, when the second tab is selected, no matter
what the previous tab was, the following three error lines get printed
about three times.
(prog:16939): Gtk-CRITICAL **: gtk_tree_store_get_value: assertion
`column < tree_store->n_columns' failed
(prog:16939): GLib-GObject-CRITICAL **: g_object_set_property: assertion
`G_IS_VALUE (value)' failed
(prog:16939): GLib-GObject-CRITICAL **: g_value_unset: assertion
`G_IS_VALUE (value)' failed
Now from the debugger these lines appear to get printed on calls to
gtk_tree_store_prepend() and gtk_tree_view_set_cursor(); however,
nothing fails, only the Gtk-CRITICAL messages get printed.
Now the strange part. The functions that call gtk_tree_store_prepend()
and gtk_tree_view_set_cursor() get a tree view pasted in as a gpointer
and then it's cast to a GtkWidget. In the debugger when the tree view
is printed it says "<value optimized out>" and when printed with a star
'*' preceding the tree view it displays 0x0: NULL. An assert of the
NULL tree view doesn't fail. Then the tree model is gotten from the
tree view and that says the same thing as the tree view "<value
optimized out>" and 0x0. An assert on the tree model doesn't fail
either. Then the CRITICAL messages are printed on the calls to the two
gtk_tree_...() function above.
Anyone, what is going on? and what am I dealing with?
Thanks a heap in advance,
dave
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]