ASSERT “Cannot send events to objects owned by a different thread.” SoQt Coin Qt

When  I code  in  SoQt\Coin\Qt environment, I encounter this failure during the app startup.

The Error's infomation just like the following which I copy ,from the DEV Net @ qt.com, and my issue is almost same. You can check the discussion from  here.

ASSERT failure in QCoreApplication::sendEvent: “Cannot send events to objects owned by a different thread. Current thread 2be7670.
Receiver ‘’ (of type ‘QWidget’) was created in thread 2306c00”, file kernel\qcoreapplication.cpp, line 305

ASSERT “Cannot send events to objects owned by a different thread.” SoQt Coin Qt_第1张图片

almost half a day I paid to solve this issue and find out the causing reason. It occurs when you run a debug version of the application  using a release version of the 3rd-part-dll (such as SoQt/Coin 's dll), or when you run a release one using a debug version of the 3rd-part-dll.

Make sure the application's compiling configuration is according to the 3rd-part-dll really used .

If your problem cannot be solved , and it occurs during running  the application,  not the starting process, the failure maybe caused by sending cross-thread event in your program , you can see more about this field from the article here .


在SoQt\Coin\Qt环境下碰到 “不能跨线程发送事件”的错误

可能原因: 编译链接的错误

解决办法:使应用程序生成版本的配置(release或debug)与所使用的第三方组件的生成版本一致。

其他原因:Qt程序中跨线程发送事件

解决办法:请参考Qt的专题讨论文章,或者CSDN Qt开发者专区《如何释放线程中创建的对象》

你可能感兴趣的:(Z_图形算法及编程)