[PyKDE] QGraphisScene removeItem problem

Andreas Pakulat apaku at gmx.de
Mon Dec 11 14:09:55 GMT 2006


On 11.12.06 14:20:42, Remy Anthoine wrote:
> I'm having trouble using the removeItem operation of a scene in PyQt4
> with python 2.5 under windows XP. Can someone explain why the
> following produces an error of type : "python.exe has encountered a
> problem and needs to close. We are sorry for the inconvenience."

Same happens under Linux, it works in C++, storing the list of items in
a local variable doesn't help, backtrace for Phil:

#0  0xb7076ea7 in QGraphicsItem::scene (this=0x82679e8) at graphicsview/qgraphicsitem.cpp:533
#1  0xb708eb70 in QGraphicsScene::removeItem (this=0x8289490, item=0x82679e8)
    at graphicsview/qgraphicsscene.cpp:1605
#2  0xb7749771 in meth_QGraphicsScene_removeItem (sipSelf=0xb7cbae2c, sipArgs=0xb641a32c)
    at sipQtGuipart1.cpp:79275
#3  0x080bb19e in PyEval_EvalFrame (f=0x8180a9c) at Python/ceval.c:3563
#4  0x080bc10e in PyEval_EvalCodeEx (co=0xb7cbaca0, globals=0xb7d0e824, locals=0x0,
    args=0xb641a2f8, argcount=1, kws=0x0, kwcount=0, defs=0xb641a2d8, defcount=1, closure=0x0)
    at Python/ceval.c:2736
#5  0x08102cb3 in function_call (func=0xb64023ac, arg=0xb641a2ec, kw=0x0)
    at Objects/funcobject.c:548
#6  0x08059557 in PyObject_Call (func=0xb7ceb1e8, arg=0x11, kw=0x11) at Objects/abstract.c:1795
#7  0x0805f9f2 in instancemethod_call (func=0xb64023ac, arg=0xb641a2ec, kw=0x11)
    at Objects/classobject.c:2447
#8  0x08059557 in PyObject_Call (func=0xb7ceb1e8, arg=0x11, kw=0x11) at Objects/abstract.c:1795
#9  0x0808de4b in slot_tp_init (self=0x11, args=0x11, kwds=0x11) at Objects/typeobject.c:4759
#10 0x0809016f in type_call (type=0x824197c, args=0xb7cf502c, kwds=0x0) at Objects/typeobject.c:435
#11 0x08059557 in PyObject_Call (func=0xb7ceb1e8, arg=0x11, kw=0x11) at Objects/abstract.c:1795
#12 0x080b90c2 in PyEval_EvalFrame (f=0x8177264) at Python/ceval.c:3771
#13 0x080bc10e in PyEval_EvalCodeEx (co=0xb7cba3a0, globals=0xb7d0e824, locals=0xb7d0e824,
    args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
    at Python/ceval.c:2736
#14 0x080bc349 in PyEval_EvalCode (co=0x11, globals=0x11, locals=0x11) at Python/ceval.c:484
#15 0x080de7a7 in PyRun_FileExFlags (fp=0x8144008, filename=0xbff23710 "testqg.py", start=17,
    globals=0x11, locals=0x11, closeit=1, flags=0xbff23414) at Python/pythonrun.c:1265
#16 0x080dea64 in PyRun_SimpleFileExFlags (fp=<value optimized out>,
    filename=0xbff23710 "testqg.py", closeit=1, flags=0xbff23414) at Python/pythonrun.c:860
#17 0x08055af8 in Py_Main (argc=1, argv=0xbff234a4) at Modules/main.c:493
#18 0xb7d4bea8 in __libc_start_main () from /lib/tls/libc.so.6
#19 0x08054f41 in _start () at ../sysdeps/i386/elf/start.S:119

Andreas

-- 
Be careful!  Is it classified?




More information about the PyQt mailing list