Skip to content
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

Is there any solution for the QT Thread Error? #55

Open
talesoff opened this issue Jul 29, 2020 · 2 comments
Open

Is there any solution for the QT Thread Error? #55

talesoff opened this issue Jul 29, 2020 · 2 comments

Comments

@talesoff
Copy link

I built BADSLAM on win10 with VS2017 and QT 5.14.2.

I can run the application, but there was an error as follows:

ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 0x0x1dfec82ca40. Receiver '' (of type 'QOffscreenSurface') was created in thread 0x0x1df82c46670", file kernel\qcoreapplication.cpp, line 573

If I ignore the error then application works, but slower than binary built version.

Is there any hint or patch for the issue?

ps. Thank you for sharing nice research result.

@puzzlepaint
Copy link
Collaborator

I remember that during development, there were some issues with thread affinity of Qt-allocated OpenGL context objects (after switching to those from another version of the context allocation code that does not use Qt). So I would expect this issue to very likely come from the same area, which would be the windowless OpenGL context handling in libvis/opengl_context_qt.cc (which deals with a QOffscreenSurface). This code sets the Qt::AA_DontCheckOpenGLContextThreadAffinity attribute to disable some thread affinity check. I guess that perhaps the new issue showed up due to the newer Qt version used by you. Unfortunately, I don't have a patch for this, but maybe the above helps to find the problem.

If I ignore the error then application works, but slower than binary built version.

Did you compile the application and the dependencies in Release mode, and include your CUDA architecture in CMAKE_CUDA_FLAGS for badslam?

@talesoff
Copy link
Author

talesoff commented Aug 5, 2020

For the second issue, I successfully built the program.

Thanks for your help.

Besides, the release-built-program with vs2017 does not load Kinect's stream data. (There may be some mistakes.)
So I built the program with vs2019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants