Opened 14 years ago

Closed 14 years ago

Last modified 14 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 14 years ago.
back trace
deskbar.PNG (30.1 KB ) - added by diver 14 years ago.
new crash
deskbar.2.PNG (5.8 KB ) - added by diver 14 years ago.
BeMenu

Download all attachments as: .zip

Change History (31)

comment:1 by diver, 14 years ago

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 by axeld, 14 years ago

Owner: changed from sikosis to axeld

by diver, 14 years ago

Attachment: deskbar_crash_2.PNG added

back trace

comment:3 by diver, 14 years ago

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

comment:4 by axeld, 14 years ago

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 by axeld, 14 years ago

Owner: changed from axeld to jackburton

comment:6 by jackburton, 14 years ago

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

comment:7 by jackburton, 14 years ago

Status: newassigned

comment:8 by diver, 14 years ago

(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 by jackburton, 14 years ago

This is really weird. Can you reproduce this consistently ?

comment:10 by jackburton, 14 years ago

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

comment:11 by diver, 14 years ago

(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 by jackburton, 14 years ago

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 by diver, 14 years ago

(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.

by diver, 14 years ago

Attachment: deskbar.PNG added

new crash

comment:14 by diver, 14 years ago

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 by jackburton, 14 years ago

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

by diver, 14 years ago

Attachment: deskbar.2.PNG added

BeMenu

comment:16 by jackburton, 14 years ago

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

comment:17 by jackburton, 14 years ago

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 by jackburton, 14 years ago

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 by jackburton, 14 years ago

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 by axeld, 14 years ago

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 by jackburton, 14 years ago

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

comment:22 by axeld, 14 years ago

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 by g.zachrisson@…, 14 years ago

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 by jackburton, 14 years ago

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

comment:25 by jackburton, 14 years ago

Status: assignedclosed

comment:26 by jackburton, 14 years ago

Resolution: fixed

comment:27 by jackburton, 14 years ago

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

comment:28 by korli, 14 years ago

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