Re: [java-gnome-hackers] Duplicating assertion `GDK_IS_WINDOW (window)' failed crash
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2010-12-21 16:39:18
|
On Tue, 2010-12-21 at 19:14 +1100, Andrew Cowie wrote: > On Tue, 2010-12-21 at 01:02 +1100, Andrew Cowie wrote: > > On Tue, 2010-12-21 at 00:05 +1100, Andrew Cowie wrote: > > > I still don't have any insight into what's going on with > > > > Ok, I've made some progress. > > Problem located Fix merged to 'mainline' revno 776: Fix coding mistake leading to crashes from: Gdk-CRITICAL "assertion `GDK_IS_WINDOW (window)' failed The leading indicator of trouble was: Gdk-WARNING "losing last reference to undestroyed window" but we were not seeing that since it was arising during the Java VM's Finalizer thread, and the VM is specified to swollow and discard Exceptions which occur in finalizers. Damn. Traced the problem through to Widget's getWindow(). We had written an Override to implement this method since at the time there was not accesor function. Our manually written code was eronously not calling bindings_java_memory_cleanup() [which is a terrible name] which has the effect of taking a Ref so that bindings_java_memory_ref() can discard it after creating the ToggleRef. Though we could have corrected the manually written code, a strong gtk_widget_get_window() now exists, so replace the override with data in GtkWidget.defs and call generated code instead. ++ We really need to do something about this Exceptions being swollowed in Finalizers thing. And, bindings_java_memory_cleanup() needs to GO AWAY. Pissing me off. I haven't been down in these layers of java-gnome for > 3 years. Now that we know what we're doing a little better I'm thinking of merging that function and bindings_java_memory_ref(). But that can wait. AfC Sydney |