[Qt-interest] SIGSEGV When Closing Child Top-Level Window

Josiah Bryan jbryan at productiveconcepts.com
Thu Nov 19 21:36:51 CET 2009



william.crocker at analog.com wrote:
>>> Use a program like valgrind or Purify(IBM/$$$).
>>> It will change your life.
>>>
>> My life doesnt feel very changed right now. Valgrind tells me pretty 
>> much the same thing: Qt is barfing deep inside the core somewhere. It 
>> sounds like inside QWidget::isActiveWindow().
>>
>> Any ideas on how to change my life with this new enlightening knowledge 
>> gained by the the of valgrind? :-)
>>
> 
> No. I can only offer some good news and some bad news.
> The good news is that there is a reason for everything.
> The bad news is that you may never know what that reason is.
> 
> :-)
> 

Har har. You sound like my wife - she quotes that basic phrase.

I don't care what the reason may be - I just want to fix it or work 
around it. :-) And no way that I can find works around it either. I can 
get different stack traces based on different methods I try, but they 
all point to either QWidget::isActiveWindow or 
QApplication::setActiveWindow.

Here's a fun one where I left (C) open (it's opened by A on request of B 
anyway) and just closed B. As soon as B closes, we SIGSEGV with this:

Any epiphanies? :-)


x0064006f in ?? () from /opt/qtsdk-2009.05/qt/lib/libQtCore.so.4
(gdb) bt
#0  0x0064006f in ?? () from /opt/qtsdk-2009.05/qt/lib/libQtCore.so.4
#1  0x00d02fd0 in QWidget::isActiveWindow (this=0xb5ffe50) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/kernel/qwidget.cpp:6335
#2  0x00d03538 in QWidget::palette (this=0xb5ffe50) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/kernel/qwidget.cpp:4348
#3  0x00227eb0 in QGLWidgetGLPaintDevice::beginPaint (this=0xb601584) at 
/var/tmp/qt-x11-src-4.6.0/src/opengl/qglpaintdevice.cpp:147
#4  0x00268fd9 in QGL2PaintEngineEx::begin (this=0x9cee078, 
pdev=0xb5ffe58) at 
/var/tmp/qt-x11-src-4.6.0/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp:1753
#5  0x00e31fd4 in QPainter::begin (this=0xbf9c14c8, pd=0xb5ffe58) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/painting/qpainter.cpp:1772
#6  0x00e329dc in QPainter (this=0xbf9c14c8, pd=0xb5ffe58) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/painting/qpainter.cpp:1396
#7  0x013a5105 in QGraphicsView::paintEvent (this=0xb5eeab0, 
event=0xbf9c1bcc) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/graphicsview/qgraphicsview.cpp:3283
#8  0x00d0addf in QWidget::event (this=0xb5eeab0, event=0xbf9c1bcc) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/kernel/qwidget.cpp:8119
#9  0x01134753 in QFrame::event (this=0xb5eeab0, e=0xbf9c1bcc) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/widgets/qframe.cpp:557
#10 0x011cf612 in QAbstractScrollArea::viewportEvent (this=0x161dc0c, 
e=0xc9489b0) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/widgets/qabstractscrollarea.cpp:1032
#11 0x013a773f in QGraphicsView::viewportEvent (this=0xb5eeab0, 
event=0xbf9c1bcc) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/graphicsview/qgraphicsview.cpp:2745
#12 0x011d2675 in QAbstractScrollAreaFilter::eventFilter 
(this=0xb600f50, o=0xb5ffe50, e=0xbf9c1bcc) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/widgets/qabstractscrollarea_p.h:100
#13 0x0056fe19 in QCoreApplicationPrivate::sendThroughObjectEventFilters 
(this=0x9a549e8, receiver=0xb5ffe50, event=0xbf9c1bcc) at 
/var/tmp/qt-x11-src-4.6.0/src/corelib/kernel/qcoreapplication.cpp:819
#14 0x00ca9526 in QApplicationPrivate::notify_helper (this=0x9a549e8, 
receiver=0xb5ffe50, e=0xbf9c1bcc) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/kernel/qapplication.cpp:4238
#15 0x00cad711 in QApplication::notify (this=0xbf9c257c, 
receiver=0xb5ffe50, e=0xbf9c1bcc) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/kernel/qapplication.cpp:3661
#16 0x0056f9db in QCoreApplication::notifyInternal (this=0xbf9c257c, 
receiver=0xb5ffe50, event=0xbf9c1bcc) at 
/var/tmp/qt-x11-src-4.6.0/src/corelib/kernel/qcoreapplication.cpp:704
#17 0x00d11252 in QWidgetPrivate::drawWidget (this=0xb601458, 
pdev=0xb5ffe58, rgn=@0xbf9c1d48, offset=@0xbf9c1d40, flags=3, 
sharedPainter=0x0, backingStore=0x0)
     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#18 0x00efeaf6 in QWidgetPrivate::repaint_sys (this=0xb601458, 
rgn=@0xbf9c1ddc) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/painting/qbackingstore.cpp:1568
#19 0x00cff7d8 in QWidgetPrivate::syncBackingStore (this=0xb601458, 
region=@0xbf9c1ddc) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/kernel/qwidget.cpp:1669
#20 0x00d2b173 in QETWidget::translatePaintEvent (this=0xb5ffe50, 
event=0xbf9c21f8) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/kernel/qapplication_x11.cpp:5078
#21 0x00d38419 in QApplication::x11ProcessEvent (this=0xbf9c257c, 
event=0xbf9c21f8) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/kernel/qapplication_x11.cpp:3401
#22 0x00d64754 in x11EventSourceDispatch (s=0x9a59ba8, callback=0, 
user_data=0x0) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/kernel/qguieventdispatcher_glib.cpp:146
#23 0x0754f10c in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#24 0x0755254f in ?? () from /lib/libglib-2.0.so.0
#25 0x07552ab5 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#26 0x0059d568 in QEventDispatcherGlib::processEvents (this=0x9a54c78, 
flags=@0xbf9c23f8) at 
/var/tmp/qt-x11-src-4.6.0/src/corelib/kernel/qeventdispatcher_glib.cpp:407
#27 0x00d64515 in QGuiEventDispatcherGlib::processEvents 
(this=0x9a54c78, flags=@0xbf9c2428) at 
/var/tmp/qt-x11-src-4.6.0/src/gui/kernel/qguieventdispatcher_glib.cpp:202
#28 0x0056eaad in QEventLoop::processEvents (this=0xbf9c24a0, 
flags=@0xbf9c2468) at 
/var/tmp/qt-x11-src-4.6.0/src/corelib/kernel/qeventloop.cpp:149
#29 0x0056ee3d in QEventLoop::exec (this=0xbf9c24a0, flags=@0xbf9c24a8) 
at /var/tmp/qt-x11-src-4.6.0/src/corelib/kernel/qeventloop.cpp:201
#30 0x00570c6c in QCoreApplication::exec () at 
/var/tmp/qt-x11-src-4.6.0/src/corelib/kernel/qcoreapplication.cpp:981
#31 0x00ca9207 in QApplication::exec () at 
/var/tmp/qt-x11-src-4.6.0/src/gui/kernel/qapplication.cpp:3570
#32 0x08070a4a in main (argc=1, argv=0xbf9c2634) at main.cpp:22
(gdb) q





More information about the Qt-interest-old mailing list