[PyQt] QModelIndex.internalPointer

Hans-Peter Jansen hpj at urpla.net
Sun May 22 01:23:35 BST 2011


On Wednesday 18 May 2011, 16:03:59 Andrei Kopats wrote:
> Here is example.
> Unfortunately, with it I can reproduce crash only if reference to
> integer was passed to createIndex()
>
> In the attachment you can find test script, and execution log. The
> log also contains my system info.

Confirmed, and from what I can see, this should not happen.
Mind converting it to C++, and posting code and results here, just to 
exclude an Qt issue?

 > gdb python -ex "set args test2.py" -ex run
Starting program: /usr/bin/python test2.py
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
meth_QModelIndex_internalPointer (sipSelf=0xb7c3bf44, sipArgs=0xb7c4f02c)
    at /usr/src/debug/PyQt-x11-gpl-snapshot-4.8.5-4bd2045a6bc8/sip/QtCore/qabstractitemmodel.sip:52
52              Py_INCREF(sipRes);
Current language:  auto; currently c++
(gdb) bt
#0  meth_QModelIndex_internalPointer (sipSelf=0xb7c3bf44, sipArgs=0xb7c4f02c)
    at /usr/src/debug/PyQt-x11-gpl-snapshot-4.8.5-4bd2045a6bc8/sip/QtCore/qabstractitemmodel.sip:52
#1  0xb7e9d815 in PyCFunction_Call (func=0x80e824c, arg=0xb7c4f02c, kw=0x0) at Objects/methodobject.c:81
#2  0xb7ef04c5 in PyEval_EvalFrameEx (f=0x8133d2c, throwflag=0) at Python/ceval.c:3679
#3  0xb7ef027d in PyEval_EvalFrameEx (f=0x805ece4, throwflag=0) at Python/ceval.c:3765
#4  0xb7ef5dbf in PyEval_EvalCodeEx (co=0xb7c7c7b8, globals=0xb7c7302c, locals=0xb7c7302c, args=0x0, argcount=0, 
    kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2942
#5  0xb7eedcb3 in PyEval_EvalCode (co=0xb7c7c7b8, globals=0xb7c7302c, locals=0xb7c7302c) at Python/ceval.c:515
#6  0xb7f0fb1c in run_mod (mod=<value optimized out>, filename=<value optimized out>, globals=0xb7c7302c, 
    locals=0xb7c7302c, flags=0xbfffeba8, arena=0x8076008) at Python/pythonrun.c:1330
#7  0xb7f0fbdb in PyRun_FileExFlags (fp=0x80ac1e8, filename=0xbfffef5e "test2.py", start=257, globals=0xb7c7302c, 
    locals=0xb7c7302c, closeit=1, flags=0xbfffeba8) at Python/pythonrun.c:1316
#8  0xb7f105cf in PyRun_SimpleFileExFlags (fp=0x80ac1e8, filename=0xbfffef5e "test2.py", closeit=1, flags=0xbfffeba8)
    at Python/pythonrun.c:926
#9  0xb7f10858 in PyRun_AnyFileExFlags (fp=0x80ac1e8, filename=0xbfffef5e "test2.py", closeit=1, flags=0xbfffeba8)
    at Python/pythonrun.c:731
#10 0xb7f1ce52 in Py_Main (argc=1, argv=0xbfffec74) at Modules/main.c:597
#11 0x08048692 in main (argc=Cannot access memory at address 0x0
) at Modules/python.c:23


python: 2.6
sip: 4.12.3-snapshot-274e38133e7a
qt4: 4.7.1
pyqt4: snapshot-4.8.5-4bd2045a6bc8

Pete


More information about the PyQt mailing list