Opened 6 years ago

Closed 6 years ago

#2335 closed defect (fixed)

Segfault in AtomicStructure.reorder_residues

Reported by: Tristan Croll Owned by: Eric Pettersen
Priority: moderate Milestone:
Component: Structure Editing Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Happens whether the new_order residues are from the same model or an identical copy. If m is the model:

from chimerax.atomic import Residues
new_order = Residues(sorted(m.residues, key=lambda r: (r.chain_id, r.number)))
m.reorder_residues(new_order) # segfault


Program received signal SIGSEGV, Segmentation fault.
0x00007fffb954e240 in atomstruct::Structure::reorder_residues(std::vector<atomstruct::Residue*, std::allocator<atomstruct::Residue*> > const&) ()
   from /opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/chimerax/atomic/lib/libatomstruct.so
Missing separate debuginfos, use: debuginfo-install ucsf-chimerax-daily-2019.08.15-1.el7.x86_64
(gdb) bt
#0  0x00007fffb954e240 in atomstruct::Structure::reorder_residues(std::vector<atomstruct::Residue*, std::allocator<atomstruct::Residue*> > const&) ()
    at /opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/chimerax/atomic/lib/libatomstruct.so
#1  0x00007fffc003b715 in structure_reorder_residues ()
    at /opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/chimerax/atomic/libmolc.so
#2  0x00007fffe767ddcc in ffi_call_unix64 () at /lib64/libffi.so.6
#3  0x00007fffe767d6f5 in ffi_call () at /lib64/libffi.so.6
#4  0x00007fffe78921ca in _ctypes_callproc (argcount=2, resmem=0x7fffffff7f40, restype=<optimized out>, atypes=<optimized out>, avalues=0x7fffffff7f20, pProc=0x7fffc003b640 <structure_reorder_residues>, flags=4357)
    at ./tmp/Python-3.7.4/Modules/_ctypes/callproc.c:827
#5  0x00007fffe78921ca in _ctypes_callproc (pProc=pProc@entry=0x7fffc003b640 <structure_reorder_residues>, argtuple=argtuple@entry=0x7fff2c540a50, flags=4357, argtypes=argtypes@entry=0x7fff2c5ebbe0, restype=restype@entry=0xa14400, checker=0x0) at ./tmp/Python-3.7.4/Modules/_ctypes/callproc.c:1184

Change History (2)

comment:1 by Eric Pettersen, 6 years ago

Status: assignedaccepted

comment:2 by Eric Pettersen, 6 years ago

Resolution: fixed
Status: acceptedclosed

Was sending pointer objects to C++ layer rather than pointer values.

Note: See TracTickets for help on using tickets.