Opened 13 years ago

Closed 11 years ago

#8539 closed bug (fixed)

[Deskbar] deadlocks during icon resize

Reported by: diver Owned by: jscipione
Priority: normal Milestone: R1
Component: Applications/Deskbar Version: R1/Development
Keywords: Cc:
Blocked By: #9481 Blocking:
Platform: All

Description

This is hrev44133, gcc2hybrid.

  • Open Deskbar preferences
  • Move Icon size slider several times
  • Start clicking any team menu in Deskbar

Usually after several clicks Deskbar deadlocks.

Attachments (2)

Deskbar_deadlock_during_icon_resize (5.6 KB ) - added by diver 13 years ago.
Deskbar-111-debug-25-02-2013-21-07-27.report.txt (4.7 KB ) - added by jscipione 12 years ago.
Debugger report showing thread details on deadlock

Download all attachments as: .zip

Change History (21)

comment:1 by x-ist, 12 years ago

Can't reproduce that in hrev44354 gcc2hybrid (VBox), however ticket #2168 could be related to this one:

The object fExpando is killed and recreated within "void TBarView::PlaceApplicationBar()" in BarView.cpp, which seems to happen rather often. Could it be that we run into a race condition this way.

comment:2 by jscipione, 12 years ago

I also can no longer reproduce this crash. It was possibly fixed by hrev44382.

comment:3 by diver, 12 years ago

I can still reproduce it in hrev44405.

comment:4 by jscipione, 12 years ago

Resolution: fixed
Status: newclosed

Should be fixed in hrev45321. diver can you please verify and reopen if not fixed?

comment:5 by diver, 12 years ago

Resolution: fixed
Status: closedreopened

Now team menu doesn't hang but Leaf button does! It's not clickable and I also can't bring Deskbar preferences window on top in this state of Deskbar.

by jscipione, 12 years ago

Debugger report showing thread details on deadlock

comment:6 by axeld, 12 years ago

Not sure if my assumption is correct, but I would assume that the problems go away if you would forward the message to the window looper, and handle it there instead of from the application thread, ie. introduce a kMsgRebuildApplicationBar, and post that one to the window.

comment:7 by jscipione, 12 years ago

Fix reverted in hrev45324 will need to try something different to fix this one.

comment:8 by jscipione, 12 years ago

Blocked By: 9481 added

comment:9 by jscipione, 12 years ago

Status: reopenedin-progress

comment:10 by diver, 12 years ago

Apparently, it's not related to icon resize. To reproduce:

open /system/preferences/* ; while true ; do hey Deskbar SprE ; done

Apart from deadlock, this aslo makes team list go white if you move any window above the Deskbar.

comment:11 by jscipione, 12 years ago

This bug is not directly related to icon resizing, but by any action that triggers a deadlock due to rapidly deleting and rebuilding the fExpando menu bar. I'm not surprised that the above command, which turns the expander arrows on and off repeatedly, causes the Deskbar to get into an invalid state. I have a branch pending that fixes the problem (I hope) by building the menu bar object one time in the constructor and then only updates the list inside rather than deleting and rebuilding updating the whole menu bar. I have this working pretty well, there are just a few more cases that I need to work out before it is ready to go. Not only will this fix this bug but should make changes to Deskbar noticeably more responsive.

comment:12 by jscipione, 12 years ago

Please check again in hrev45401 which I hope should finally fix this bug.

comment:13 by diver, 12 years ago

The deadlock seems to be gone now, thanks! However, the team list still turns white using the above technique. Should we close this ticket and open another one with this issue?

comment:14 by jscipione, 12 years ago

Does the team list turn white and stay white, or does it flash white and then eventually catch up and redraw? The former would be a bug, but the latter would be normal (although not optimal) behavior.

comment:15 by diver, 12 years ago

It's the latter.

comment:16 by jscipione, 12 years ago

Implemented icon caching in hrev45422 which should help to speed up icon resizing, minimizing although not eliminating the white flashing problem.

comment:17 by diver, 12 years ago

Hmm, I noticed that checkboxes in Deskbar preference window don't react on hey Deskbar SprE Revert button reacts ok, though.

in reply to:  17 comment:18 by jscipione, 12 years ago

Replying to diver:

Hmm, I noticed that checkboxes in Deskbar preference window don't react on hey Deskbar SprE Revert button reacts ok, though.

You've got it backwards, checking the checkbox causes a SprE message to get sent. If you send the message from Terminal than you've circumvented the Preferences, so, this is expected behavior. If you close and reopen the preferences window it'll read the setting and correct itself.

comment:19 by jscipione, 11 years ago

Resolution: fixed
Status: in-progressclosed

Fixed in hrev45401. The white flashing is normal redrawing behavior. Some more Deskbar refactoring is still in progress but the lockup bug described by this ticket should be gone.

Note: See TracTickets for help on using tickets.