Menu selection disko in PT

Hmmm I tried release, tried only the parent items, added a hundred submenu items. I still can’t reproduce this. I know it’s a lot of work, but I looked at the commits which could have potentially caused this bug and found the following commits. Can you try reverting the commits and see which one broke the menu behaviour for you:

http://github.com/WeAreROLI/JUCE/commits/ff474962fd302e3ec2568632045b7b4a7b960e3f
http://github.com/WeAreROLI/JUCE/commits/31e454f284b1b1ee4d91d22048f17020b8f00f87
http://github.com/WeAreROLI/JUCE/commits/9e356135a1afea04e1e1e975a3504173345fec7b
http://github.com/WeAreROLI/JUCE/commits/9f4648f85689ee5862291d57917a417a4613ef51
http://github.com/WeAreROLI/JUCE/commits/b574d4530ead35b8392cbc94310fd83e19e31f51
http://github.com/WeAreROLI/JUCE/commits/35b08ecec2e4e493cf5154f7ee579fb52c659175
http://github.com/WeAreROLI/JUCE/commits/2483c80529433b07498630bbde29ad4cfb8f337d
http://github.com/WeAreROLI/JUCE/commits/f866b4ff5e6269eb39fe59d022730f26b5ed57d8

I’ll make time tomorrow (later today) to try and step backwards through the commits to see if I can isolate the commit that caused it (if it exists).

Thanks,

Rail

Probably completely unrelated, but since it happens unreliably, maybe there are mouse events happening, that are jumping because of dust in the optics or alike? So that the flickering could be expected?
Just a thought…

I don’t think so – I tested an old build of my plug-in which was built with JUCE 4.x and I don’t see the same issue.

Cheers,

Rail

Sounds plausible, just wanted to rule out side effects…
Cheers!

No, I can reliably reproduce it here.

Out of interest - what size is your Screen and what resolution are you running?

Cheers,

Rail

Its 2560 x 1440, non-retina (but reports probably have a different resolution).

Hey just to give more information about this- I think it has to do with the window not getting system focus or a race condition where focus stays on the previous window. I’ve seen similar issues in Swift when trying to create dynamic popups and this would explain what’s going on. When the sub-menu windows are removed the OS is trying to give focus back to the previously selected window and if that hasn’t been established as the right one then everything gets screwy. The video should explain it more clearly than I can do with text: https://www.youtube.com/watch?v=hGyfehHY5r8

1 Like

Okay… This is the commit which causes the flashing…

https://github.com/WeAreROLI/JUCE/commit/7d98da98ea4ea811ca5b0bc4ca315b95d9bfc0d1

I had to change the code for the older commits (and also added more menu items to exacerbate the issue):

Rail

2 Likes

Thanks, @Rail_Jon_Rogut for your investigation!

@Roli: will we see a fix and when?
(I am asking because we are coordinating releases here and we need to decide if we have to apply our own fix to your framework. So an answer, that does not take a month is highly appreciated.)

We’re working on it…

1 Like

OK the commit was used for this bug:

I think the following patch fixes both but as I can’t reproduce the menu disco bug, can someone check if this patch actually fixes it:

FixMenuDisco.patch (2.7 KB)

Unfortunately that still causes flashes in a random parent when hovering over the parents in the PopupMenu… unless you click on any parent.

Thanks,

Rail

Damn… ok thank you. I’ll have to rethink this one.

@Rail_Jon_Rogut I hate to mis-use you as a JUCE bug guinea pig, but could you try this patch:

FixMenuDisco.patch (3.5 KB)

Can you please just post a zipped copy of juce_FakeMouseMoveGenerator.h

Thanks,

Rail

https://drive.google.com/file/d/1lpf2taFILcGo-NmZt_jvoSGzt-xT_2XH/view?usp=sharing

Okay… That appears to have fixed the issue. I tested using the demo plug-in code as well as my plug-in.

Here’s the new file:

Rail

OK. This is now fixed on develop with commit d90add3. Thank you @Rail_Jon_Rogut for your help on this one.

2 Likes