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 739764 - Drag & Drop causes spurious ref count imbalance on placeholders
Drag & Drop causes spurious ref count imbalance on placeholders
Status: RESOLVED OBSOLETE
Product: glade
Classification: Applications
Component: general
unspecified
Other Linux
: Normal critical
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-07 10:14 UTC by Tristan Van Berkom
Modified: 2018-03-26 15:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tristan Van Berkom 2014-11-07 10:14:09 UTC
This problem was discovered while reviewing & testing the headerbar
branch (bug 700914) and is the cause of the orphaned project widget
described in the following comment:

    https://bugzilla.gnome.org/show_bug.cgi?id=700914#c39

It only occurs when the button is added by dragging it from
the palette and dropping it into the headerbar placeholder.

Hints for investigation:

  o This is certainly not specific to headerbar

  o To reproduce:

    try adding a (gdb) breakpoint where the headerbar (or GtkBox)
    size property changes and a new placeholder is added.

    Save the address of the newly created placeholder

    Break in the container adaptor's ->replace_child() function

    Drag & Drop a widget to the newly added placeholder

    This will cause the ->replace_child() to be called, replacing the
    placeholder with the new project widget

    Now inspect the reference count of the placeholder

The placeholder is normally expected to have a reference count of 1 (asides
from the references that event handling signals have on the placeholder) and
to automatically destroy itself after having been removed from the container
and the event handling completed.

This is the sequence that normally occurs if drag and drop is not used to
add a widget to the new placeholder.

However, with drag and drop, a seemingly random number of extra references
are added (I've seen the placeholder have reference counts of 5, and reference
counts of 11, after performing the same sequence).
Comment 1 GNOME Infrastructure Team 2018-03-26 15:42:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glade/issues/184.