#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: | ||
Platform: | All |
Description
Steps to reproduce: Start Tracker. Start clicking leaf button, you will need 2-30 clicks to crash Deskbar.
Attachments (3)
Change History (31)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Owner: | changed from | to
---|
comment:3 by , 19 years ago
Summary: | [Deskbar] fast clicklng leaf button crashes Deskbar → [Deskbar] fast clicking leaf button crashes Deskbar |
---|
comment:4 by , 19 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 , 19 years ago
Owner: | changed from | to
---|
comment:7 by , 19 years ago
Status: | new → assigned |
---|
comment:8 by , 19 years ago
comment:11 by , 19 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 , 19 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 , 19 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.
comment:14 by , 19 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 , 19 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.
comment:16 by , 19 years ago
BTW, to reproduce this latest issue, just double click on deskbar very fast.
comment:17 by , 19 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 , 19 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 , 19 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 , 19 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 , 19 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 , 19 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 , 19 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 , 19 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 , 19 years ago
Status: | assigned → closed |
---|
comment:26 by , 19 years ago
Resolution: | → fixed |
---|
comment:27 by , 19 years ago
Closing this bug as the deskbar no longer crashes. I'll open a new bug for the other problem.
comment:28 by , 19 years ago
bug_group: | → developers |
---|
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.