Bug #48

dff-gui.py segfault when trying to open a file

Added by klnikita over 1 year ago. Updated over 1 year ago.

Status:Closed Start date:31 Aug 2010
Priority:High Due date:
Assignee:- % Done:

100%

Category:graphical interface
Target version:-

Description

Hello,

When I'm trying to open a file which is inside an archive, dff-gui.py make a segfault.

I have tested with git trunk and the official .deb

I'm using Ubuntu10.04 x86_64, swig 1.3.40, python2.6.

Here is the partial backtrace, I hope it will be enough:


(gdb) bt f
#0  0x000000000041f0b1 in PyObject_Call ()
No symbol table info available.
#1  0x00007f703295161e in SWIG_Python_NewShadowInstance (data=0x1b4c5f0, swig_this=0x29c5fc0) at /home/nikita/devel/dff/dff/build/api/vfs/libvfsPYTHON_wrap.cxx:2309
        inst = 0x0
        newraw = 0x7f703583bfc8
#2  0x00007f7032951909 in SWIG_Python_NewPointerObj (ptr=0x2d84270, type=0x7f703332eaa0, flags=1) at /home/nikita/devel/dff/dff/build/api/vfs/libvfsPYTHON_wrap.cxx:2420
        inst = 0x7f703332eaa0
        own = 1
        robj = 0x29c5fc0
        clientdata = 0x1b4c5f0
#3  0x00007f703296d1e2 in _wrap_FdManager_get (args=0x2909c68) at /home/nikita/devel/dff/dff/build/api/vfs/libvfsPYTHON_wrap.cxx:12598
        _e = @0x250fda0
        _swig_thread_allow = {status = true, save = 0x1a850a0}
        arg2 = 0
        argp1 = 0x2d38460
        ecode2 = 0
        swig_obj = {0x29cadd0, 0x1a9f2b0}
        resultobj = 0x0
        arg1 = 0x2d38460
        res1 = 0
        val2 = 0
        result = 0x0
#4  0x00000000004a8784 in PyEval_EvalFrameEx ()
No symbol table info available.
#5  0x00000000004a9671 in PyEval_EvalCodeEx ()
No symbol table info available.
#6  0x0000000000537620 in ?? ()
No symbol table info available.
#7  0x000000000041f0c7 in PyObject_Call ()
No symbol table info available.
#8  0x0000000000427dff in ?? ()
No symbol table info available.
#9  0x00000000004239d0 in PyObject_CallFunctionObjArgs ()
No symbol table info available.
#10 0x00007f70329584c0 in SwigDirector_fso::vclose (this=0x2d5b7c0, fd=0) at /home/nikita/devel/dff/dff/build/api/vfs/libvfsPYTHON_wrap.cxx:6314
        swig_method_index = 4
        swig_method_name = 0x7f70329bc449 "vclose" 
        swig_val = 848629978
        obj0 = {<swig::SwigPtr_PyObject> = {_obj = 0x1a9f2b0}, <No data fields>}
        method = 0x29d2f00
        result = {<swig::SwigPtr_PyObject> = {_obj = 0x7fffcea4d5e0}, <No data fields>}
        swig_res = 32767
        c_result = 32624
        _swig_thread_block = {status = true, state = PyGILState_UNLOCKED}
#11 0x00007f70329b50b3 in VFile::close (this=0x2cffc10) at /home/nikita/devel/dff/dff/api/vfs/vfile.cpp:203
No locals.
#12 0x00007f70329b3ca3 in ~VFile (this=0x2cffc10, __in_chrg=<value optimized out>) at /home/nikita/devel/dff/dff/api/vfs/vfile.cpp:31
No locals.
#13 0x00007f703297135f in _wrap_delete_VFile (args=0x29c5e40) at /home/nikita/devel/dff/dff/build/api/vfs/libvfsPYTHON_wrap.cxx:13735
        _swig_thread_allow = {status = true, save = 0x1a850a0}
        argp1 = 0x2cffc10
        swig_obj = {0x29c5e40}
        resultobj = 0x0
        arg1 = 0x2cffc10
        res1 = 0
#14 0x00007f703295037c in SwigPyObject_dealloc (v=0x29c5e40) at /home/nikita/devel/dff/dff/build/api/vfs/libvfsPYTHON_wrap.cxx:1587
        meth = 0x7f703297129f <_wrap_delete_VFile>
        mself = 0x0
        res = 0x0
        ty = 0x7f7032c020a0
        data = 0x1bbce60
        destroy = 0x1cde7a0
        sobj = 0x29c5e40
        next = 0x0
#15 0x000000000044fc53 in ?? ()
No symbol table info available.

Associated revisions

Revision 4aa79302
Added by fba over 1 year ago

fixes #48 issues: Bad exception handler in libvfs.i
  • change self.fsobj in unzip Node to self.reader. Node::fsobj() was replaced by the one provided in unzip Python node generating errors when calling extendedAttributes and createdTime...
TODO:
  • remove every %catches(vfsError) in libvfs.i and provide a generic exception handler.
    • when %catches(vfsError) is situated before %exception [class::]method the generated code
      contains both handler exception but %catches(vfsError) is situated earlier and so catches
      the exception but does not handle it properly.

History

Updated by klnikita over 1 year ago

I must precise that I was talking about a .zip archive, we have not this bug if dff don't try to browse the archive content.

Updated by fba over 1 year ago

klnikita wrote:

Hello,

When I'm trying to open a file which is inside an archive, dff-gui.py make a segfault.

I have tested with git trunk and the official .deb

I'm using Ubuntu10.04 x86_64, swig 1.3.40, python2.6.

Here is the partial backtrace, I hope it will be enough:
[...]

Thanks for the backtrace. The team is investigating but it seems to come from a double call of vfile::close(), one directly called by filetype API, another one called when python GC destroys the vfile. vfile::~vfile also calls close().

Updated by fba over 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Updated by fba over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF