std::thread crash on ubuntu 20.04
-
Hi,
I have developed application to capture video frames from camera which is working good on ubuntu 16. When I moved from ubuntu 16 to ubuntu 20.04, the same application when compiled and built on ubuntu 20.04, it crash while starting capture thread on statement std::thread t1(this).
Another observation is that application crash only when executed in 'Release' mode. While in 'Debug' mode there is no issue. However, on Ubuntu 16 it works good both in debug and release mode.
Please suggest any pointers to debug the issue.QT version 5.13.2
QT creator 4.10.2Thanks,
Pradeep -
Hi and welcome to devnet,
When something crashes only in release mode the first thing to check is whether all the pointers you are using a properly initialized especially if you have if statements that check whether they are null.
-
@PPatel said in std::thread crash on ubuntu 20.04:
statement std::thread t1(this).
In addition to @SGaist suggestion, what is
this
here? Does it have anything to do with Qt? I am not astd::thread
user but I must confess I do not understand which of its constructor overloads you are even invoking here (unless yourthis
is an existingstd::thread
).