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 637498 - shell becomes corrupted after interacting with the message tray for a while
shell becomes corrupted after interacting with the message tray for a while
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-12-17 21:01 UTC by William Jon McCann
Modified: 2011-03-20 05:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bt at first warning (14.15 KB, text/plain)
2010-12-17 21:39 UTC, William Jon McCann
  Details
bt at first warning (new) (10.83 KB, text/plain)
2010-12-21 19:26 UTC, William Jon McCann
  Details
messageTray: Avoid setting the boxPointer position during an allocation cycle (2.53 KB, patch)
2010-12-26 13:46 UTC, drago01
none Details | Review
messageTray: Avoid setting the boxPointer position during an allocation cycle (2.57 KB, patch)
2010-12-26 13:53 UTC, drago01
needs-work Details | Review

Description William Jon McCann 2010-12-17 21:01:41 UTC
If I interact with the message tray for a while eventually things go pretty haywire and actors seem to vanish randomly or appear in unexpected locations.

Though it takes a variable amount of time I can reproduce this every time by:

 * Run test-resident and test-markup
 * Expand one of them from the summary
 * Move between the summary sources

Corresponds to the following messages on stderr:

(mutter:11873): Clutter-WARNING **: The actor 'message-tray' is currently inside an allocation cycle; calling clutter_actor_queue_relayout() is not recommended

(mutter:11873): Clutter-WARNING **: The actor 'ShellGenericContainer' is currently inside an allocation cycle; calling clutter_actor_queue_relayout() is not recommended

(mutter:11873): Clutter-WARNING **: The actor 'ClutterGroup' is currently inside an allocation cycle; calling clutter_actor_queue_relayout() is not recommended
Comment 1 William Jon McCann 2010-12-17 21:39:00 UTC
Created attachment 176628 [details]
bt at first warning
Comment 2 William Jon McCann 2010-12-20 16:43:51 UTC
Ok just saw this problem when launching the network system settings so it probably isn't only related to the tray.
Comment 3 drago01 2010-12-21 17:44:22 UTC
This seems to be indeed directly related to the allocation cycle warnings, an easy way to reproduce them is this simple patch:

----------
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index e8ac3ac..48757cc 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -41,6 +41,7 @@ BaseIcon.prototype = {
         box.add_actor(this._iconBin);
 
         this._name = new St.Label({ text: label });
+        this._name.set_tooltip_text(label);
         box.add_actor(this._name);
 
         if (params.createIcon)

----------

As soon as we enter the overview with this one applied the world explodes.
So we have to find out what is causing this warnings and fix it, besides that the fact that things explode this way looks like a clutter bug to me.
Comment 4 William Jon McCann 2010-12-21 19:25:55 UTC
I can reproduce this every time with the following situation in the tray summary:

[user1 chat] [user2 chat] [empathy status icon] [update status icon]

 * click on user1 to expand chat
 * move mouse over user 2 icon
 * boom
Comment 5 William Jon McCann 2010-12-21 19:26:58 UTC
Created attachment 176857 [details]
bt at first warning (new)
Comment 6 William Jon McCann 2010-12-21 20:02:35 UTC
Basically it seems that the following is disallowed by current Clutter:

        this._clickedSummaryItemAllocationChangedId =
            this._clickedSummaryItem.actor.connect('allocation-changed',
                                                   Lang.bind(this, this._adjustNotificationBoxPointerPosition));
        // _clickedSummaryItem.actor can change absolute postiion without changing allocation
        this._summaryMotionId = this._summary.connect('allocation-changed',
                                                      Lang.bind(this, this._adjustNotificationBoxPointerPosition));



Also noticed that _unsetClickedSummaryItem() is doing:
this._clickedSummaryItem.actor.disconnect()

But in other places in the code are modifying this._clickedSummaryItem without doing the accounting for the signal handlers.
Comment 7 drago01 2010-12-26 13:46:33 UTC
Created attachment 177066 [details] [review]
messageTray: Avoid setting the boxPointer position during an allocation cycle

When setting the boxpointer positon while an animation is still
ongoing we might end up queing an allocation while another one is still
ongoing causing warnings like:

(mutter:11873): Clutter-WARNING **: The actor 'message-tray' is currently
inside an allocation cycle; calling clutter_actor_queue_relayout() is not
recommended

Fix that by temporary pausing the animation while setting the position.
Comment 8 drago01 2010-12-26 13:53:19 UTC
Created attachment 177067 [details] [review]
messageTray: Avoid setting the boxPointer position during an allocation cycle

When setting the boxpointer positon while an animation is still
ongoing we might end up queing an allocation during an allocation cycle
and cause warnings like:

(mutter:11873): Clutter-WARNING **: The actor 'message-tray' is currently
inside an allocation cycle; calling clutter_actor_queue_relayout() is not
recommended

which end up in corruptions all over the place.

Fix that by temporary pausing the animation while setting the position.

---

Better commit message
Comment 9 drago01 2010-12-26 14:02:53 UTC
Review of attachment 177067 [details] [review]:

Seems like it still reproduce able with that ....
Comment 10 Owen Taylor 2010-12-28 14:12:37 UTC
(In reply to comment #8)
> Created an attachment (id=177067) [details] [review]
> messageTray: Avoid setting the boxPointer position during an allocation cycle
> 
> When setting the boxpointer positon while an animation is still
> ongoing we might end up queing an allocation during an allocation cycle
> and cause warnings like:

The warning is from queueing a size allocate *while* Clutter is processing the last allocation; an on-going animation, updating only once per frame will not cause that.
Comment 11 drago01 2010-12-30 12:44:29 UTC
(In reply to comment #10)
> (In reply to comment #8)
> > Created an attachment (id=177067) [details] [review] [details] [review]
> > messageTray: Avoid setting the boxPointer position during an allocation cycle
> > 
> > When setting the boxpointer positon while an animation is still
> > ongoing we might end up queing an allocation during an allocation cycle
> > and cause warnings like:
> 
> The warning is from queueing a size allocate *while* Clutter is processing the
> last allocation; an on-going animation, updating only once per frame will not
> cause that.

This was caused by http://bugzilla.clutter-project.org/show_bug.cgi?id=2503 which is fixed now (the corruptions not the warning).
Comment 12 William Jon McCann 2011-03-20 05:47:18 UTC
Ok fixed then.