[Qt-interest] error

Sujan Dasmahapatra sdh at lmglasfiber.com
Fri Mar 20 08:47:46 CET 2009


I am writing like this for this error

Error:
*** glibc detected *** double free or corruption (out):
0x0000000000768340 ***

////////////////////////////////////////////////////////////////////////
////////
//In the header file(tablewidget.h)
QList <QTableWidgetIem *> item;
QList <Geometry *> geometry;
QList <QString> filenames;
int count;

////////////////////////////////////////////////////////////////////////
//////////
//In the source file (tablewidget.cpp)
Void TableWidget::~TableWidget()
{
	if(count>0) 
	{
		for(int i=0; i<count; i++)
		{
			delete item[count];
			delete geometry[count];
		}

		count = 0;
	}
	
}


Void TableWidget::fileNameUpdate(QString filename, Geometry *geometry)
{
	item[count] = new QTbaleWidgetItem(filename,0);
	filenames.append(filename);
	setItem(count,0,item[count]);
	geometry[count] = new Geometry;
	geometry[count] = geometry;
	count ++;
}
////////////////////////////////////////////////////////////////////////
///////////////////

Can anyone plss tell whats the reason I am getting this error.

Kind Regards,
Sujan Dasmahapatra
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Arnold Krille
Sent: Friday, March 20, 2009 12:49 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] erro

On Friday 20 March 2009 07:55:42 Sujan Dasmahapatra wrote:
> Can U tell me anyone why I am getting this error ?
> *** glibc detected *** double free or corruption (out):
> 0x0000000000768340 ***

Because your system is not truly free???

I mean, come on. Somewhere in your development you played around and
changed some new/delete or malloc/free and these messages started to
show up. Either you still know when that happened and what you played
with or you have to go through the revisions in your version control,
replay them one by one and see when it started.
Then you can check whether you are deleting something twice or you are
deleting something that Qt tries to delete later. Or maybe you create
something with new but delete it with delete[].

But actually your chances of getting concret serious answers would rise
a lot if you gave us more then two lines of text (not counting the 7
lines of your signature)...

Have fun,

Arnold




More information about the Qt-interest-old mailing list