Opened 14 years ago

Last modified 9 months ago

#4846 assigned bug

thread deadlock in BMenuField

Reported by: augiedoggie Owned by: nobody
Priority: normal Milestone: R1
Component: Kits/Interface Kit/BMenu Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

While attempting to diagnose a problem in the BeAE program, I came across some odd behavior within BMenuField. The problem only occurs, on average, around 1 out of every 5 tries. Basically you have a BMenuItem attached to a BMenuField, which when selected, destroys the BMenuField object. The BMenuField destructor then gets stuck in wait_for_thread() waiting for the mouse tracking thread to die. I hope I've made that clear :)

I'm attaching some sample code which might explain it better. I assume that this code and the stuff from BeAE worked on BeOS, but, I no longer have it installed to test.

Attachments (1)

mftest.cpp (1.5 KB ) - added by augiedoggie 14 years ago.

Download all attachments as: .zip

Change History (8)

by augiedoggie, 14 years ago

Attachment: mftest.cpp added

comment:1 by augiedoggie, 14 years ago

As a side note. I don't see the attached menu being deleted anywhere in the BMenuField source. Isn't it supposed to own the attached BMenu?

in reply to:  1 comment:2 by augiedoggie, 14 years ago

Replying to augiedoggie:

As a side note. I don't see the attached menu being deleted anywhere in the BMenuField source. Isn't it supposed to own the attached BMenu?

Umm, yeah. Disregard that last comment. I wasn't thinking clearly :) I see the internal menubar and menuitem(s) are added as child views.

comment:3 by jackburton, 9 years ago

Still reproduceable ?

in reply to:  3 comment:4 by augiedoggie, 9 years ago

Replying to jackburton:

Still reproduceable ?

Yes, still locks up the application. Tested on x86_gcc2 - hrev48282

comment:5 by axeld, 7 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:6 by pulkomandy, 4 years ago

I can't apparently reproduce the first problem (but then I'm not sure if the window is hung or not, as it's empty. It does close fine).

I uncommented the call to _CreateView in the attached file. In that situation, it seems that the menu from the newly created menufield opens under the window instead of over it (I can see it after closing the window).

comment:7 by pulkomandy, 9 months ago

Component: Kits/Interface KitKits/Interface Kit/BMenu
Note: See TracTickets for help on using tickets.