Page 1 of 1

OSX Virtual Console Bug

Posted: Sun Jul 26, 2015 8:02 pm
by gmint
I posted this once before, but I just wanted to reiterate that it still exists and see if it could possibly be addressed. There is a workaround (which I'll post) but it's really the one remaining bug that causes me problems in a live situation. The issue is that if I switch to another program while QLC+ is running, the Virtual Console can become non-responsive when I go back into QLC+. Functions continue to run, but button presses do not trigger functions appropriately. The workaround is to switch to another application (using command-tab, is how I usually do it) and back to QLC+ which generally causes QLC+ to become responsive again.

I'm glad there's a workaround because I used to think that it was necessary to quit the program when this occurred but it's still a bit problematic when I have to worry that QLC+ is going to become non-responsive when I work on another app.

Re: OSX Virtual Console Bug

Posted: Mon Jul 27, 2015 9:07 am
by mcallegari
Hi George, by "button" do you mean keyboard buttons or external controller buttons ?
A key binding requires the Virtual Console to have the focus to work, otherwise the application cannot grab the keys.
So basically you just need to click anywhere in the VC to restore the focus.

If buttons come from an external controller, then it's a bug and needs to be investigated. I hope it's not specific to OSX though..

Re: OSX Virtual Console Bug

Posted: Mon Jul 27, 2015 3:27 pm
by gmint
Massimo,

I don't know about the keyboard (really don't use it much for QLC) but I'm speaking about both the onscreen buttons (clicking them via mouse) and triggered via MIDI controller. If it's helpful to you, I can probably make a video to more accurately describe the problem, but basically it looks like QLC+ receives the click but doesn't respond. For example, the frame will illuminate while the button is pressed but it won't actually trigger anything or latch properly (if that's the intended behavior).

Re: OSX Virtual Console Bug

Posted: Mon Jul 27, 2015 4:08 pm
by mcallegari
Hi George, probably a simple workspace with the steps to reproduce the issue would help more.

I'm starting to suspect this is an OSX only issue, as Qt might still have glitches on OSX.
Which OSX version are you on right now ?
Has this happened across all the QLC+ versions or only when I switched to Qt5 (so from QLC+ 4.8.5) ?

Re: OSX Virtual Console Bug

Posted: Mon Jul 27, 2015 5:47 pm
by gmint
Massimo,

I've seen the same behavior across many versions of QLC+. I know that when I mentioned this before you indicated that you thought the (then upcoming) switch to Qt5 might solve the issue which is why I thought I would just mention it again at this stage. I actually see this behavior on a couple of different workspaces and versions of OS X, but I've included one that exhibits the issue for your testing.
Lime.qxw
(226.05 KiB) Downloaded 97 times

Re: OSX Virtual Console Bug

Posted: Mon Jul 27, 2015 6:49 pm
by mcallegari
Ok, thanks.
I'll check it ASAP

Re: OSX Virtual Console Bug

Posted: Mon Jul 27, 2015 7:03 pm
by gmint
Thanks Massimo, just let me know if you need anything else from me to replicate it.

Re: OSX Virtual Console Bug

Posted: Tue Jul 28, 2015 2:00 pm
by esotericaqua
I always thought I was somehow crashing the program when this happened... never thought to keep toggling away and back to the application. I too have experienced this for several versions and usually just rebooted QLC+. I'll remember your trick of toggling till the masterminds figure out what's going on.

I'm running the latest QLC+ public release (4.9.1) and lasted OS X public release (10.10.4).

Re: OSX Virtual Console Bug

Posted: Tue Jul 28, 2015 2:00 pm
by gmint
esotericaqua wrote:I always thought I was somehow crashing the program when this happened... never thought to keep toggling away and back to the application. I too have experienced this for several versions and usually just rebooted QLC+. I'll remember your trick of toggling till the masterminds figure out what's going on.

I'm running the latest QLC+ public release (4.9.1) and lasted OS X public release (10.10.4).
Yeah, my brother figured out the workaround and it's saved me a LOT of frustration!

Also, just to confirm, your video is exactly what I'm seeing as well.

Re: OSX Virtual Console Bug

Posted: Tue Jul 28, 2015 5:50 pm
by esotericaqua
Here is a video of the problem, incase it helps. It starts off showing the issue, then shows the issue is resolved using the work around. I then show a fairly consistent way to replicate the problem, and then fix it again with the work around.

The issue happens most when you "cmd+tab" to another application and then just "mouse-click" back to qlc+ rather than "cmd+tab" back.

https://youtu.be/-Uwhfv2aNUM

Re: OSX Virtual Console Bug

Posted: Tue Jul 28, 2015 9:45 pm
by mcallegari
I reproduced the issue with George's project. Bad one indeed.
At the moment I can't tell if it's QLC+ or Qt, but I can tell for sure that the same project works as expected on Linux.

I need some time to investigate what's happening by analyzing some debug messages and by checking the code.

Re: OSX Virtual Console Bug

Posted: Fri Jul 31, 2015 5:02 pm
by mcallegari
I think I found something.
Apparently, a couple of lines of code that are there since the QLC times are causing the issue.
https://github.com/mcallegari/qlcplus/b ... ea.cpp#L66
https://github.com/mcallegari/qlcplus/b ... ea.cpp#L72

Commenting them seems to make QLC+ to behave properly on OSX.

I need to check though if commenting those lines can cause misbehaviours in some other cases.

Re: OSX Virtual Console Bug

Posted: Fri Jul 31, 2015 6:51 pm
by gmint
That would be outstanding!

Re: OSX Virtual Console Bug

Posted: Fri Jul 31, 2015 8:58 pm
by mcallegari
George, very sorry to let you down, but it was a placebo effect :(

I was about to upload a test version for you and I realized the issue is still there. Sometimes it happens with cmd+tab, sometimes minimizing/maximizing QLC+.
Those 2 lines of code are useless anyway.

Can you please confirm that the issue happens only on buttons and only on/off buttons ?
Apparently flash buttons and all the rest works fine.

Re: OSX Virtual Console Bug

Posted: Fri Jul 31, 2015 8:58 pm
by gmint
mcallegari wrote:George, very sorry to let you down, but it was a placebo effect :(

I was about to upload a test version for you and I realized the issue is still there. Sometimes it happens with cmd+tab, sometimes minimizing/maximizing QLC+.
Those 2 lines of code are useless anyway.

Can you please confirm that the issue happens only on buttons and only on/off buttons ?
Apparently flash buttons and all the rest works fine.
No worries Massimo, you've far from let me down! I concur that the on/off buttons seem to be the only ones affected by this bug.

Re: OSX Virtual Console Bug

Posted: Sat Aug 01, 2015 6:19 pm
by erlopez
Thanks for the conversation. I've been having the same issues with the buttons becoming unresponsive. Although I have tried the alt-tab technique, it doesn't really work for me. I've got Ableton Live 9 sending midi messages out to QLC+. Usually this works great, but sometimes it doesn't (usually when my band is about to play a show) and I'm looking forward to a big fix.

Thanks again.

Re: OSX Virtual Console Bug

Posted: Tue Aug 04, 2015 2:20 pm
by mcallegari
Hey guys good news !

Long story short: it should be fixed now and a TEST version is available here: viewtopic.php?f=12&t=3135

Long story: The code causing the issue was there since I forked the original QLC project (Nov 2012)
Basically I think the original author had a functionality in mind, which was never documented and which we all know as "Speed Dial" these days.
If the CTRL key is pressed, on/off buttons in the Virtual Console act like tapping buttons on the function they control !
Thing is, that to switch between applications in Windows and Linux, we use the ALT+Tab key combination. On OSX, the combination is Meta+Tab. Problem is that the Meta key is recognized as CTRL key by Qt !
So basically when doing Meta+Tab, QLC+ was going into this "secret" tapping mode, never detecting the release of the Meta key, cause QLC+ looses the window focus.

For now I commented the piece of code handling the tapping mode. If you guys think it would be a cool feature to have, I can restore it and properly fix the Meta+Tab case.
In my opinion, QLC+ already has all the tapping functionality needed, so I would gladly loose this secret tapping now that I discovered it.

Re: OSX Virtual Console Bug

Posted: Tue Aug 04, 2015 8:18 pm
by esotericaqua
Thanks mcallegari! The test version works great from my testing so far. I'll be able to test it more in-depth later this week.

Interesting about the hidden feature. If others find the feature worthwhile, it might be best to have the key command configurable. But is it worth the development effort? I doubt it.

Re: OSX Virtual Console Bug

Posted: Tue Aug 04, 2015 9:58 pm
by gmint
Massimo,

I'll give it a test right away! Thank you so much for fixing this! I don't need any tapping functionality on my end--I've gone pretty exclusively to MIDI clock for all beat synced stuff.