I had a interesting talking with mhr3 about this bug. It crashes in this
line:
if (GTK_IS_MENU (piea->priv->entry->menu))
So probably entry is NULL, or menu is not anymore a valid object.
Taking a look to the code, this is a custom atk object associated to a
non-GTK object. Taking a look to the parent (ParentIndicatorAccessible)
it have a callback when the entry is removed, so it is removed from the
list. But PanelIndicatorEntryAccessible doesn't have any code managing
this.
As the accessibility object can survive the base object, atk objects
requires to manage if the base object is destroyed, and changing his
state to ATK_STATE_DEFUNCT accordingly. So the atk-bridge will usually
not interact with a accessible object with that state.
In the case of gtk, they implement this adding a weak_ref to the base
object. But as I said this is custom atk object (not a gtkaccessible
subclass). As far as I see the purpose of this object is expose the
menu.
So I think that it is worth to add a weak_ref to entry->menu. If the
crash happens because the entry->menu is freed, then ATK_STATE_DEFUNCT
management should be added. The easiest way to do that:
* add that weak_ref to the menu: when the menu is destroyed notify the state
change and save somehow that the object was destroyed
atk_object_notify_state_change (self, ATK_STATE_DEFUNCT)
* return ATK_STATE_DEFUNCT on panel_indicator_entry_accessible_ref_state_set
if the menu was destroyed
BTW: in order to return the ROLE and NAME on the initialize method, it
is check entry->label and entry->image, instead of entry->menu. Not sure
if this is correct. Probably it is worth to ask Rodrigo Moya about it.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/863720
Title:
unity-panel-service crashed with SIGSEGV in
atk_object_get_n_accessible_children()
To manage notifications about this bug go to:
https://bugs.launchpad.net/unity/+bug/863720/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs