Closed arbephoenix closed 1 month ago
Another input: Seems like reverting commit 6ca7e79215e60ca8d27f2a707a721a9b1ae40b6f is resolving the issue for me. So something with the addition of the maximize button may be causing the issue.
With this revert (see my branch log below) I now have 1.14.25 working ok (built rviz from sources)
eyalr@eyalr-ThinkPad-P14s-Gen-4:~/arbe-gitlab/arberos_1.3/src/rviz$ git log commit a9186cd98b296f0313a4939a82b3baf1f7e55cf1 (HEAD -> noetic-devel) Author: Eyal Reizer eyalreizer@gmail.com Date: Tue May 28 16:46:53 2024 +0300
Revert "Add maximize button to Image and Camera display (#1803)"
This reverts commit 6ca7e79215e60ca8d27f2a707a721a9b1ae40b6f.
commit ba95c1f69da441fe3211670219a96bf57a76fa16 (origin/noetic-devel, origin/HEAD) Author: Robert Haschke rhaschke@techfak.uni-bielefeld.de Date: Sat May 25 22:41:55 2024 +0200
CI: Reenable clang-tidy
CLANG_TIDY arg wasn't forwarded to industrial_ci
commit d1cea53992eac45a1a13835028446008aa3540df (tag: 1.14.25) Author: Robert Haschke rhaschke@techfak.uni-bielefeld.de Date: Tue May 21 08:53:35 2024 +0200
1.14.25
Could you please provide the steps required to produce the second bug? I guess you are adding a new ImageDisplay?
Basically we are calling the following sequence from a custom GUI implemented in c++ that uses librviz Attching the relevant snippet below. The string title that is built below is "Front Camera" nr equals 0 .. std::string title = Radarname[nr] + " Camera"; Camera[nr] = manager_->createDisplay("rviz/Image", title.c_str(), true); ..
The crash happens when the createDisplay API ic called
Looks like titleBarWidget()
fails here:
https://github.com/ros-visualization/rviz/blob/ba95c1f69da441fe3211670219a96bf57a76fa16/src/rviz/panel_dock_widget.cpp#L134
As this works in the rviz GUI, I guess your code is missing something / doing something different than rviz. Does your widget have a title bar at all?
To further debug this issue, it would be helpful if you could provide a minimal C++ example reproducing the issue. Thanks.
Actually it does not have a title bar... It is just a floating image window that displays a usb camera image
Is it a must to have a title bar? It was working fine without it before this addition
In the rviz GUI those floating windows are DockWidgets, which have a title bar. In order to understand, what needs to be changed in the code, I do need a minimal example of your code to reproduce the issue.
From the gdb backtrace, I guess that #1835 should fix your issue. Could you please verify?
Hi,
The specific fundtion that is causing this crash inside our GUI looks like the following. I have extracted it out of a prety large project.
The function below is an example of how we are starting the image window.
rviz::Display Camera_ QWidget CameraWidget;
void viewpanel::enableCamera() { std::string title = "Front Camera" Camera = manager->createDisplay("rviz/Image", title.c_str(), true);
std::string cstr_me = "/cv_camera_0/processed_image";
Camera_->subProp("Image Topic")->setValue(cstr_me.c_str());
Camera_->subProp("Transport Hint")->setValue("raw");
CameraWidget = Camera_->getAssociatedWidget();
Qt::WindowFlags flags = CameraWidget->windowFlags();
flags |= Qt::WindowStaysOnTopHint;
CameraWidget->setWindowFlags(flags);
sleep(1);
CameraWidget->show();
}
}
The crash is hapenning when the createDisplay() API is called. The camera window looks like just a floating window as in the attached picture:
Hope it has enough info to be able to help. Best Regards, Eyal
From the gdb backtrace, I guess that #1835 should fix your issue. Could you please verify?
Yes! I have manually merged this fix into image_display.cpp in the rviz source code and it looks like it is sollving the issue: https://github.com/ros-visualization/rviz/pull/1835/files
I assume this fix is just not merged yet into noetic_devel, right?
See the "working" screenshot:
Best Regards, Eyal
Thanks for your swift reply. I merged the fixes into the noetic-devel branch. I will wait with a new release a few more days. Maybe more issues pop up? I'm sorry for the trouble this latest updated caused. Please give me a reminder, if I didn't pushed a new release within 2 weeks.
with regards to the closed issue "Rviz version 1.14.23: librviz related crash after ubuntu (20.04) update #1832"
Apparently after testing some more, we have actually seen two seperate crash types in 1.14.23 that are not seen with 1.14.20. One was fixed with 1.14.25 buty the other one is still there. See the description of both below. Issue 1 is solved with 1.14.25 but issue 2 still persists
Your environment
Any suggestions?
Best Regards, Eyal