GNOME Bugzilla – Bug 246448
Program crash when use EPaned with GNOME_ACCESSIBILITY != 1
Last modified: 2004-09-29 20:42:58 UTC
Program crash when: 1. Use EPaned in the program and 2. with GNOME_ACCESSIBILITY != 1 and 3. the program invokes "gtk_widget_get_accessible" e.g. ... hpaned = e_hpaned_new (); atko = gtk_widget_get_accessible (GTK_WIDGET(hpaned)); ... it says: (shortcut-bar-demo:24941): GLib-GObject-WARNING **: invalid cast from `GalA11yEPaned' to `GtkAccessible' (shortcut-bar-demo:24941): GLib-GObject-WARNING **: gtype.c:2967: type id `0' is invalid (shortcut-bar-demo:24941): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced --------------------------------------------------------------------------- possible reason: When use "Run-time inheritance" in GalA11yEPaned, one can not suppose which type the GalA11yEPaned is inheriting form. Actually, when GNOME_ACCESSIBILITY != 1 it inherits from AtkNoOpObject; when GNOME_ACCESSIBILITY = 1 it inherits form GailContainer. So we should be careful when casting a pointer of GalA11yEPaned to any other type. Check the type before casting maybe necessary.
yes, we should check whether we can downcast it to gtk_accessible.
Created attachment 42686 [details] [review] check the type and init the returned GValue
commit in a11y branch
it is not crash now