[Kde-bindings] [Bug 141568] New: python-dcop: Crash when calling ktorrent dcop method

Olav Vitters bugzilla-kde at bkor.dhs.org
Sun Feb 11 23:28:34 UTC 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=141568         
           Summary: python-dcop: Crash when calling ktorrent dcop method
           Product: bindings
           Version: unspecified
          Platform: Mandriva RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: general
        AssignedTo: kde-bindings kde org
        ReportedBy: bugzilla-kde bkor dhs org


Version:            (using KDE KDE 3.5.6)
Installed from:    Mandriva RPMs
Compiler:          gcc 4.1.2 gcc-4.1.2-0.20070115.1mdv2007.1
OS:                Linux

I am using pydcop to call a KTorrent method. A specific one fails, getTorrentInfo; but only if I call it with a valid torrent number. Since the last time this worked, I upgraded KTorrent from 2.0.3 (IIRC) to 2.1 and kdebindings from 3.5.5 to 3.5.6. Not sure which upgrade caused it, but I am filing the bug here as pydcop should not crash (even if perhaps KTorrent is returning something strange).

According to kdcop, getTorrentInfo returns a QCStringList. The other method I use (and works), getTorrentNumbers, returns a QValueList. I just tried another QCStringList method (getInfo) and that crashes as well.

Example script:
#!/usr/bin/python

import pydcop

info = {}
app = pydcop.anyAppCalled("ktorrent").KTorrent
torrents = app.getTorrentNumbers(4) # no crash
for nr in torrents:
    info[nr] = app.getTorrentInfo(nr) # crash


Backtrace:
#0  0xb7c80483 in strlen () from /lib/i686/libc.so.6
#1  0xb7de91ea in PyString_FromString (str=0x0) at Objects/stringobject.c:108
#2  0xb7af1d22 in PythonDCOP::demarshal_QCString (str=0xbfcf877c) at marshal_funcs.h:222
#3  0xb7af356c in PythonDCOP::Marshaller::demarsh_private (this=0x80d1e88, type= 0xbfcf86a0, str=0xbfcf877c) at marshaller.cpp:79
#4  0xb7aed89f in PythonDCOP::PCOPType::demarshal (this=0xbfcf86a0, str= 0xbfcf877c) at marshaller.h:34
#5  0xb7af0fa0 in PythonDCOP::Marshaller::demarshalList (this=0x80d1e88, list_type= 0xbfcf86a0, str=0xbfcf877c) at marshaller.cpp:115
#6  0xb7af33fa in PythonDCOP::Marshaller::demarsh_private (this=0x80d1e88, type= 0xbfcf87ac, str=0xbfcf877c) at marshaller.cpp:68
#7  0xb7aed89f in PythonDCOP::PCOPType::demarshal (this=0xbfcf87ac, str= 0xbfcf877c) at marshaller.h:34
#8  0xb7af0599 in PythonDCOP::dcop_call (args=0xb7bdec5c) at pcop.cpp:582
#9  0xb7dd914e in PyCFunction_Call (func=0xb7bbf4ec, arg=0xb7bdec5c, kw=0x0) at Objects/methodobject.c:108
#10 0xb7e21e35 in PyEval_EvalFrameEx (f=0x80e15e4, throwflag=0) at Python/ceval.c:3566
#11 0xb7e233d2 in PyEval_EvalCodeEx (co=0xb7bc1770, globals=0xb7bc4cec, locals=0x0, args=0xb7afbd38, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2833
#12 0xb7dc7e13 in function_call (func=0xb7bc672c, arg=0xb7afbd2c, kw=0x0) at Objects/funcobject.c:517
#13 0xb7da98d9 in PyObject_Call (func=0x0, arg=0xb7afbd2c, kw=0x0) at Objects/abstract.c:1860
#14 0xb7db0f38 in instancemethod_call (func=0xb7bc672c, arg=0xb7afbd2c, kw=0x0) at Objects/classobject.c:2493
#15 0xb7da98d9 in PyObject_Call (func=0x0, arg=0xb7afba2c, kw=0x0) at Objects/abstract.c:1860
#16 0xb7df33a1 in slot_tp_call (self=0xb7afdc4c, args=0xb7afba2c, kwds=0x0) at Objects/typeobject.c:4590
#17 0xb7da98d9 in PyObject_Call (func=0x0, arg=0xb7afba2c, kw=0x0) at Objects/abstract.c:1860
#18 0xb7e1f3fc in PyEval_EvalFrameEx (f=0x805930c, throwflag=0) at Python/ceval.c:3777
#19 0xb7e233d2 in PyEval_EvalCodeEx (co=0xb7b92890, globals=0xb7be2a44, locals=0xb7be2a44, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2833
#20 0xb7e23453 in PyEval_EvalCode (co=0xb7b92890, globals=0xb7be2a44, locals=0xb7be2a44) at Python/ceval.c:494
#21 0xb7e3b6e8 in run_mod (mod=<value optimized out>, filename=<value optimized out>, globals=0xb7be2a44, locals=0xb7be2a44, flags=0xbfcf9168, arena=0x8056a10) at Python/pythonrun.c:1264
#22 0xb7e3b7b7 in PyRun_FileExFlags (fp=0x804a008, filename=0xbfcfa70b "cleanup-download", start=257, globals=0xb7be2a44, locals=0xb7be2a44, closeit=1, flags=0xbfcf9168) at Python/pythonrun.c:1250
#23 0xb7e3ce89 in PyRun_SimpleFileExFlags (fp=<value optimized out>, filename=0xbfcfa70b "cleanup-download", closeit=1, flags=0xbfcf9168) at Python/pythonrun.c:870
#24 0xb7e3d5f8 in PyRun_AnyFileExFlags (fp=0x804a008, filename=0xbfcfa70b "cleanup-download", closeit=1, flags=0xbfcf9168) at Python/pythonrun.c:689
#25 0xb7e46671 in Py_Main (argc=1, argv=0xbfcf9234) at Modules/main.c:496
#26 0x080485c1 in main (argc=Cannot access memory at address 0x0
) at Modules/python.c:23


Backtrace (full version):
#0  0xb7c80483 in strlen () from /lib/i686/libc.so.6
        mallstream = (FILE *) 0x0
        tr_old_memalign_hook = (void *(*)(size_t, size_t, const void *)) 0
        tr_old_malloc_hook = (void *(*)(size_t, const void *)) 0
        tr_old_realloc_hook = (void *(*)(void *, size_t, const void *)) 0
        lock = 0
        mallenv = "MALLOC_TRACE"
        malloc_trace_buffer = 0x0
        tr_old_free_hook = (void (*)(void *, const void *)) 0
        mallwatch = (void *) 0x0
#1  0xb7de91ea in PyString_FromString (str=0x0) at Objects/stringobject.c:108
        size = <value optimized out>
        op = <value optimized out>
#2  0xb7af1d22 in PythonDCOP::demarshal_QCString (str=0xbfcf877c) at marshal_funcs.h:222
        s = <incomplete type>
#3  0xb7af356c in PythonDCOP::Marshaller::demarsh_private (this=0x80d1e88, type= 0xbfcf86a0, str=0xbfcf877c) at marshaller.cpp:79
        ty = {static null = {static null = <same as static member of an already seen type>, d = 0x80d0270, static shared_null = 0x80d0270}, d = 0x80e4b88, static shared_null = 0x80d0270}
        result = <value optimized out>
#4  0xb7aed89f in PythonDCOP::PCOPType::demarshal (this=0xbfcf86a0, str= 0xbfcf877c) at marshaller.h:34
No locals.
#5  0xb7af0fa0 in PythonDCOP::Marshaller::demarshalList (this=0x80d1e88, list_type= 0xbfcf86a0, str=0xbfcf877c) at marshaller.cpp:115
        c = 7
        count = 10
        obj = (PyObject *) 0xb7afdbec
#6  0xb7af33fa in PythonDCOP::Marshaller::demarsh_private (this=0x80d1e88, type= 0xbfcf87ac, str=0xbfcf877c) at marshaller.cpp:68
        ty = {static null = {static null = <same as static member of an already seen type>, d = 0x80d0270, static shared_null = 0x80d0270}, d = 0x80e4990, static shared_null = 0x80d0270}
        result = <value optimized out>
#7  0xb7aed89f in PythonDCOP::PCOPType::demarshal (this=0xbfcf87ac, str= 0xbfcf877c) at marshaller.h:34
No locals.
#8  0xb7af0599 in PythonDCOP::dcop_call (args=0xb7bdec5c) at pcop.cpp:582
        arg1 = 0xb7afdcd4 "ktorrent"
        arg2 = 0xb7b9ecf4 "KTorrent"
        arg3 = 0xb7b9f2dc "getTorrentInfo"
        tuple = (PyObject *) 0xb7afdc8c
        replyData = {<> = {<No data fields>}, <No data fields>}
        replyType = <incomplete type>
        data = {<> = {<No data fields>}, <No data fields>}
        params = <incomplete type>
        appname = <incomplete type>
        objname = <incomplete type>
        funcname = <incomplete type>
        dcop = (struct DCOPClient *) 0x80dcd80
        ok = true
        funcs = {sh = 0x80e2408}
        c = {m_ifaces = {sh = 0x80dbdb0}, m_methods = {<> = {<No data fields>}, <No data fields>}}
        m = <value optimized out>
        signature = <incomplete type>
        param_count = 1
        type = {m_type = <incomplete type>, m_leftType = 0x0, m_rightType = 0x0}
        reply = <incomplete type>
#9  0xb7dd914e in PyCFunction_Call (func=0xb7bbf4ec, arg=0xb7bdec5c, kw=0x0) at Objects/methodobject.c:108
        meth = (PyCFunction) 0xb7af0000 <PythonDCOP::dcop_call(_object*, _object*)>
        self = (PyObject *) 0x0
        size = 0
#10 0xb7e21e35 in PyEval_EvalFrameEx (f=0x80e15e4, throwflag=0) at Python/ceval.c:3566
        arg = <value optimized out>
        stack_pointer = <value optimized out>
        next_instr = (unsigned char *) 0xb7afe0c2 "S"
        opcode = <value optimized out>
        oparg = <value optimized out>
        why = <value optimized out>
        err = 0
        x = <value optimized out>
        v = <value optimized out>
        w = <value optimized out>
        u = <value optimized out>
        t = <value optimized out>
        stream = <value optimized out>
        fastlocals = (PyObject **) 0x80e171c
        freevars = (PyObject **) 0x80e1724
        retval = (PyObject *) 0x0
        tstate = (PyThreadState *) 0x804a1b0
        co = (PyCodeObject *) 0xb7bc1770
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = (unsigned char *) 0xb7afe0a4 "t"
        names = (PyObject *) 0xb7bc244c
        consts = (PyObject *) 0xb7afd12c
#11 0xb7e233d2 in PyEval_EvalCodeEx (co=0xb7bc1770, globals=0xb7bc4cec, locals=0x0, args=0xb7afbd38, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2833
        m = -1213211508
        f = (PyFrameObject *) 0x80e15e4
        retval = <value optimized out>
        fastlocals = (PyObject **) 0x80e171c
        freevars = (PyObject **) 0x80e1724
        tstate = (PyThreadState *) 0x804a1b0
        x = <value optimized out>
        u = (PyObject *) 0xb7afdc8c
#12 0xb7dc7e13 in function_call (func=0xb7bc672c, arg=0xb7afbd2c, kw=0x0) at Objects/funcobject.c:517
        result = <value optimized out>
        argdefs = <value optimized out>
        d = (PyObject **) 0x0
        k = <value optimized out>
        nk = <value optimized out>
        nd = 0
#13 0xb7da98d9 in PyObject_Call (func=0x0, arg=0xb7afbd2c, kw=0x0) at Objects/abstract.c:1860
        result = <value optimized out>
        call = (ternaryfunc) 0x1
#14 0xb7db0f38 in instancemethod_call (func=0xb7bc672c, arg=0xb7afbd2c, kw=0x0) at Objects/classobject.c:2493
        clsbuf = "���������ɼ� ����f߷�ɼ�\200\021��\024\023\016\bL\024\016\bT\024\016\b��\004\b\002\000\000\000\000\000\000\000�d�� ���\200\021鷼�޷\200\021���d���+������\000\000\000\000,����h��\023~ܷ�\022���L��\000\000\000\000Hhݷ\002\000\000\000\000\000\000\0008�!B\000ż�\037\000\000\000\000\000\000\000\200�\r\b����8�!B\000ż�l���\217�ݷl���\000ż�����.G۷,g��,���D\201�������0��"...
        instbuf = "�#��\236\215*P`Ƽ�\fO��\217�ݷ��ӷ \021Է\006\000\000\000H\213Ͽ\225�Ƿ \021Է`\001\000\000T\024\016\b`\001\000\001\006\000\000\000\f\223\005\b\003", '\0' <repeats 11 times>, "��\r\bHhݷ\2200�_�|�P�\212���켷\037\000\000\000c���`�\r\b�����\212���켷Lܯ�Rzݷ�L���켷�\212��\225iݷyd���d���<��������޷����\000\000\000\000Cpܷ\000m��\200s��<���\236gܷ\024\023\016\b\000"...
        ok = <value optimized out>
        self = (PyObject *) 0xb7afdc4c
        klass = (PyObject *) 0x1
        result = <value optimized out>
#15 0xb7da98d9 in PyObject_Call (func=0x0, arg=0xb7afba2c, kw=0x0) at Objects/abstract.c:1860
        result = <value optimized out>
        call = (ternaryfunc) 0x1
#16 0xb7df33a1 in slot_tp_call (self=0xb7afdc4c, args=0xb7afba2c, kwds=0x0) at Objects/typeobject.c:4590
        meth = (PyObject *) 0xb7b88144
        res = <value optimized out>
        call_str = (PyObject *) 0xb7bcc500
#17 0xb7da98d9 in PyObject_Call (func=0x0, arg=0xb7afba2c, kw=0x0) at Objects/abstract.c:1860
        result = <value optimized out>
        call = (ternaryfunc) 0x1
#18 0xb7e1f3fc in PyEval_EvalFrameEx (f=0x805930c, throwflag=0) at Python/ceval.c:3777
        sp = (PyObject **) 0x805944c
        stack_pointer = <value optimized out>
        next_instr = (unsigned char *) 0x80aacfc "e\t"
        opcode = <value optimized out>
        oparg = <value optimized out>
        why = <value optimized out>
        err = 0
        x = <value optimized out>
        v = <value optimized out>
        w = <value optimized out>
        u = <value optimized out>
        t = <value optimized out>
        stream = <value optimized out>
        fastlocals = (PyObject **) 0x8059444
        freevars = (PyObject **) 0x8059444
        retval = (PyObject *) 0x0
        tstate = (PyThreadState *) 0x804a1b0
        co = (PyCodeObject *) 0xb7b92890
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = (unsigned char *) 0x80aabbc "d"
        names = (PyObject *) 0x8058404
        consts = (PyObject *) 0xb7bd862c
#19 0xb7e233d2 in PyEval_EvalCodeEx (co=0xb7b92890, globals=0xb7be2a44, locals=0xb7be2a44, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2833
        m = 0
        f = (PyFrameObject *) 0x805930c
        retval = <value optimized out>
        fastlocals = (PyObject **) 0x8059444
        freevars = (PyObject **) 0x8059444
        tstate = (PyThreadState *) 0x804a1b0
        x = <value optimized out>
        u = (PyObject *) 0x0
#20 0xb7e23453 in PyEval_EvalCode (co=0xb7b92890, globals=0xb7be2a44, locals=0xb7be2a44) at Python/ceval.c:494
No locals.
#21 0xb7e3b6e8 in run_mod (mod=<value optimized out>, filename=<value optimized out>, globals=0xb7be2a44, locals=0xb7be2a44, flags=0xbfcf9168, arena=0x8056a10) at Python/pythonrun.c:1264
        co = (PyCodeObject *) 0xb7b92890
        v = (PyObject *) 0x0
#22 0xb7e3b7b7 in PyRun_FileExFlags (fp=0x804a008, filename=0xbfcfa70b "cleanup-download", start=257, globals=0xb7be2a44, locals=0xb7be2a44, closeit=1, flags=0xbfcf9168) at Python/pythonrun.c:1250
        ret = <value optimized out>
        mod = (mod_ty) 0x8089cc8
        arena = (PyArena *) 0x8056a10
#23 0xb7e3ce89 in PyRun_SimpleFileExFlags (fp=<value optimized out>, filename=0xbfcfa70b "cleanup-download", closeit=1, flags=0xbfcf9168) at Python/pythonrun.c:870
        buf = "#!"
        m = <value optimized out>
        d = (PyObject *) 0xb7be2a44
        v = <value optimized out>
        ext = 0xbfcfa717 "load"
#24 0xb7e3d5f8 in PyRun_AnyFileExFlags (fp=0x804a008, filename=0xbfcfa70b "cleanup-download", closeit=1, flags=0xbfcf9168) at Python/pythonrun.c:689
        err = <value optimized out>
#25 0xb7e46671 in Py_Main (argc=1, argv=0xbfcf9234) at Modules/main.c:496
        v = <value optimized out>
        c = <value optimized out>
        sts = <value optimized out>
        command = 0x0
        filename = 0x1 <Address 0x1 out of bounds>
        module = 0x0
        fp = (FILE *) 0x804a008
        p = <value optimized out>
        inspect = 0
        unbuffered = 0
        skipfirstline = 0
        stdin_is_interactive = 1
        help = 0
        version = 0
        saw_inspect_flag = 0
        saw_unbuffered_flag = 0
        cf = {cf_flags = 0}
#26 0x080485c1 in main (argc=Cannot access memory at address 0x0
) at Modules/python.c:23



More information about the Kde-bindings mailing list