Closed Tomas-Deane closed 3 weeks ago
I don't see exactly what the issue is and how it is related to the plugin. Can you provide clear steps on how to reproduce this? Is this only an issue with the snap and works otherwise with a "native" Qt Creator installation?
The issue is resolved since I freshly installed qt 6.6.3, qtcreator 13.0.0, and the plugin.
Previously I only received the segmentation fault crashes specifically upon creating a ROS project using Colcon as the build system. It happened on both the snap and native installations. I did not think that the issue was related to incompatible versions because the ros qtc plugin showed as enabled successfully in the plugin manager, and I believe installing through snap manages qt and qtc versions. Also creating a ros project using another build system did not lead to a crash.
I will close this issue.
I don't see exactly what the issue is and how it is related to the plugin. Can you provide clear steps on how to reproduce this? Is this only an issue with the snap and works otherwise with a "native" Qt Creator installation?
Apologies for last message, this error has begun to happen again and fresh installs do not solve now.
I do have the plugin working on a different laptop also with Ubuntu 22.04, Foxy, Qt 6.7.2 and QtC 14.0.1. But for various reasons i need to get it working on the original machine.
In terms of replicating, I am on Ubuntu 20.04, using ROS Foxy and Colcon. I have tried native installations of Qt 6.6.3 paired with Qt Creator 13.0.2, 13.0.0 and the 13.1 ros qtc plugin release. I also tried uninstalling these and instead installing Qt 6.7.2 paired with Qt Creator 14.0.1 and the 14.1 ros qtc plugin release. The Qt versions and QtC 14 were installed from the online installer, QtC 13 from here https://download.qt.io/official_releases/qtcreator/13.0/13.0.2/installer_source/linux_x64/ I installed the plugin using both the curl command in the readme and also by installing the zip file to the ~/Qt/Tools/QtCreator/lib/qtcreator/plugins/, then opening qtcreator > help > about plugins > install. I also tried installing through snap. All lead to the same error.
I take it for granted that the error is related to the plugin because Qt and QtCreator function fine, and I only get the seg fault when trying to open a .workspace file with the build system as colcon.
All that I need to do to replicate the issue is install Qt, QtCreator, ros qtc plugin. Create simple ros2 foxy workspace. Launch QtCreator. Create project. (Foxy, Colcon) QtCreator then generates the .workspace file and crashes when opening the editor screen.
Upon reopening qtcreator and opening the project with the .workspace file QtCreator will crash in the same manner.
intel@intelnuc3:~$ source /opt/ros/foxy/setup.bash
intel@intelnuc3:~$ mkdir test
intel@intelnuc3:~$ cd test
intel@intelnuc3:~/test$ mkdir src
intel@intelnuc3:~/test$ cd src
intel@intelnuc3:~/test/src$ ros2 pkg create --build-type ament_cmake my_pubsub
going to create a new package
package name: my_pubsub
destination directory: /home/intel/test/src
package format: 3
version: 0.0.0
description: TODO: Package description
maintainer: ['intel <email@gmail.com>']
licenses: ['TODO: License declaration']
build type: ament_cmake
dependencies: []
creating folder ./my_pubsub
creating ./my_pubsub/package.xml
creating source and include folder
creating folder ./my_pubsub/src
creating folder ./my_pubsub/include/my_pubsub
creating ./my_pubsub/CMakeLists.txt
intel@intelnuc3:~/test/src$ cd ..
intel@intelnuc3:~/test$ colcon build
[0.456s] WARNING:colcon.colcon_ros.prefix_path.ament:The path '/home/intel/test/install/my_pubsub' in the environment variable AMENT_PREFIX_PATH doesn't exist
[0.456s] WARNING:colcon.colcon_ros.prefix_path.catkin:The path '/home/intel/test/install/my_pubsub' in the environment variable CMAKE_PREFIX_PATH doesn't exist
Starting >>> my_pubsub
Finished <<< my_pubsub [0.75s]
Summary: 1 package finished [1.04s]
intel@intelnuc3:~/test$ qmake --version
QMake version 3.1
Using Qt version 6.6.3 in /home/intel/Qt/6.6.3/gcc_64/lib
intel@intelnuc3:~/test$ ~/Qt/Tools/QtCreator/bin/qtcreator
Failed to initialize instances shared memory: "QSharedMemory::handle: doesn't exist"
Segmentation fault (core dumped)
intel@intelnuc3:~/test$ ~/Qt/Tools/QtCreator/bin/qtcreator
Segmentation fault (core dumped)
If you have more questions or need more details please let me know, I am eager to solve this problem. Thanks very much for any help. I hope any of the above terminal outputs are of use to you.
I still cannot reproduce this. I am using Qt Creator 14.0.1 from the online installer (i.e. located at ~/Qt/Tools/QtCreator/
) and installed the plugin from the archive with the curl
command.
I created a workspace with the layout:
.
└── src
└── my_pubsub
├── CMakeLists.txt
├── include
│ └── my_pubsub
├── package.xml
└── src
and then created a new project -> "ROS Workspace" -> Colcon and jazzy. The workspaces opens and I can compile. After this, the layout looks as expected:
.
├── bla_ws.workspace
├── build
│ ├── COLCON_IGNORE
│ └── my_pubsub
├── install
│ ├── COLCON_IGNORE
│ ├── local_setup.bash
│ ├── local_setup.ps1
│ ├── local_setup.sh
│ ├── _local_setup_util_ps1.py
│ ├── _local_setup_util_sh.py
│ ├── local_setup.zsh
│ ├── my_pubsub
│ ├── setup.bash
│ ├── setup.ps1
│ ├── setup.sh
│ └── setup.zsh
├── log
│ ├── build_2024-08-07_21-41-59
│ ├── COLCON_IGNORE
│ ├── latest -> latest_build
│ └── latest_build -> build_2024-08-07_21-41-59
└── src
└── my_pubsub
Other than different ROS 2 versions (foxy vs jazzy) I cannot see why yours should fail and mine not. Unless you want to compile and link Qt, you do not have to install Qt manually to use Qt Creator. The offline and online installed Qt Creator versions come with their own Qt distribution.
If you want to further debug this, I can only suggest that you take a look at the README again, in particular the section about "Debugging" with gdb
. Compile the plugin from source with debug info and then generate a backtrace.
To update, after installing from source the plugin worked fine and led to no crashes, this is still the case after some time. Unfortunately I still do not know the exact reason for the initial crashes.
Unfortunately I still do not know the exact reason for the initial crashes.
Did you follow the Development & Debugging instructions that I mentioned in my previous post to debug the issue and create a backtrace from the crash?
I am new to ros and trying to get qtcreator working with a ros project. Distro=Foxy, Build System=Colcon, OS=Ubuntu 20.04
I am launching qtcreator through the terminal, first sourcing /opt/ros/foxy/setup.bash, then sourcing install/setup.bash
With qtcreator-ros installed through snap when I create a ros project (foxy, colcon) qt crashes after creating only the .workspace file:
I can reopen this project using the created .workspace file (only when installed through snap). With no CMakeLists.txt in the project im unsure how to make the packages in the src folder visible in qt. And when trying to build the project this is the compile output:
When following the manual installation guide in the readme then this is the output when creating a ros project (again only the .workspace file is created before the crash):
And the output when trying to reopen that project:
QMake -v: QMake version 3.1, Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu The only version file in the ~/Qt directory is 6.7.2
Following the debug steps in the qt terminal (qtcreator-ros) I received this output:
Thank you for any help. I realise this issue is similar to #496, https://github.com/ros-industrial/ros_qtc_plugin/issues/496, but that seems to have been solved in a push and my installations are fresh.