Bug 95062 - [Gtk] Several tests launch g_object_ref/unref assertion messages
Summary: [Gtk] Several tests launch g_object_ref/unref assertion messages
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-27 02:15 PDT by Alejandro Piñeiro
Modified: 2012-10-02 10:00 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.78 KB, patch)
2012-10-02 09:45 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro Piñeiro 2012-08-27 02:15:09 PDT
Execute run-webkit-tests with the accessibility tests:

Tools/Scripts/run-webkit-tests  --gtk accessibility  platform/gtk/accessibility

If you take a look to the stderr of some of those tests you will find several assertion messages related to g_object_ref/unref. For example from accessibility/aria-hidden-updates-alldescendants.html:

g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_unref: assertion `G_IS_OBJECT (object)' failed
g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_unref: assertion `G_IS_OBJECT (object)' failed
g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_unref: assertion `G_IS_OBJECT (object)' failed
g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_unref: assertion `G_IS_OBJECT (object)' failed
g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_unref: assertion `G_IS_OBJECT (object)' failed
g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_unref: assertion `G_IS_OBJECT (object)' failed
g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_unref: assertion `G_IS_OBJECT (object)' failed
g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_unref: assertion `G_IS_OBJECT (object)' failed
g_object_ref: assertion `G_IS_OBJECT (object)' failed
g_object_unref: assertion `G_IS_OBJECT (object)' failed

Note: this started to happen after the changes made on bug 94200. Not sure if that means that this bug should be titled with a REGRESSION label.
Comment 1 Zan Dobersek 2012-08-27 11:40:10 PDT
I've recommended using GRefPtr<AtkObject> as the type definition for the PlatformUIElement. That doesn't really work as it causes compilation errors (conversion of 0 from integer to AccessibilityUIElement becomes impossible and the refactoring to avoid this is IMO not really worth the trouble).

To bypass this the m_element member should be checked that it is non-nul before refing/unrefing.
Comment 2 Zan Dobersek 2012-10-02 09:45:22 PDT
Created attachment 166701 [details]
Patch
Comment 3 Zan Dobersek 2012-10-02 09:46:28 PDT
CC-ing a11y folks and reviewers.
Comment 4 Martin Robinson 2012-10-02 09:48:49 PDT
Comment on attachment 166701 [details]
Patch

Thanks!
Comment 5 Zan Dobersek 2012-10-02 10:00:03 PDT
Comment on attachment 166701 [details]
Patch

Clearing flags on attachment: 166701

Committed r130183: <http://trac.webkit.org/changeset/130183>
Comment 6 Zan Dobersek 2012-10-02 10:00:08 PDT
All reviewed patches have been landed.  Closing bug.