teerytko / python-video4linux2

Automatically exported from code.google.com/p/python-video4linux2
0 stars 0 forks source link

spca561 cam + recordpics.py = memory corruption #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
plug in ID 046d:092c Logitech, Inc. QuickCam Chat
$ ./recordpics.py -d /dev/video2
*** glibc detected *** python: malloc(): memory corruption: 0x08f1dee8 ***

Original issue reported on code.google.com by cfkars...@gmail.com on 28 Oct 2008 at 9:37

GoogleCodeExporter commented 8 years ago
juser@dhcp186:~/vga2usb/py/python-video4linux2-trunk$ gdb
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
(gdb) file python
Reading symbols from /usr/bin/python...Reading symbols from
/usr/lib/debug/usr/bin/python2.5...done.
done.
(gdb) run ./recordpics.py -d /dev/video2
Starting program: /usr/bin/python ./recordpics.py -d /dev/video2
[Thread debugging using libthread_db enabled]
[New Thread 0xb7e8d8c0 (LWP 13254)]
{'height': '600', 'width': '800', 'pixelformat': 'RGB4', 'device': 
'/dev/video2',
'input': '0', 'outputdir': ''}
RGB4
Trying to create directory 
Could not create directory [Errno 2] No such file or directory: ''
Recording /dev/video2:0 with format  at (288, 825636179)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7e8d8c0 (LWP 13254)]
0x080f7fcd in visit_decref (op=0xa1e1678, data=0x0)
    at ../Modules/gcmodule.c:270
270 ../Modules/gcmodule.c: No such file or directory.
    in ../Modules/gcmodule.c
(gdb) bt full  
#0  0x080f7fcd in visit_decref (op=0xa1e1678, data=0x0)
    at ../Modules/gcmodule.c:270
No locals.
#1  0x0808ab1d in dict_traverse (op=0xb7d12d74, 
    visit=0x80f7fc0 <visit_decref>, arg=0x0) at ../Objects/dictobject.c:1897
    vret = <value optimized out>
    i = 61
    pk = <value optimized out>
    pv = (PyObject *) 0xa1e1678
#2  0x080f89b4 in collect (generation=0) at ../Modules/gcmodule.c:295
    i = 135675872
    m = <value optimized out>
    n = <value optimized out>
    young = (PyGC_Head *) 0x81593a0
    old = (PyGC_Head *) 0x81593b4
    unreachable = {gc = {gc_next = 0xb7fe9140, gc_prev = 0x180, 
    gc_refs = -1208053440}, dummy = <invalid float value>}
    finalizers = {gc = {gc_next = 0x180, gc_prev = 0xbfe5b4d8, 
    gc_refs = -1209001883}, dummy = 2.1565663883013640545106188653794183e-3052}
    gc = <value optimized out>
    t1 = 0
#3  0x080f954e in _PyObject_GC_NewVar (tp=0x8163fe0, nitems=14)
    at ../Modules/gcmodule.c:897
    size = <value optimized out>
#4  0x08116ae8 in PyFrame_New (tstate=0xa14e1b8, code=0xb7e414e8, 
    globals=0xb7e3446c, locals=0x0) at ../Objects/frameobject.c:614
    extras = 0
    back = (PyFrameObject *) 0xa23e504
    f = (PyFrameObject *) 0x0
    builtins = (PyObject *) 0xb7e4f824
    i = <value optimized out>
#5  0x080cfd29 in PyEval_EvalCodeEx (co=0xb7e414e8, globals=0xb7e3446c, 
    locals=0x0, args=0xa23e658, argcount=7, kws=0xa23e674, kwcount=0, 
    defs=0xb7d10258, defcount=1, closure=0x0) at ../Python/ceval.c:2653
    f = <value optimized out>
    retval = (PyObject *) 0x0
    freevars = <value optimized out>
    tstate = (PyThreadState *) 0xa14e1b8
    x = <value optimized out>
    u = <value optimized out>
#6  0x080ce728 in PyEval_EvalFrameEx (f=0xa23e504, throwflag=0)
    at ../Python/ceval.c:3691
    sp = (PyObject **) 0xa23e674
    stack_pointer = (PyObject **) 0xa23e674
    next_instr = (unsigned char *) 0xb7e735a9 "}\005"
    opcode = <value optimized out>
---Type <return> to continue, or q <return> to quit---
    oparg = 7
    why = <value optimized out>
    err = 0
    x = (PyObject *) 0xa1520a0
    v = (PyObject *) 0xb7e4f824
    w = (PyObject *) 0xe
    u = (PyObject *) 0x8163fe0
    t = <value optimized out>
    stream = (PyObject *) 0x1
    freevars = (PyObject **) 0xa23e654
    retval = (PyObject *) 0x0
    tstate = (PyThreadState *) 0xa14e1b8
    co = (PyCodeObject *) 0xb7e2a848
    instr_ub = -1
    instr_lb = 0
    instr_prev = -1
    first_instr = (unsigned char *) 0xb7e73514 "|"
    names = (PyObject *) 0xb7e293e4
    consts = (PyObject *) 0xb7e5dc0c
#7  0x080d0345 in PyEval_EvalCodeEx (co=0xb7e2a848, globals=0xb7e1c9bc, 
    locals=0x0, args=0xa1f08f8, argcount=3, kws=0xa1f0904, kwcount=0, 
    defs=0xb7d10c98, defcount=2, closure=0x0) at ../Python/ceval.c:2858
    f = (PyFrameObject *) 0xa23e504
    retval = <value optimized out>
    freevars = (PyObject **) 0xa23e654
    tstate = (PyThreadState *) 0xa14e1b8
    x = <value optimized out>
    u = (PyObject *) 0xb7d3cd6c
#8  0x080ce728 in PyEval_EvalFrameEx (f=0xa1f0794, throwflag=0)
    at ../Python/ceval.c:3691
    sp = (PyObject **) 0xa1f0904
    stack_pointer = (PyObject **) 0xa1f0904
    next_instr = (unsigned char *) 0xa1b0913 "\001d*"
    opcode = <value optimized out>
    oparg = 2
    why = <value optimized out>
    err = 0
    x = (PyObject *) 0xa151d64
    v = (PyObject *) 0xb7d16a0c
    w = (PyObject *) 0xa152070
    u = (PyObject *) 0x8163fe0
    t = <value optimized out>
    stream = (PyObject *) 0x0
    freevars = (PyObject **) 0xa1f08f8
    retval = (PyObject *) 0x0
    tstate = (PyThreadState *) 0xa14e1b8
---Type <return> to continue, or q <return> to quit---
    co = (PyCodeObject *) 0xb7e154a0
    instr_ub = -1
    instr_lb = 0
    instr_prev = -1
    first_instr = (unsigned char *) 0xa1b06d4 "t"
    names = (PyObject *) 0xb7e7a52c
    consts = (PyObject *) 0xb7e7953c
#9  0x080cfbf5 in PyEval_EvalFrameEx (f=0xa15fe54, throwflag=0)
    at ../Python/ceval.c:3681
    sp = (PyObject **) 0xa15ff90
    stack_pointer = (PyObject **) 0xa15ff90
    next_instr = (unsigned char *) 0xb7e6844a "\001n\001"
    opcode = <value optimized out>
    oparg = 0
    why = <value optimized out>
    err = 0
    x = (PyObject *) 0x0
    v = (PyObject *) 0xb7e4f824
    w = (PyObject *) 0x5
    u = (PyObject *) 0x8163fe0
    t = <value optimized out>
    stream = (PyObject *) 0x10
    freevars = (PyObject **) 0xa15ff8c
    retval = (PyObject *) 0x0
    tstate = (PyThreadState *) 0xa14e1b8
    co = (PyCodeObject *) 0xb7e15608
    instr_ub = -1
    instr_lb = 0
    instr_prev = -1
    first_instr = (unsigned char *) 0xb7e683f4 "d"
    names = (PyObject *) 0xb7e14b1c
    consts = (PyObject *) 0xb7e8a8cc
#10 0x080d0345 in PyEval_EvalCodeEx (co=0xb7e15608, globals=0xb7e66acc, 
    locals=0xb7e66acc, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, 
    defcount=0, closure=0x0) at ../Python/ceval.c:2858
    f = (PyFrameObject *) 0xa15fe54
    retval = <value optimized out>
    freevars = (PyObject **) 0xa15ff8c
    tstate = (PyThreadState *) 0xa14e1b8
    x = <value optimized out>
    u = (PyObject *) 0xbfe5d96a
#11 0x080d0557 in PyEval_EvalCode (co=0xb7e15608, globals=0xb7e66acc, 
    locals=0xb7e66acc) at ../Python/ceval.c:514
No locals.
#12 0x080edf8f in PyRun_FileExFlags (fp=0xa14e008, 
    filename=0xbfe5d96a "./recordpics.py", start=257, globals=0xb7e66acc, 
---Type <return> to continue, or q <return> to quit---
    locals=0xb7e66acc, closeit=1, flags=0xbfe5bdc8)
    at ../Python/pythonrun.c:1273
    ret = (PyObject *) 0x0
    mod = <value optimized out>
    arena = <value optimized out>
#13 0x080ee25a in PyRun_SimpleFileExFlags (fp=0xa14e008, 
    filename=0xbfe5d96a "./recordpics.py", closeit=1, flags=0xbfe5bdc8)
    at ../Python/pythonrun.c:879
    m = <value optimized out>
    d = (PyObject *) 0xb7e66acc
    v = <value optimized out>
    ext = 0xbfe5d975 "s.py"
#14 0x080595e7 in Py_Main (argc=3, argv=0xbfe5be94) at ../Modules/main.c:532
    c = <value optimized out>
    sts = <value optimized out>
    command = 0x0
    filename = 0x0
    module = 0x0
    fp = (FILE *) 0xa14e008
    p = <value optimized out>
    inspect = 0
    unbuffered = 0
    skipfirstline = 0
    stdin_is_interactive = <value optimized out>
    help = 0
    version = 0
    saw_inspect_flag = 0
    saw_unbuffered_flag = 0
    cf = {cf_flags = 0}
#15 0x08058962 in main (argc=0, argv=0x0) at ../Modules/python.c:23
No locals.
(gdb) 

Original comment by cfkars...@gmail.com on 28 Oct 2008 at 9:38