#1674 closed bug (fixed)
Change leaf menu settings Deskbar Crashes
Reported by: | cebif | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1/alpha1 |
Component: | Kits/Interface Kit | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Deskbar crashed when I tried to change settings of the leaf menu. I ticked the box for 7 recent folders. I then closed the deskbar leaf menu settings window and Deskbar crashed. It crashes when changing any of the settings in the Deskbar Leaf Menu and always consistent. To reproduce: 1) Poimt the mouse to Deskbar settins and click on Configure Be Menu. 2) Change any settings eg, 7 recent folders. 3) Click in the box on the left to activate the settings. 4) Close the leaf menu window. When you do this Deskbar crashes. I was using haikuimage.23146 on its own partition.
Attachments (2)
Change History (11)
by , 17 years ago
Attachment: | gdb and backtrace added |
---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Summary: | Change lef menu settings Deskbar Crashes → Change leaf menu settings Deskbar Crashes |
---|
by , 17 years ago
Attachment: | patch-bug#1674.diff added |
---|
comment:3 by , 17 years ago
When the TFavoritesConfigWindow is destroyed, all its child views are detached one by one. When the internal _BTextInput_ control of a BTextView is detached, and the BTextView still has the focus, then MakeFocus(false) is called on the BTextView to make sure that it won't need its _BTextInput_ control anymore. MakeFocus calls _Deactivate on the BTextView, which in turn uses GetMouse to set the cursor back to B_CURSOR_SYSTEM_DEFAULT in case it is still over the BTextView. GetMouse is called with the last argument being true (default), which means that it causes pending update events to be processed. With some of the children of the window already being detached and having no owner, processing these events causes trouble.
The attached patch sets the last argument of GetMouse to false, i.e. gets the position without processing pending updates. Just the current mouse position is used to decide whether the cursor is still on the BTextView and needs to be reset to its normal shape.
Regarding BTextView, I am not sure using _Deactivate in MakeFocus is a good idea because this means that the cursor changes back to normal while being over the BTextView even if the BTextView just loses the focus without being truly "deactivated".
comment:4 by , 17 years ago
Calling _Deactivate() is okay, since it de-highlights the selection and does other stuff. Maybe we should just avoid resetting the cursor... I can't remember what beos does here. BTW I think this problem showed up because of my hrev23062, which fixed bug #613 but causes other problems. Maybe we should review how activation works in beos, and remove message processing from UpdateIfNeeded() (except _UPDATE_ messages). Your patch is certainly correct, but GetMouse() should be more robust and don't crash even if you call it with the third parameter = true.
comment:5 by , 17 years ago
follow-up: 7 comment:6 by , 17 years ago
Component: | - Applications/Deskbar → Kits/Interface Kit |
---|---|
Milestone: | R1 → R1/alpha |
Should be fixed with hrev23196, please confirm.
follow-up: 8 comment:7 by , 17 years ago
It seems to work now. Maybe removing the whole SetViewCursor(B_CURSOR_SYSTEM_DEFAULT) part from BTextView::_Deactivate() is not a bad idea. That way, changing focus won't disturb the cursor.
comment:8 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I made a spelling mistake the title should be: Change leaf menu settings Deskbar Crashes