[Qt-interest] Crash in ~QByteArray

Thiago Macieira thiago at kde.org
Tue Feb 9 21:19:41 CET 2010


Em Terça-feira 9. Fevereiro 2010, às 15.59.27, Josiah Bryan escreveu:
> Does any of this info help with the crashing though?

Not to me, sorry.

I recommend running your application under valgrind and checking if it outputs 
any memory related errors.

As far as we know, QByteArray has no bugs related to memory management. So the 
destructor simply cannot crash on its own.

The backtrace that you posted indicates a crash inside qFree. That means 
either memory smashing or double deletion. If it's double deletion or dangling 
pointer dereferencing, valgrind will tell you about it and tell you where the 
actual deletion happened.

If it's memory smashing, it's a lot harder. The way I've found to debug those 
issues is to put a hardware watchpoint in the pointer itself and see when the 
programs stops by the value being overwritten.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100209/f67082ad/attachment.bin 


More information about the Qt-interest-old mailing list