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


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开发者专区《如何释放线程中创建的对象

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值