Comment 4 for bug 785318

Revision history for this message
Harald Sitter (apachelogger) wrote :

And so it is.
The global static pod gets destroyed before the unregister is called, hence the nil pointer. Why this happens is unknown to me, but supposedly it could be easily solved by checking the ptr before trying to access it.

Should be report to Qt I guess.

closing /usr/lib/libQtOpenGL.so.4...
Hardware watchpoint 2: this_registeredInterpolators

Old value = {pointer = {_q_value = 0x60e100}, destroyed = false}
New value = {pointer = {_q_value = 0x0}, destroyed = false}
QGlobalStaticDeleter<QVector<QVariant (*)(void const*, void const*, double)> >::~QGlobalStaticDeleter (
    this=0x7ffff6699b28, __in_chrg=<value optimized out>)
    at ../../include/QtCore/../../src/corelib/global/qglobal.h:1824
warning: Source file is more recent than executable.
1824 globalStatic.destroyed = true;
(gdb) bt
#0 QGlobalStaticDeleter<QVector<QVariant (*)(void const*, void const*, double)> >::~QGlobalStaticDeleter (
    this=0x7ffff6699b28, __in_chrg=<value optimized out>)
    at ../../include/QtCore/../../src/corelib/global/qglobal.h:1824
#1 0x00007ffff765fd3d in __cxa_finalize (d=0x7ffff6699700) at cxa_finalize.c:56
#2 0x00007ffff62639d6 in __do_global_dtors_aux () from /usr/lib/libQtCore.so.4
#3 0x0000000000000000 in ?? ()
(gdb) c
Continuing.
Hardware watchpoint 2: this_registeredInterpolators

Old value = {pointer = {_q_value = 0x0}, destroyed = false}
New value = {pointer = {_q_value = 0x0}, destroyed = true}
QGlobalStaticDeleter<QVector<QVariant (*)(void const*, void const*, double)> >::~QGlobalStaticDeleter (
    this=0x7ffff6699b28, __in_chrg=<value optimized out>)
    at ../../include/QtCore/../../src/corelib/global/qglobal.h:1825
1825 }
(gdb) c
Continuing.

Breakpoint 1, registeredInterpolators () at animation/qvariantanimation.cpp:401
401 Q_GLOBAL_STATIC(QInterpolatorVector, registeredInterpolators)
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
QVariantAnimation::registerInterpolator (func=0, interpolationType=67)
    at animation/qvariantanimation.cpp:437
437 if (int(interpolationType) >= interpolators->count())
(gdb) bt
#0 QVariantAnimation::registerInterpolator (func=0, interpolationType=67)
    at animation/qvariantanimation.cpp:437
#1 0x00007ffff684cb4b in qUnregisterGuiGetInterpolator (this=<value optimized out>,
    __in_chrg=<value optimized out>) at animation/qguivariantanimation.cpp:82
#2 qUnregisterGuiGetInterpolator__dest_class__::~qUnregisterGuiGetInterpolator__dest_class__ (
    this=<value optimized out>, __in_chrg=<value optimized out>) at animation/qguivariantanimation.cpp:94
#3 0x00007ffff765fd3d in __cxa_finalize (d=0x7ffff7330e60) at cxa_finalize.c:56
#4 0x00007ffff6842246 in __do_global_dtors_aux () from /usr/lib/libQtGui.so.4
#5 0x0000000000000000 in ?? ()