[PyQt] Regression with guiqwt somewhere after PyQt4 4.10

Dmitry Shachnev mitya57 at ubuntu.com
Wed Nov 13 11:54:40 GMT 2013


The crash happens here (src/corelib/kernel/qmetaobject.cpp:525):

    for (const QMetaObject *m = *baseObject; m; m = m->d.superdata) {
        int i = (MethodType == MethodSignal && priv(m->d.data)->revision >= 4)
                ? (priv(m->d.data)->signalCount - 1) :
(priv(m->d.data)->methodCount - 1);

The problem is that m->d.data is null on the fourth iteration:

(gdb) p **baseObject
$12 = {d = {superdata = 0x8527d80, stringdata = 0x8712588
"LevelsHistogram", data = 0x8fddb48, extradata = 0x0}}
(gdb) p *(baseObject->d.superdata)
$13 = {d = {superdata = 0x8ec6f00, stringdata = 0x88123b0 "CurvePlot",
data = 0x8e156f8, extradata = 0x0}}
(gdb) p *(baseObject->d.superdata->d.superdata)
$14 = {d = {superdata = 0xb13244e0, stringdata = 0x8ecd1a0 "BasePlot",
data = 0x8ef04e0, extradata = 0x0}}
(gdb) p *(baseObject->d.superdata->d.superdata->d.superdata)
$15 = {d = {superdata = 0xb12bc4ec, stringdata = 0x0, data = 0x0,
extradata = 0xb12bc4cd}}

A backtrace is attached.

--
Dmitry Shachnev

On Sat, Nov 9, 2013 at 9:47 PM, Scott Kitterman <debian at kitterman.com> wrote:
> Below is a part of an Ubuntu bug report.  You can find a reproduction test case
> at https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/1249571/+attachment/3903922/+files/test_guiqwt.py
>
> Scott K
-------------- next part --------------
#0  indexOfMethodRelative<4> (normalizeStringData=false, method=0x8f40190 "plot_labels_changed(PyQt_PyObject)", baseObject=<synthetic pointer>)
    at kernel/qmetaobject.cpp:525
        i = <optimized out>
        m = 0xb10594e0
#1  indexOfSignalRelative (normalizeStringData=false, signal=0x8f40190 "plot_labels_changed(PyQt_PyObject)", baseObject=<synthetic pointer>)
    at kernel/qmetaobject.cpp:628
No locals.
#2  QMetaObject::indexOfSignal (this=0x8c61a80, signal=0x8f40190 "plot_labels_changed(PyQt_PyObject)") at kernel/qmetaobject.cpp:609
        m = 0x8c61a80
        i = <optimized out>
#3  0xb7815a60 in qpycore_qobject_emit(QObject*, char const*, _object*) () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
No symbol table info available.
#4  0xb77ec0a2 in meth_QObject_emit (
    sipSelf=<LevelsHistogram(active_item=None, _active_xaxis=<Axis at remote 0x8ca1c0c>, plot_id=None, items=[], filter=<StatefulEventFilter(plot=<...>, all_event_types=frozenset([]), states={0: {}}, state=0, max_state=0, cursors={}, events={}) at remote 0x8d756ec>, manager=None, axes_styles=[<AxeStyleParam(_ticks_font=<FontParam(_DataSet__changed=False, _DataSet__comment=None, _italic=False, _DataSet__icon=u'', _DataSet__title='FontParam', _size=7, _bold=False, _family=u'default', __choose=None) at remote 0x8dd404c>, _DataSet__changed=False, _title_font=<FontParam(_DataSet__changed=False, _DataSet__comment=None, _italic=False, _DataSet__icon=u'', _DataSet__title='FontParam', _size=7, _bold=False, _family=u'default', __choose=None) at remote 0x8dd42cc>, _DataSet__comment=None, _unit='', _DataSet__icon=u'', _color=u'black', _DataSet__title=u'Left', _title=u'') at remote 0x8dd2fac>, <AxeStyleParam(_ticks_font=<FontParam(_DataSet__changed=False, _DataSet__comment=None, _italic=False, _DataSet__icon=u'', _DataSet__title='Fon...(truncated), 
    sipArgs=('2plot_labels_changed(PyQt_PyObject)', <LevelsHistogram(active_item=None, _active_xaxis=<Axis at remote 0x8ca1c0c>, plot_id=None, items=[], filter=<StatefulEventFilter(plot=<...>, all_event_types=frozenset([]), states={0: {}}, state=0, max_state=0, cursors={}, events={}) at remote 0x8d756ec>, manager=None, axes_styles=[<AxeStyleParam(_ticks_font=<FontParam(_DataSet__changed=False, _DataSet__comment=None, _italic=False, _DataSet__icon=u'', _DataSet__title='FontParam', _size=7, _bold=False, _family=u'default', __choose=None) at remote 0x8dd404c>, _DataSet__changed=False, _title_font=<FontParam(_DataSet__changed=False, _DataSet__comment=None, _italic=False, _DataSet__icon=u'', _DataSet__title='FontParam', _size=7, _bold=False, _family=u'default', __choose=None) at remote 0x8dd42cc>, _DataSet__comment=None, _unit='', _DataSet__icon=u'', _color=u'black', _DataSet__title=u'Left', _title=u'') at remote 0x8dd2fac>, <AxeStyleParam(_ticks_font=<FontParam(_DataSet__changed=False, _DataSet__comment=None, _italic=False, ...(truncated))
    at /tmp/buildd/python-qt4-4.10.3/sip/QtCore/qobject.sip:569
        sipIsErr = 0
        a0 = 0x8b9e22c "2plot_labels_changed(PyQt_PyObject)"
        a1 = (<LevelsHistogram(active_item=None, _active_xaxis=<Axis at remote 0x8ca1c0c>, plot_id=None, items=[], filter=<StatefulEventFilter(plot=<...>, all_event_types=frozenset([]), states={0: {}}, state=0, max_state=0, cursors={}, events={}) at remote 0x8d756ec>, manager=None, axes_styles=[<AxeStyleParam(_ticks_font=<FontParam(_DataSet__changed=False, _DataSet__comment=None, _italic=False, _DataSet__icon=u'', _DataSet__title='FontParam', _size=7, _bold=False, _family=u'default', __choose=None) at remote 0x8dd404c>, _DataSet__changed=False, _title_font=<FontParam(_DataSet__changed=False, _DataSet__comment=None, _italic=False, _DataSet__icon=u'', _DataSet__title='FontParam', _size=7, _bold=False, _family=u'default', __choose=None) at remote 0x8dd42cc>, _DataSet__comment=None, _unit='', _DataSet__icon=u'', _color=u'black', _DataSet__title=u'Left', _title=u'') at remote 0x8dd2fac>, <AxeStyleParam(_ticks_font=<FontParam(_DataSet__changed=False, _DataSet__comment=None, _italic=False, _DataSet__icon=u'', _DataSet__title='Fo...(truncated)
        sipCpp = 0x8ef6148
        sipParseErr = 0x0
#5  0x08151711 in call_function (oparg=<optimized out>, pp_stack=0xbfffdb7c) at ../Python/ceval.c:4021
        flags = <optimized out>
        tstate = 0x835c050
        func = <built-in method emit of LevelsHistogram object at remote 0x8d75734>
        w = <optimized out>
        na = <optimized out>
        nk = <optimized out>
        n = <optimized out>
        pfunc = 0x8efdc90
        x = <optimized out>
#6  PyEval_EvalFrameEx (
    f=f at entry=Frame 0x8efdb3c, for file /usr/lib/python2.7/dist-packages/guiqwt/baseplot.py, line 279, in update_axis_style (self=<LevelsHistogram(active_item=None, _active_xaxis=<Axis at remote 0x8ca1c0c>, plot_id=None, items=[], filter=<StatefulEventFilter(plot=<...>, all_event_types=frozenset([]), states={0: {}}, state=0, max_state=0, cursors={}, events={}) at remote 0x8d756ec>, manager=None, axes_styles=[<AxeStyleParam(_ticks_font=<FontParam(_DataSet__changed=False, _DataSet__comment=None, _italic=False, _DataSet__icon=u'', _DataSet__title='FontParam', _size=7, _bold=False, _family=u'default', __choose=None) at remote 0x8dd404c>, _DataSet__changed=False, _title_font=<FontParam(_DataSet__changed=False, _DataSet__comment=None, _italic=False, _DataSet__icon=u'', _DataSet__title='FontParam', _size=7, _bold=False, _family=u'default', __choose=None) at remote 0x8dd42cc>, _DataSet__comment=None, _unit='', _DataSet__icon=u'', _color=u'black', _DataSet__title=u'Left', _title=u'') at remote 0x8dd2fac>, <AxeStyleParam(_ticks_font...(truncated), throwflag=throwflag at entry=0) at ../Python/ceval.c:2666
        sp = 0x8efdc94
        stack_pointer = <optimized out>
        next_instr = <optimized out>
        opcode = <optimized out>
        oparg = <optimized out>
        why = WHY_NOT
        err = <optimized out>
        x = <optimized out>
        v = <optimized out>
        w = <optimized out>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = <optimized out>
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>
        enter = '__enter__'
        exit = '__exit__'


More information about the PyQt mailing list