After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 246448 - Program crash when use EPaned with GNOME_ACCESSIBILITY != 1
Program crash when use EPaned with GNOME_ACCESSIBILITY != 1
Status: RESOLVED FIXED
Product: GAL
Classification: Deprecated
Component: EPaned
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Gilbert Fang
Evolution QA team
Depends on:
Blocks: 244862
 
 
Reported: 2003-07-16 13:52 UTC by tim.wo
Modified: 2004-09-29 20:42 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
check the type and init the returned GValue (2.27 KB, patch)
2003-07-17 11:26 UTC, Gilbert Fang
none Details | Review

Description tim.wo 2003-07-16 13:52:38 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.
Comment 1 Gilbert Fang 2003-07-17 11:25:13 UTC
yes, we should check whether we can downcast it to gtk_accessible.
Comment 2 Gilbert Fang 2003-07-17 11:26:04 UTC
Created attachment 42686 [details] [review]
check the type and init the returned GValue
Comment 3 Gilbert Fang 2003-07-17 11:31:48 UTC
commit in a11y branch
Comment 4 Gilbert Fang 2003-07-17 11:32:29 UTC
it is not crash now