[Qt-interest] Program Crash on exit inside ~QObjectPrivate at kernel/qobject.cpp:167

Thiago Macieira thiago.macieira at trolltech.com
Wed Sep 9 19:17:37 CEST 2009


Em Quarta-feira 9. Setembro 2009, às 18.38.16, Josiah Bryan escreveu:
> I don't know what exactly to say - other than, I've got a qgraphicsscene
> with one or two custom items (no other items.) Works fine, no leaks,
> everything seems normal. As soon as I close the program, it crashes
> without exiting cleanly. Now, all my code finishes, but the program
> still crashes before returning to the OS.
> 
> Full Disclosure: The single odd thing I know that I do is this: Compile
> & link with Qt 4.5, run against Qt 4.6. (No reason not to compile with
> 4.6, except I want to maintain compat with 4.5 for now since I use
> QtCreator 4.5 to build on windows and 4.6 isn't available yet for
> windows (other than the techpreview this morning.)) I run against 4.6 on
> linux because the video widget I use crashes X windows in 4.5, but runs
> fine in 4.6.
[snip]

> Any throughts or ideas on how to troubleshoot this darn thing?

Hi Josiah

Your description doesn't give us much of a hint. It's basically telling us 
that there's a memory error somewhere, either in Qt or in your program. We 
can't do much more than that.

The traces you posted indicate that it's either a double delete or an invalid 
pointer. And they also indicate you're running Linux, which makes my 
suggestion much easier:

valgrind your application.

Valgrind will tell you what the exact memory error was. If the pointer was 
already deleted, it'll tell you where it was first deleted. If it's just a 
fuzzy pointer (near an existing memory allocation), it'll tell you that. Or it 
may also tell you it's a completely invalid content, which generally indicates 
buffer overrun or uninitialised data.

In any case, if you can post a code sample showing how to reproduce the error, 
we can help you more.
-- 
Thiago Macieira - thiago.macieira (AT) nokia.com
  Senior Product Manager - Nokia, Qt Development Frameworks
     Sandakerveien 116, NO-0402 Oslo, Norway

Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14     San Francisco, California: Nov 2 - 4
      http://qt.nokia.com/qtdevdays2009
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090909/b9ec455d/attachment.bin 


More information about the Qt-interest-old mailing list