***检测到glibc ***双重释放或损坏(快速更新): [英] *** glibc detected *** double free or corruption (fasttop):

查看:100
本文介绍了***检测到glibc ***双重释放或损坏(快速更新):的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对QByteArray进行清除的调用会产生以下异常:

A call to clear on a QByteArray generates the following exception:

*检测到glibc * /home/yan/FPS2/FPS2:双重释放或损坏(快速更新):

* glibc detected * /home/yan/FPS2/FPS2: double free or corruption (fasttop):

0 ?? 1 ??
2个免费
3 QByteArray :: clear()
4 FPSengine :: getDatagrams
5 FPSengine :: xmitData
6 FPSengine :: getData
7 threadDatalog :: run
8 ??
9 start_thread
10个克隆
11 ?? 0

0 ?? 1 ??
2 free
3 QByteArray::clear()
4 FPSengine::getDatagrams
5 FPSengine::xmitData
6 FPSengine::getData
7 threadDatalog::run
8 ??
9 start_thread
10 clone
11 ?? 0

这是qt错误还是与我的代码有关?我知道QObjects arent线程安全(QT定义不是多个线程调用同一对象实例的同一函数),但是我的函数具有互斥体.即使经常调用相同的函数,我也很少遇到此错误. P.S.防止这种情况的一种方法是将var MALLOC_CHECK_0设置为en

is this a qt bug or could it have something to do with my code? I know QObjects arent thread safe (QT definition not multiple threads calling the same function of the same object instance)but my function has mutexes. Also I very rarely get this error even though the same function is called frequently. P.S. A way to prevent this is to env var MALLOC_CHECK_ 0

此url与类似的问题有关,一些帖子似乎暗示它是由glibc的不兼容版本引起的.

this url relates a similar problem and some posts seems to imply its caused by an incompatible version of glibc.

***已检测到glibc *** perl:double自由或腐败(!prev):0x0c2b7138 ***

推荐答案

这是由于应用程序是多线程的,该对象属于主线程,但在另一个线程中使用,即使我在QBytearray上使用了互斥锁也是如此使用它做readDatagram的UDPsocket也在主线程中...是的,我也需要udpSocket也在主线程中

this is caused by the fact the the application is multithreaded, the object belongs in the mainthread but is used in another thread, even though I used mutexes on the QBytearray the UDPsocket which uses it to do readDatagram is also in the mainthread...and yes I need that udpSocket to be in the main thread as well

这篇关于***检测到glibc ***双重释放或损坏(快速更新):的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆