Ofxgui intermittently unresponsive

i have a macbook pro with osx 10.8.5 and OF 0.8.0 running with 2 external screens attached.

i am noticing that the ofxgui clicks and drags on to sliders and button boxes do not always get registered. for example the slider does not react to a click and drag. or once it registers the dragging motion the slider still response with the mouse got released or is being dragged on a different gui item.

this problem does not occur when using just the laptop’s screen.



1 Like

I am having this behavior too… Any idea of how to solve?

can you provide some code and more info about your setup ?
Have you checked the FPS of your app? when these are low weird behaviors like this might happen.

1 Like

Thanks @roymacdonald!

It’s working fine most of the time, but sometimes the slider gets locked some time, and I can adjust only moving the mouse wheel, or clicking on some random zones of the slider…

That’s how I define the sliders and their listeners:

in ofApp.h :

ofParameter<int> robotTrigANGLElat;
ofxPanel guiControl;
ofxPanel guiAros;
ofxPanel guiRobot;
ofxGuiGroup inputCONTROL;

void changedRobotTrigAngleLAT(int & robotTrigANGLElat);

in ofApp.cpp :

setup() :

guiRobot.setup("ROBOT ");
ROBOT_CONTROL.add(robotTrigANGLElat.set("ANGLE LAT", 24, 24, 160));

robotTrigANGLElat.addListener(this, &ofApp::changedRobotTrigAngleLAT);


void ofApp::changedRobotTrigAngleLAT(int & robotTrigANGLElat) {
	cout << ofToString( robotTrigANGLElat ) << endl;

There’s nothing strange in that bunch of code.
Although, is this app interacting with something else? (I guess that some sort of robot)
or does it have pieces of code running on an irregular timing? I mean that don’t run on every frame or every certain amount of frames? Maybe something like parsing serial stuff?
My guess is that that you might have some process that takes more time than a single frame. So during this is when you try to interact with the gui, but as the app is running some other piece of code and stays there for more than a single frame the mouse event intended to interact with the gui is dropped and ignored, hence interaction problems.
Does this make sense to you?

1 Like

yes, I have 2 Arduinos connected on 2 differents USB ports, running as Firmata…

… so I can try to limit the FPS? to something like 20 FPS? I don’t need any “visual feedback” on screen. just the gui…

also, on the real situation of use, I will not move the sliders values so fast. just some jumping stepped values required…

I would start by disabling the firmata stuff and checking if this weird behavior continues.
if it happens to get rid of the problem try to run the firmata stuff on a different thread.

Ok! Cool. I never used threads but maybe it’s the time to check it out the examples on this!
Thanks a lot.

ps: just to share you the thing:

…it couldn’t be related to the use of int besides float? I just edited the above post and added some more code…

@moebiussurfing Argentino? yo soy chileno.
The use of ints in this case (because of the range being used doesnt look like problematic).
When you have a small range of ints in the slider it will move in steps, but it will always behave like that.

1 Like

ah genial. sí, BA, antes Barcelona

i had and have this problem with the above mentioned dual screen app. the fps of the main thread at always somewhere between 24-60 fps, with no slowdowns. i have objects moving across the screen and would see if there were unwanted delays and slowdowns. But there are not. So, i do not think the strange gui behaviour is due to slow fps.