PlotJuggler
PlotJuggler copied to clipboard
New XY plot stuck in loop
I listen to a message either from rosbag or stream, and then try to do an xy plot of two of the fields.
I get a window asking if i want to swap the axes or rename it. If click ok, the box disappears and reappears. Same thing again and again.
The platform is ros noetic ubuntu 20.04 i3
also happens with the dummy data -t. Click _cos, _sin. Right click drag to plot. Window for the X and Y swap and custom name reopens everytime I click ok. Then need to sigterm to kill the program.
Can you confirm the version? 3.1.1?
Yes currently 3.1.1, but I had it before in previous versions too, so I dont think its a new problem.
I am sorry that you are experiencing this issue.
I really want to help you and solve this, but I am not able to reproduce it on my machine :cry:
Do you have any suggestions as to where I could look into the code to find the problem?
It seems to be linked to these lines of code (plotwidget.cpp, line 444):
while (name.empty())
{
SuggestDialog dialog(name_x, name_y, this);
bool ok = (dialog.exec() == QDialog::Accepted); //this line triggers a continue/jump back to the while line when the user clicks 'ok'
Honestly I have no idea how a function call is causing the code to continue/jump back to the loop. I had a look at QT dialog exec function, and they warn:
Note: Avoid using this function; instead, use open(). Unlike exec(), open() is asynchronous, and does not spin an additional event loop. This prevents a series of dangerous bugs from happening (e.g. deleting the dialog's parent while the dialog is open via exec()). When using open() you can connect to the finished() signal of QDialog to be notified when the dialog is closed.
Could this be the cause?
SuggestDialog
Unlikely. I will investigate, but I don't understand why this never happened to me. Are you compiling or using the debian?
If you are compiling, which version of Qt are you using?
The version of Qt is 5.12.8. I tried with both the ubuntu repository version and compiled from source, same problem.
Hello, the error happens when you press the OK button, but when you press ENTER two times, it doesn't. I dunno.
I tried it, but for me it happens regardless of number of times pressing enter/clicking ok, or various combinations
It would seem that this happens under the i3 desktop, but if I switch to the stock ubuntu desktop the problem disappears. Otherwise running the same OS
I am on WSL2 with VcXsrv using OpenGL. Qt is 5.12.8.
It's looping and the only way to stop the loop is by clicking X on Windows' toolbar.
Then PlotJuggler plots several curves with different names depending on how many times Ok was pressed after typing a name.