Opened 12 years ago

Last modified 12 years ago

#9481 closed bug

[patch] BMenuBar_Track() is not locking atomically — at Version 2

Reported by: jscipione Owned by: axeld
Priority: high Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #8539
Platform: All

Description (last modified by jscipione)

Because the locking is not-atomic it can cause the app to crash if another thread detaches the menu bar from the window while this method is trying to use it.

The attached patch fixes the problem for me and I detect no regressions but I'd like someone to take a second look. It was discovered while I was attempting to fix #8539 and is (partially) responsible for causing that bug.

Can someone with experience with BMenuBar and BHandler/BLooper take a look at my patch and see if there are any problems with it?

Change History (3)

by jscipione, 12 years ago

Patch that replaces window->(Un)Lock() with (Un)LockLooper()

comment:1 by jscipione, 12 years ago

patch: 01

comment:2 by jscipione, 12 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.