Ticket #233 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

[Deskbar] fast clicking leaf button crashes Deskbar

Reported by: diver Owned by: jackburton
Priority: normal Milestone: R1
Component: Applications Version:
Cc: Blocked By:
Platform: Blocking:

Description

Steps to reproduce: Start Tracker. Start clicking leaf button, you will need 2-30 clicks to crash Deskbar.

Attachments

deskbar_crash_2.PNG (52.8 kB) - added by diver 3 years ago.
back trace
deskbar.PNG (30.1 kB) - added by diver 3 years ago.
new crash
deskbar.2.PNG (5.8 kB) - added by diver 3 years ago.
BeMenu

Change History

Changed 3 years ago by diver

It seems that if you start clicking leaf in the same time you start tracker will reduce clicks to crash deskbar. Tested with rev16521 under vmware.

Changed 3 years ago by axeld

  • owner changed from sikosis to axeld

Changed 3 years ago by diver

back trace

Changed 3 years ago by diver

  • summary changed from [Deskbar] fast clicklng leaf button crashes Deskbar to [Deskbar] fast clicking leaf button crashes Deskbar

Changed 3 years ago by axeld

I had a look today, but apart from that, I don't get it :) Someone seems to unlock the window without having it locked before.

Changed 3 years ago by axeld

  • owner changed from axeld to jackburton

Changed 3 years ago by jackburton

I can no longer reproduce this since r16867. Can you confirm ?

Changed 3 years ago by jackburton

  • status changed from new to assigned

Changed 3 years ago by diver

(In reply to comment #4)

I can no longer reproduce this since r16867. Can you confirm ?

I can't reproduce this crash with this back trace anymore, but now i have another one

Changed 3 years ago by jackburton

This is really weird. Can you reproduce this consistently ?

Changed 3 years ago by jackburton

At least, it looks to me that it's not related to menus.

Changed 3 years ago by diver

(In reply to comment #7)

This is really weird. Can you reproduce this consistently ?

Yes, i can reproduce this consistently. Well at least i just did it again.

Changed 3 years ago by jackburton

I can't reproduce it (at least under vmware). Can you try to reinitialize your haiku partition and make a fresh installation, to see if it still happens ? Could be that something is corrupted. Thanks.

Changed 3 years ago by diver

(In reply to comment #10)

I can't reproduce it (at least under vmware). Can you try to reinitialize your haiku partition and make a fresh

installation,

to see if it still happens ? Could be that something is corrupted. Thanks.

This happens with freshly downloaded image in vmware, so this is not a bfs issue. You have to fast click 30-50 times on deskbar logo, maybe using right and left buttons and both of them.

Changed 3 years ago by diver

new crash

Changed 3 years ago by diver

It seems that now i could make deskabar to crash only if i use bith mouse buttons when clicking and sometimes deskbar doesn't crash it simply hangs.

Changed 3 years ago by jackburton

Yes, I can reproduce this. Still it looks something unrelated to menus, maybe it's a problem if views are attached/detached too fast.

Changed 3 years ago by diver

BeMenu

Changed 3 years ago by jackburton

BTW, to reproduce this latest issue, just double click on deskbar very fast.

Changed 3 years ago by jackburton

Okay, found the problem. BMenu::OkToProceed() returns false, and the BNavMenu in the deskbar removes all its items. For some reason, this isn't kept in sync with showing/hiding the menu. BTW, it's not related to the other bug.

Changed 3 years ago by jackburton

Now for real: The cause of this bug is this:

BWindow::MenusBeginning() is called synchronously, while BWindow::MenusEnded() is called asynchronously (a message is sent to the window when the bmenubar (deskbar in this case) finishes tracking. This is how it's done in beos btw. Clicking on the deskbar twice very fast can make MenusBeginning to be called BEFORE the old MenusEnded message reaches the window, so what happens is this:

first click: .MenusBeginning() -> Menus are filled .menu shows up

button release .menu is hidden .Message for MenusEnded is sent to the window

second click .MenusBeginning() -> Menus are filled .menu shows up .MenusEnded() is called because the message reached the window only now.

I could call MenusEnded() synchronously, but I don't know if this would break somthing. At least beos does it asynchronously and it works, so I don't know what's wrong.

Changed 3 years ago by jackburton

I forgot a point :=)

second click .MenusBeginning() -> Menus are filled .menu shows up .MenusEnded() is called because the message reached the window only now -> menuitems are deleted

Changed 3 years ago by axeld

Sure it works under R5: I would guess the reason could be very simple, though: it implements sticky mode, so the window stays open after releasing the mouse, and only the second mouse click opens it again :-) Or have you tried it with "click to open" turned off?

Changed 3 years ago by jackburton

I tried with "click to open" turned off 5 minutes ago, after your message, and it works in that mode too.

Changed 3 years ago by axeld

Maybe it just sends a pointer or something of the menu it is supposed to be closing, and doesn't do anything if those don't match?

Changed 3 years ago by g.zachrisson@…

Is this a general problem with menus or is it Deskbar specific? I have now crashed Deskbar, Tracker and Terminal by clicking quickly several times on an item in each application's menu bar. I used a QEMU image of rev16751.

Changed 3 years ago by jackburton

That's quite an old image. You should try the latest one, as the problem you are experiencing should be gone.

Changed 3 years ago by jackburton

  • status changed from assigned to closed

Changed 3 years ago by jackburton

  • resolution set to fixed

Changed 3 years ago by jackburton

Closing this bug as the deskbar no longer crashes. I'll open a new bug for the other problem.

Changed 3 years ago by korli

  • bug_group set to developers
Note: See TracTickets for help on using tickets.