You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am using Qt5 within a WSL instance on Ubuntu 22.04 distro in a project using two dynamic libraries. One dynamic library contains the QApplication and a signal processing algorithm and the other library extends the original application's behavior. The Qt5 framework works properly within the base dynamic library and ONLY within that library when using vcpkg's port. I spent about a week investigating this before realizing that the port may be just broken in WSL. Apparently this works on normal Windows. I don't know if non-WSL Linux is affected.
I tested this using the Qt5 system packages and it works correctly. I removed qt5base requirements from everything including QCustomPlot (using a port overlay) to accomplish that.
Correct output using system qt packages (qtbase5-dev) which WORKS:
---- QApplication is created here ---
QStandardPaths: wrong permissions on runtime directory /run/user/1000/, 0755 instead of 0700
USING extension_lib processed detection figure factory
Application instance (main): QApplication(0x55dd76ce4d20)
Waiting for first items to be streamed from algorithm.
Thread Pool Reset
Starting algorithm.
Current QT version (base_lib.so) 5.15.3
Application instance (base_lib.so): QApplication(0x55dd76ce4d20)
Application instance (extension_lib.so): QApplication(0x55dd76ce4d20)
Current QT version (extension_lib.so) 5.15.3
Figure is fine.
extension_lib::gui::figures::ProcessedDetectionFigure(0x7f7460006fe0)
Parent is fine.
QCustomPlot(0x55dd77318ee0)
Environment
OS: [WSL2.3.26.0 Ubuntu 22.04]
Compiler: GCC 11.4.0
To Reproduce
Steps to reproduce the behavior (assuming the Qt build is simply busted on WSL):
Create C++ project in WSL Ubuntu 22.04 with Qt used in a dynamic library.
Link the library to an executable.
Run the executable and see that application pointers are null in the main and other dynamic libraries using the base library. These may be retrieved using QApplication::instance().
Expected behavior
All pointers to QApplication::instance should never be null in ANY context especially if the QApplication was created in a valid way. Unfortunately I cannot provide exact code being used due to security reasons.
Failure logs
NOTE: extension_lib and base_lib are not the real names of the libraries. Those are replaced for security reasons.
QStandardPaths: wrong permissions on runtime directory /run/user/1000/, 0755 instead of 0700
---- QApplication is created here ---
USING extension_lib processed detection figure factory
**Application instance (main): QObject(0x0) <--- THIS SHOULD NOT HAPPEN**
Waiting for first items to be streamed from algorithm.
Thread Pool Reset
Starting algorithm.
Current QT version (base_lib.so) 5.15.12
**Application instance (base_lib.so): QApplication(0x55591a8b4df0) <-- Valid instance... ?? but only in base lib.**
**Application instance (extension_lib.so): QObject(0x0) <--- THIS ALSO SHOULD NOT HAPPEN**
Current QT version (extension_lib.so) 5.15.3
Figure is fine.
extension_lib::gui::figures::ProcessedDetectionFigure(0x7f0f24001fe0)
Parent is fine.
QCustomPlot(0x55591aec1bd0)
Segmentation fault (core dumped)
Additional context
We are using manifest mode with the vcpkg-registry commit id of 783c0fe1dcdf4616930f336377d65028ffb60f3e. I have tried others, but they have had the same problems. Or they present other issues such as replacing our intended python versioning within CMake when using pybind11.
The text was updated successfully, but these errors were encountered:
tstrutz
changed the title
Qt5 port appears broken in WSL (Ubuntu 22.04)
[qt5-base] Qt5 port appears broken in WSL (Ubuntu 22.04)
Jan 7, 2025
tstrutz
changed the title
[qt5-base] Qt5 port appears broken in WSL (Ubuntu 22.04)
[qt5-base] [runtime-error] Qt5 port appears broken in WSL (Ubuntu 22.04)
Jan 7, 2025
Describe the bug
I am using Qt5 within a WSL instance on Ubuntu 22.04 distro in a project using two dynamic libraries. One dynamic library contains the QApplication and a signal processing algorithm and the other library extends the original application's behavior. The Qt5 framework works properly within the base dynamic library and ONLY within that library when using vcpkg's port. I spent about a week investigating this before realizing that the port may be just broken in WSL. Apparently this works on normal Windows. I don't know if non-WSL Linux is affected.
I tested this using the Qt5 system packages and it works correctly. I removed qt5base requirements from everything including QCustomPlot (using a port overlay) to accomplish that.
Correct output using system qt packages (qtbase5-dev) which WORKS:
Environment
To Reproduce
Steps to reproduce the behavior (assuming the Qt build is simply busted on WSL):
QApplication::instance()
.Expected behavior
All pointers to QApplication::instance should never be null in ANY context especially if the QApplication was created in a valid way. Unfortunately I cannot provide exact code being used due to security reasons.
Failure logs
NOTE: extension_lib and base_lib are not the real names of the libraries. Those are replaced for security reasons.
Additional context
We are using manifest mode with the vcpkg-registry commit id of
783c0fe1dcdf4616930f336377d65028ffb60f3e
. I have tried others, but they have had the same problems. Or they present other issues such as replacing our intended python versioning within CMake when using pybind11.The text was updated successfully, but these errors were encountered: