Home » U++ Library support » Menus&Toolbars » Menu opens, but does not close (Bug?)
Menu opens, but does not close (Bug?) [message #59882] |
Thu, 18 May 2023 08:17  |
 |
peterh
Messages: 108 Registered: November 2018 Location: Germany
|
Experienced Member |
|
|
Hi,
see the attached image.
Sometimes the menu in applications does not close.
It happens reliably from time to time with the "Addressbook" example and the "Menu" example.
However it seems to happen randomly and preferably directly after the Application was startet.
So it could be uninitialized memory somewhere in the GUI framework. Also it could be a race condition.
(These are just my uneducated guesses. I do not know what the reason is)
I found no way to reproduce it every time, the only way is to try it 10 to 20 times.
Run the "Menu" tutorial application. Click the menu, so it opens and move the mause pointer directly to the title bar of the window and move the window.
Try this 10 to 20 times. Then it happens. From time to time the menu does not close and stays on top, while the main window is moved.
This is the most reliable way to reproduce it, but it happens from time to time, when playing around with the application under unknown circumstances.
The menu does not close until a menu item is selected or another windows app is clicked.
(To make a screenshot, I pressed Ctrl-Print, to capture the whole screen)

I am on Windows 11, 64 Bit. My Upp version is 16834 nightly build.
Compiler is 64 bit CLang.
-
Attachment: Menu.png
(Size: 12.62KB, Downloaded 358 times)
[Updated on: Thu, 18 May 2023 09:34] Report message to a moderator
|
|
|
|
Re: Menu opens, but does not close (Bug?) [message #59884 is a reply to message #59883] |
Thu, 18 May 2023 14:41   |
 |
peterh
Messages: 108 Registered: November 2018 Location: Germany
|
Experienced Member |
|
|
Seems to happen more frequently after I used Alt-Tab.
It is however not precisely reproducible.
Also, the menu in this case was not closed, when I click other applications.
I took this screenshot normally with my preferred tool (Faststone). (Which requires several mouse clicks but has the advantage, it has more features and immediately after I took the shot, I can edit it before I save it into a file.)

When the menu is detached in this way, it is still functional, as if it where running in another thread.
-
Attachment: Menu2.png
(Size: 18.60KB, Downloaded 325 times)
[Updated on: Thu, 18 May 2023 15:31] Report message to a moderator
|
|
|
Re: Menu opens, but does not close (Bug?) [message #59885 is a reply to message #59884] |
Thu, 18 May 2023 15:49   |
 |
peterh
Messages: 108 Registered: November 2018 Location: Germany
|
Experienced Member |
|
|
I found a way to exactly reproduce it:
1) Invoke the menu and position the mouse over it, without pressing mouse buttons.
2) Turn the mouse wheel. (This has no visible effect here, but will generate some Windows messages)
3) position the mouse somewhere else, but not over another menu.
Then the menu stays open and is detached.
As soon as the mouse is positioned over another menu item, or a menu function is invoked, the detached menu is closed, but not sooner.
(This is not the only way, but it is the most reliable way I know to trigger the problem for debugging purposes)
[Updated on: Fri, 19 May 2023 03:03] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sat May 10 04:48:56 CEST 2025
Total time taken to generate the page: 0.03114 seconds
|