[Qt-interest] Program Crash on exit inside ~QObjectPrivate at kernel/qobject.cpp:167
Josiah Bryan
jbryan at productiveconcepts.com
Wed Sep 9 17:38:16 CEST 2009
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.
Console output:
*** glibc detected *** /opt/qtsdk/qt/examples/dviz/src/dviz:
munmap_chunk(): invalid pointer: 0x09f3eb00 ***
======= Backtrace: =========
/lib/libc.so.6(cfree+0x1bb)[0x368021b]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x30c26f1]
/root/Download/qt/lib/libQtCore.so.4(_ZN14QObjectPrivateD0Ev+0xe9)[0x65ea09]
/root/Download/qt/lib/libQtCore.so.4(_ZN7QObjectD2Ev+0x3e6)[0x65fe86]
/opt/qtsdk/qt/examples/dviz/src/dviz[0x8070045]
/opt/qtsdk/qt/examples/dviz/src/dviz[0x8076670]
/root/Download/qt/lib/libQtGui.so.4[0x1194fa2]
/root/Download/qt/lib/libQtGui.so.4(_ZN14QGraphicsScene5clearEv+0x6f)[0x130291f]
/root/Download/qt/lib/libQtGui.so.4(_ZN14QGraphicsSceneD2Ev+0x52)[0x1302b52]
/opt/qtsdk/qt/examples/dviz/src/dviz(_ZNK12QCommonStyle13drawPrimitiveEN6QStyle16PrimitiveElementEPK12QStyleOptionP8QPainterPK7QWidget+0x251b)[0x805fe83]
/root/Download/qt/lib/libQtCore.so.4(_ZN14QObjectPrivate14deleteChildrenEv+0x61)[0x659631]
/root/Download/qt/lib/libQtGui.so.4(_ZN7QWidgetD2Ev+0x1e0)[0xceb7e0]
/opt/qtsdk/qt/examples/dviz/src/dviz(_ZNK12QCommonStyle16sizeFromContentsEN6QStyle12ContentsTypeEPK12QStyleOptionRK5QSizePK7QWidget+0x622)[0x805e3da]
/opt/qtsdk/qt/examples/dviz/src/dviz[0x8063569]
/lib/libc.so.6(__libc_start_main+0xe0)[0x3629390]
/opt/qtsdk/qt/examples/dviz/src/dviz(_ZNK17QGraphicsTextItem16inputMethodQueryEN2Qt16InputMethodQueryE+0x89)[0x805def1]
======= Memory map: ========
00110000-00111000 r-xp 00110000 00:00 0 [vdso]
00111000-00163000 r-xp 00000000 fd:00 41451522
/home/josiah/Download/qt/lib/libQtSvg.so.4.6.0
00163000-00165000 rwxp 00052000 fd:00 41451522
/home/josiah/Download/qt/lib/libQtSvg.so.4.6.0
00165000-001aa000 r-xp 00000000 fd:00 45815157
/home/josiah/Download/qt/lib/libQtXml.so.4.6.0
001aa000-001ac000 rwxp 00044000 fd:00 45815157
/home/josiah/Download/qt/lib/libQtXml.so.4.6.0
001ac000-00261000 r-xp 00000000 fd:00 45815165
/home/josiah/Download/qt/lib/libQtOpenGL.so.4.6.0
00261000-00267000 rwxp 000b4000 fd:00 45815165
/home/josiah/Download/qt/lib/libQtOpenGL.so.4.6.0
00267000-0028c000 r-xp 00000000 fd:00 80478283 /usr/lib/libpng12.so.0.22.0
0028c000-0028d000 rwxp 00025000 fd:00 80478283 /usr/lib/libpng12.so.0.22.0
0028d000-002b4000 r-xp 00000000 fd:00 80479054
/usr/lib/libfontconfig.so.1.2.0
002b4000-002bc000 rwxp 00027000 fd:00 80479054
/usr/lib/libfontconfig.so.1.2.0
002bc000-002ce000 r-xp 00000000 fd:00 95031241 /lib/libz.so.1.2.3
002ce000-002cf000 rwxp 00011000 fd:00 95031241 /lib/libz.so.1.2.3
002cf000-002d3000 r-xp 00000000 fd:00 95031251
/lib/libgthread-2.0.so.0.1400.2
002d3000-002d4000 rwxp 00003000 fd:00 95031251
/lib/libgthread-2.0.so.0.1400.2
002d4000-002d7000 r-xp 00000000 fd:00 95031239 /lib/libdl-2.7.so
002d7000-002d8000 r-xp 00002000 fd:00 95031239 /lib/libdl-2.7.so
002d8000-002d9000 rwxp 00003000 fd:00 95031239 /lib/libdl-2.7.so
002d9000-002ee000 r-xp 00000000 fd:00 95031240 /lib/libpthread-2.7.so
002ee000-002ef000 r-xp 00014000 fd:00 95031240 /lib/libpthread-2.7.so
002ef000-002f0000 rwxp 00015000 fd:00 95031240 /lib/libpthread-2.7.so
002f0000-002f2000 rwxp 002f0000 00:00 0
002f2000-00319000 r-xp 00000000 fd:00 95031242 /lib/libm-2.7.so
00319000-0031a000 r-xp 00026000 fd:00 95031242 /lib/libm-2.7.so
0031a000-0031b000 rwxp 00027000 fd:00 95031242 /lib/libm-2.7.so
0031b000-0033a000 r-xp 00000000 fd:00 95031245 /lib/libexpat.so.1.5.2
0033a000-0033c000 rwxp 0001f000 fd:00 95031245 /lib/libexpat.so.1.5.2
0033c000-0033e000 r-xp 00000000 fd:00 80478273 /usr/lib/libXau.so.6.0.0
0033e000-0033f000 rwxp 00001000 fd:00 80478273 /usr/lib/libXau.so.6.0.0
0033f000-00340000 r-xp 00000000 fd:00 80478276
/usr/lib/libxcb-xlib.so.0.0.0
00340000-00341000 rwxp 00000000 fd:00 80478276
/usr/lib/libxcb-xlib.so.0.0.0
00341000-0035c000 r-xp 00000000 fd:00 80478275 /usr/lib/libxcb.so.1.0.0
0035c000-0035d000 rwxp 0001a000 fd:00 80478275 /usr/lib/libxcb.so.1.0.0
0035d000-00362000 r-xp 00000000 fd:00 80478274 /usr/lib/libXdmcp.so.6.0.0
00362000-00363000 rwxp 00004000 fd:00 80478274 /usr/lib/libXdmcp.so.6.0.0
00363000-0036a000 r-xp 00000000 fd:00 95031250 /lib/librt-2.7.so
0036a000-0036b000 r-xp 00007000 fd:00 950
Program received signal SIGABRT, Aborted.
And the GDB backtrace:
(gdb) bt
#0 0x00110402 in __kernel_vsyscall ()
#1 0x0363c690 in raise () from /lib/libc.so.6
#2 0x0363df91 in abort () from /lib/libc.so.6
#3 0x036749eb in __libc_message () from /lib/libc.so.6
#4 0x0368021b in free () from /lib/libc.so.6
#5 0x030c26f1 in operator delete () from /usr/lib/libstdc++.so.6
#6 0x0065ea09 in ~QObjectPrivate (this=0x9f3eb00) at kernel/qobject.cpp:167
#7 0x0065fe86 in ~QObject (this=0x9f3ea18) at
../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:62
#8 0x08070045 in ~AbstractContent (this=0x9f3ea18) at
items/AbstractDisposeable.h:40
#9 0x08076670 in ~TextContent (this=0x9f3ea18) at items/TextContent.cpp:75
#10 0x01194fa2 in qDeleteAll<QList<QGraphicsItem*>::const_iterator>
(begin=@0xbffba994, end=@0xbffba998) at
../../include/QtCore/../../src/corelib/tools/qalgorithms.h:333
#11 0x0130291f in QGraphicsScene::clear (this=0x9d99d58) at
../../include/QtCore/../../src/corelib/tools/qalgorithms.h:341
#12 0x01302b52 in ~QGraphicsScene (this=0x9d99d58) at
graphicsview/qgraphicsscene.cpp:1343
#13 0x0805fe83 in ~MyGraphicsScene (this=0x9d99d58) at
MyGraphicsScene.cpp:43
#14 0x00659631 in QObjectPrivate::deleteChildren (this=0x9d998a8) at
kernel/qobject.cpp:1980
#15 0x00ceb7e0 in ~QWidget (this=0xbffbab10) at kernel/qwidget.cpp:1471
#16 0x0805e3da in ~MainWindow (this=0xbffbab10) at MainWindow.cpp:426
#17 0x08063569 in main (argc=Cannot access memory at address 0x4b96
) at main.cpp:125
Any throughts or ideas on how to troubleshoot this darn thing?
Thanks!
-josiah
-=-=-=-=-=-=-=-=-=-=-=-=-
Josiah Bryan
Productive Concepts, Inc.
jbryan at pciint.com
(765) 964-6009, ext. 224
More information about the Qt-interest-old
mailing list