#9863 closed bug (fixed)
[Interface Kit] BMenu Looper must be locked
Reported by: | diver | Owned by: | axeld |
---|---|---|---|
Priority: | high | Milestone: | R1 |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | anevilyak, degea@… | |
Blocked By: | Blocking: | #10020, #10143, #10313, #10539, #11531, #11587 | |
Platform: | All |
Description (last modified by )
This is hrev45850.
FileTypes crashes with Looper must be locked message.
Launch FileTypes and click Preferred application menu. Without closing the menu click any unselected item in listview on the left.
Attachments (2)
Change History (30)
by , 11 years ago
Attachment: | FileTypes-306-debug-04-07-2013-01-35-13.report added |
---|
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Blocking: | 10020 added |
---|
comment:4 by , 11 years ago
Blocking: | 10127 added |
---|
comment:6 by , 11 years ago
Blocking: | 10127 removed |
---|
follow-up: 10 comment:7 by , 11 years ago
Ok I see, the menu should close when you click outside of its window. Might be a regression, since I remember it was working long ago. The crash shouldn't happen anyway, though, even if the menu was opened.
comment:8 by , 11 years ago
Blocking: | 10143 added |
---|
comment:9 by , 11 years ago
BTW, probably the easiest way to reproduce this crash is to use MidiPlayer.
comment:10 by , 11 years ago
Replying to jackburton:
Ok I see, the menu should close when you click outside of its window. Might be a regression, since I remember it was working long ago.
Seems the code was removed in commit 85c30aeccb4d4c0ac11c5bf46ff41ed48e5ec630:
Remove extraneous code with respect to telling a menu to close which was breaking various cases where menus coexisted in a window with a view which was using event masks:
- If one invoked the menu via, e.g. a BMenuField, and then tried to choo an item on it, the mouse down would get captured, the menu would be closed, and the mouse event would be thrown away without ever reaching the event mask view.
- Furthermore, since the menu was told to terminate early, it would dec that the user hadn't actually chosen that item (the escape key case), and never actually invoke it.
Fixes the menu fields in the mouse preflet being broken.
comment:12 by , 11 years ago
I'm afraid I don't really have anything to add beyond what the commit message said. As stated, in the case of the mouse preflet, an event mask is used so that the preflet live updates when the user clicks mouse buttons, regardless of whether the preflet has focus or not. However, without the above changeset, attempting to select anything from the menu fields results in a no-op as described, i.e. the menu item never gets invoked. It'd seem some other means would need to be found to fix that issue without causing the current one, but as it is right now, I'd have no idea how to go about that, as I haven't touched the menu code at all in the intervening 2 years, and consequently don't really remember any of it, apart from it being quite convoluted/hairy.
comment:13 by , 11 years ago
Maybe it could be solved by reintroducing that code in BWindow::DispatchMessage(), but instead of eating the B_MOUSE_DOWN message by returning, we could use it to close the menu, but then dispatch the message anyway. This way we would basically "emulate" the use of SetMouseEventMask() for BMenu. Worth a try.
comment:14 by , 11 years ago
Blocking: | 10313 added |
---|
comment:15 by , 11 years ago
Blocking: | 10539 added |
---|
comment:16 by , 11 years ago
Description: | modified (diff) |
---|
comment:17 by , 11 years ago
Cc: | added |
---|
comment:18 by , 11 years ago
Priority: | normal → high |
---|
Dang, today we've found a new way to trigger this, without even clicking on the widget at all.
dsuden got this sc a few times today when typing text in a BTextControl which I have coded to also interact with a BMenuField::SetValue() et al. Didn't see that crash myself but Dane swears it occurs without clicking on the menufield itself, so logically it can only be menufield.SetValue() which calls the menu tracking (which I consider a bug-on-top-of-this-bug) and the menu tracking thread in turns trips the BView::_CheckLock()
assertion.
Tentatively giving this better visibility with a priority bump, though I understand cleaning up the menu code represents dozens or hundreds of hours of work, and no quick fix seems in sight at this point.
by , 11 years ago
Attachment: | AKTTE.report added |
---|
CheckLock() crash, presumably in our BMenuField (without having clicked it!)
comment:19 by , 10 years ago
Blocking: | 11531 added |
---|
comment:20 by , 10 years ago
Blocking: | 11531 removed |
---|---|
Summary: | [FileTypes] Looper must be locked → [Interface Kit] BMenu Looper must be locked |
comment:21 by , 10 years ago
Blocking: | 11531 added |
---|
comment:23 by , 10 years ago
This happens to me in Network Preferences, fresh install of hrev48472, when I select <choose automatically> on the wifi interface to display the list of network names. Same list is not fatal to deskbar network.
comment:24 by , 10 years ago
This was fixed in hrev48043, at least for the original problem. Network Preferences is still a problem.
comment:26 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed Network in hrev48511 (with some flickering).
comment:27 by , 10 years ago
I could not reproduce the FileTypes crash here at first try. I did now and the fix in hrev48511 should work as well since it's the same backtrace.
comment:28 by , 10 years ago
Looks like you're gonna be dsuden's hero; notifying him to try the new hrev.
Backgrounds and MidiPlayer crashes with the same back trace. Probably a variant of #8689.