Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#233 closed bug (fixed)

[Deskbar] fast clicking leaf button crashes Deskbar

Reported by: diver Owned by: jackburton
Priority: normal Milestone: R1
Component: Applications Version:
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

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

Attachments (3)

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

Download all attachments as: .zip

Change History (31)

comment:1 Changed 13 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.

comment:2 Changed 13 years ago by axeld

Owner: changed from sikosis to axeld

Changed 13 years ago by diver

Attachment: deskbar_crash_2.PNG added

back trace

comment:3 Changed 13 years ago by diver

Summary: [Deskbar] fast clicklng leaf button crashes Deskbar[Deskbar] fast clicking leaf button crashes Deskbar

comment:4 Changed 13 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.

comment:5 Changed 13 years ago by axeld

Owner: changed from axeld to jackburton

comment:6 Changed 13 years ago by jackburton

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

comment:7 Changed 13 years ago by jackburton

Status: newassigned

comment:8 Changed 13 years ago by diver

(In reply to comment #4)

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

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

comment:9 Changed 13 years ago by jackburton

This is really weird. Can you reproduce this consistently ?

comment:10 Changed 13 years ago by jackburton

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

comment:11 Changed 13 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.

comment:12 Changed 13 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.

comment:13 Changed 13 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 13 years ago by diver

Attachment: deskbar.PNG added

new crash

comment:14 Changed 13 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.

comment:15 Changed 13 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 13 years ago by diver

Attachment: deskbar.2.PNG added

BeMenu

comment:16 Changed 13 years ago by jackburton

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

comment:17 Changed 13 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.

comment:18 Changed 13 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.

comment:19 Changed 13 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

comment:20 Changed 13 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?

comment:21 Changed 13 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.

comment:22 Changed 13 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?

comment:23 Changed 13 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.

comment:24 Changed 13 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.

comment:25 Changed 13 years ago by jackburton

Status: assignedclosed

comment:26 Changed 13 years ago by jackburton

Resolution: fixed

comment:27 Changed 13 years ago by jackburton

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

comment:28 Changed 13 years ago by korli

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