Thread: [Java-gnome-developer] TreeModels and warnings
Brought to you by:
afcowie
From: Igor F. <if...@re...> - 2005-06-13 13:51:57
|
Hi, I'm playing around with TreeModels, TreeFilters and so on... At one point I have a TreeStore and on top of it I build a TreeModelFilter. At some point I wait for a user to click on an element in a TreeView that is built on the TreeModelFilter and then get an iterator for the TreeModelFilter based on the selection. It seems that when I do that I get a warning from GTK, although everything works. This warning does not creep up when I step through the code, only when it is run at full speed. Any idea what this might be caused by? Am I safe to ignore it? Thanks, Igor Here's the warning: ------------------------------ java.lang.Exception: gtk_tree_model_filter_ref_node: assertion `GTK_TREE_MODEL_FILTER (model)->priv->stamp == iter->stamp' failed at org.gnu.glib.GObject.printStackTrace(GObject.java:644) at org.gnu.gtk.Gtk.gtk_main(Native Method) at org.gnu.gtk.Gtk.main(Gtk.java:55) at com.redhat.uicopy.WindowLauncher.main(WindowLauncher.java:173) java.lang.Exception: gtk_tree_model_filter_get_value: assertion `GTK_TREE_MODEL_FILTER (model)->priv->stamp == iter->stamp' failed at org.gnu.glib.GObject.printStackTrace(GObject.java:644) at org.gnu.gtk.Gtk.gtk_main(Native Method) at org.gnu.gtk.Gtk.main(Gtk.java:55) at com.redhat.uicopy.WindowLauncher.main(WindowLauncher.java:173) (java-gnome:3671): GLib-GObject-CRITICAL **: g_object_set_property: assertion `G_IS_VALUE (value)' failed (java-gnome:3671): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed java.lang.Exception: gtk_tree_model_filter_real_unref_node: assertion `filter->priv->stamp == iter->stamp' failed at org.gnu.glib.GObject.printStackTrace(GObject.java:644) at org.gnu.gtk.Gtk.gtk_main(Native Method) at org.gnu.gtk.Gtk.main(Gtk.java:55) at com.redhat.uicopy.WindowLauncher.main(WindowLauncher.java:173) |
From: Ismael J. <ml...@ju...> - 2005-06-13 13:59:36
|
On Mon, 2005-06-13 at 09:51 -0400, Igor Foox wrote: > Hi, > > I'm playing around with TreeModels, TreeFilters and so on... At one > point I have a TreeStore and on top of it I build a TreeModelFilter. At > some point I wait for a user to click on an element in a TreeView that > is built on the TreeModelFilter and then get an iterator for the > TreeModelFilter based on the selection. It seems that when I do that I > get a warning from GTK, although everything works. This warning does not > creep up when I step through the code, only when it is run at full > speed. Any idea what this might be caused by? Am I safe to ignore it? [...] No, this should not happen. Would you mind opening a bug report with the information you gave here and if possible, a small test case? Also, please mention the version of the libraries where this happens. Thanks. Regards, Ismael |
From: Igor F. <if...@re...> - 2005-06-13 17:14:39
|
On Mon, 2005-06-13 at 14:59 +0100, Ismael Juma wrote: > On Mon, 2005-06-13 at 09:51 -0400, Igor Foox wrote: > > Hi, > > > > I'm playing around with TreeModels, TreeFilters and so on... At one > > point I have a TreeStore and on top of it I build a TreeModelFilter. At > > some point I wait for a user to click on an element in a TreeView that > > is built on the TreeModelFilter and then get an iterator for the > > TreeModelFilter based on the selection. It seems that when I do that I > > get a warning from GTK, although everything works. This warning does not > > creep up when I step through the code, only when it is run at full > > speed. Any idea what this might be caused by? Am I safe to ignore it? > [...] > > No, this should not happen. Would you mind opening a bug report with the > information you gave here and if possible, a small test case? Also, > please mention the version of the libraries where this happens. Thanks. > > Regards, > Ismael Hi Ismael, I have been trying to reproduce the problem, by constructing a simple test case, unfortunately the simple test case doesn't show the problem, only my not-so-simple program does :). I'll try to get at the root. Igor |
From: Igor F. <if...@re...> - 2005-06-13 18:04:13
|
On Mon, 2005-06-13 at 13:14 -0400, Igor Foox wrote: > > On Mon, 2005-06-13 at 14:59 +0100, Ismael Juma wrote: > > On Mon, 2005-06-13 at 09:51 -0400, Igor Foox wrote: > > > Hi, > > > > > > I'm playing around with TreeModels, TreeFilters and so on... At one > > > point I have a TreeStore and on top of it I build a TreeModelFilter. At > > > some point I wait for a user to click on an element in a TreeView that > > > is built on the TreeModelFilter and then get an iterator for the > > > TreeModelFilter based on the selection. It seems that when I do that I > > > get a warning from GTK, although everything works. This warning does not > > > creep up when I step through the code, only when it is run at full > > > speed. Any idea what this might be caused by? Am I safe to ignore it? > > [...] > > > > No, this should not happen. Would you mind opening a bug report with the > > information you gave here and if possible, a small test case? Also, > > please mention the version of the libraries where this happens. Thanks. > > > > Regards, > > Ismael > > Hi Ismael, > > I have been trying to reproduce the problem, by constructing a simple > test case, unfortunately the simple test case doesn't show the problem, > only my not-so-simple program does :). > I'll try to get at the root. > > Igor I'm having problem tracing this problem down, it seems that in my sample program it doesn't happen, but happens in the real program. I must admit that the program has somewhat a spaghetti structure since I am only getting to know java-GNOME and GTK, so I'm experimenting with things and add more and more on top. The problem seems to occur even when references to the TreeModelFilter are replaced with references to the TreeStore, only then it is harder to produce. Can someone shed any light on what the error is supposed to mean, and what it might be related to? Thanks, Igor ------------------- java.lang.Exception: gtk_tree_model_filter_ref_node: assertion `GTK_TREE_MODEL_FILTER (model)->priv->stamp == iter->stamp' failed at org.gnu.glib.GObject.printStackTrace(GObject.java:644) at org.gnu.gtk.Gtk.gtk_main(Native Method) at org.gnu.gtk.Gtk.main(Gtk.java:55) at com.redhat.uicopy.WindowLauncher.main(WindowLauncher.java:170) java.lang.Exception: gtk_tree_model_filter_get_value: assertion `GTK_TREE_MODEL_FILTER (model)->priv->stamp == iter->stamp' failed at org.gnu.glib.GObject.printStackTrace(GObject.java:644) at org.gnu.gtk.Gtk.gtk_main(Native Method) at org.gnu.gtk.Gtk.main(Gtk.java:55) at com.redhat.uicopy.WindowLauncher.main(WindowLauncher.java:170) (java-gnome:7726): GLib-GObject-CRITICAL **: g_object_set_property: assertion `G_IS_VALUE (value)' failed (java-gnome:7726): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed java.lang.Exception: gtk_tree_model_filter_real_unref_node: assertion `filter->priv->stamp == iter->stamp' failed at org.gnu.glib.GObject.printStackTrace(GObject.java:644) at org.gnu.gtk.Gtk.gtk_main(Native Method) at org.gnu.gtk.Gtk.main(Gtk.java:55) at com.redhat.uicopy.WindowLauncher.main(WindowLauncher.java:170) java.lang.Exception: gtk_tree_model_filter_ref_node: assertion `GTK_TREE_MODEL_FILTER (model)->priv->stamp == iter->stamp' failed at org.gnu.glib.GObject.printStackTrace(GObject.java:644) at org.gnu.gtk.Gtk.gtk_main(Native Method) at org.gnu.gtk.Gtk.main(Gtk.java:55) at com.redhat.uicopy.WindowLauncher.main(WindowLauncher.java:170) java.lang.Exception: gtk_tree_model_filter_get_value: assertion `GTK_TREE_MODEL_FILTER (model)->priv->stamp == iter->stamp' failed at org.gnu.glib.GObject.printStackTrace(GObject.java:644) at org.gnu.gtk.Gtk.gtk_main(Native Method) at org.gnu.gtk.Gtk.main(Gtk.java:55) at com.redhat.uicopy.WindowLauncher.main(WindowLauncher.java:170) (java-gnome:7726): GLib-GObject-CRITICAL **: g_object_set_property: assertion `G_IS_VALUE (value)' failed (java-gnome:7726): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed java.lang.Exception: gtk_tree_model_filter_real_unref_node: assertion `filter->priv->stamp == iter->stamp' failed at org.gnu.glib.GObject.printStackTrace(GObject.java:644) at org.gnu.gtk.Gtk.gtk_main(Native Method) at org.gnu.gtk.Gtk.main(Gtk.java:55) at com.redhat.uicopy.WindowLauncher.main(WindowLauncher.java:170) |
From: Andrew C. <an...@op...> - 2005-06-19 04:32:43
|
On Mon, 2005-13-06 at 14:03 -0400, Igor Foox wrote: > I'm having problem tracing this problem down, it seems that in my sample > program it doesn't happen, but happens in the real program. Gotta love it. > I must admit > that the program has somewhat a spaghetti structure That's ok. Ordinarily there is a pretty high bar in the Open Source world before releasing code, because we are afraid to be judged on our pasta code. (I took over a month out from coding to write a configure and Makefile scheme, just so others would be able to build my project). But in this case, tracking down bugs in obscure corner cases of java-gnome that have not previously been exercised is more important. So if you can tarball your code in some manner, then others can try and replicate the problem. AfC Adelaide -- Andrew Frederick Cowie Technology strategy, managing change, establishing procedures, and executing successful upgrades to mission critical business infrastructure. http://www.operationaldynamics.com/ Sydney New York Toronto London |
From: Igor F. <if...@re...> - 2005-06-21 16:55:53
Attachments:
debugui.tar
|
Hi Andrew, Thanks for the mail. I've attached a tarball of the code in the state that it was at the time of my initial email. Since then I've changed my code and it now works. What I had is a TreeStore, with 2 TreeFilters on top of it, and another TreeFilter on top of one of the first ones. I've removed this stacking of filters and that resolves the problem. However, I don't know if stacking Filters is legal, but due to lack of any contrary evidence I assume it should be. In any case, what I found from my debugging is that it seems to be a problem with this stacking of filters. What would happen is that while the bottom filter (if you imagine them stacked up) is in its filter() method, the top filter would get called in the middle, this caused some problems, and hence the warnings I was getting. If anyone can make any sense of it, I think it would be probably useful. Thanks, Igor On Sun, 2005-06-19 at 14:02 +0930, Andrew Cowie wrote: > On Mon, 2005-13-06 at 14:03 -0400, Igor Foox wrote: > > I'm having problem tracing this problem down, it seems that in my sample > > program it doesn't happen, but happens in the real program. > > Gotta love it. > > > I must admit > > that the program has somewhat a spaghetti structure > > That's ok. Ordinarily there is a pretty high bar in the Open Source > world before releasing code, because we are afraid to be judged on our > pasta code. (I took over a month out from coding to write a configure > and Makefile scheme, just so others would be able to build my project). > > But in this case, tracking down bugs in obscure corner cases of > java-gnome that have not previously been exercised is more important. So > if you can tarball your code in some manner, then others can try and > replicate the problem. > > AfC > Adelaide > |