GNOME Bugzilla – Bug 637498
shell becomes corrupted after interacting with the message tray for a while
Last modified: 2011-03-20 05:47:18 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
Created attachment 176628 [details] bt at first warning
Ok just saw this problem when launching the network system settings so it probably isn't only related to the tray.
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.
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
Created attachment 176857 [details] bt at first warning (new)
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.
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.
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
Review of attachment 177067 [details] [review]: Seems like it still reproduce able with that ....
(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.
(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).
Ok fixed then.