-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sendEvent assert in Qt 5.15.2 about crossing different threads #457
Comments
Oh what a hell this is.
Hence we've run into a contradiction: Qt debug checks want the event to happen in the Main thread; Gazebo wants the event to happen in the rendering thread. The simplest (and best) solution would be to move the whole rendering to the Main thread, which is something I've been wanting to do since gazebosim/gz-sim#774 From the looks of it, this bug will not be fixable for Garden. The assert itself should be harmless as far as I can see; but if left unfixed it may become a problem in Ubuntu 22.04 |
OK I just confirmed this only repros with DEBUG versions of Qt. The Release version will not trigger the assert. I can also verify this by looking at Qt's source code in #ifndef QT_NO_DEBUG
QCoreApplicationPrivate::checkReceiverThread(receiver);
#endif That check is left out in non-debug builds. This makes me rest a little easier since there won't be a problem with Ubuntu 22.04 |
Environment
main
Description
Steps to reproduce
colcon build --cmake-args -DBUILD_TESTING=OFF -DBUILD_DOCS=OFF -DCMAKE_PREFIX_PATH=/opt/Qt/5.15.2/gcc_64 -DQT_QMAKE_EXECUTABLE=/opt/Qt/5.15.2/gcc_64/bin/qmake --merge-install
It is possible that this bug repros out of the box on Ubuntu 22.04 since it comes with Qt 5.15 by default.
Output
The error happens in
GzRenderer::Render
:Qt does not like that sendEvent() call.
Full callstack:
I'll keep researching
The text was updated successfully, but these errors were encountered: