Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2135 closed defect (wontfix)

Structure in a bad state can crash ChimeraX

Reported by: tic20@… Owned by: Eric Pettersen
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Linux-3.10.0-957.12.2.el7.x86_64-x86_64-with-centos-7.6.1810-Core
ChimeraX Version: 0.91 (2019-06-28)
Description
This is pure user-error on my part and probably difficult to guard against, but if a Python error is raised between creating a new atom with Model.new_atom() and actually adding it to a residue, then everything crashes and burns with a segmentation fault.

Log:
Startup Messages  
---  
warning | 'clip' is a prefix of an existing command 'clipper'  
  
UCSF ChimeraX version: 0.91 (2019-06-28)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  




OpenGL version: 3.3.0 NVIDIA 415.27
OpenGL renderer: TITAN Xp/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

Change History (5)

comment:1 by Eric Pettersen, 6 years ago

Component: UnassignedCore
Owner: set to Eric Pettersen
Platform: all
Project: ChimeraX
Status: newaccepted
Summary: ChimeraX bug report submissionStructure in a bad state can crash ChimeraX

comment:2 by Eric Pettersen, 6 years ago

Resolution: wontfix
Status: acceptedclosed

I am open to suggestions, but I have no inclination to guard every use of atom.residue in the C++ layer with a test against null. My advice would be to put the absolute minimum amount of code possible between creating the atom and adding it to a residue.

in reply to:  3 ; comment:3 by tic20@…, 6 years ago

Yep - that’s what I did in my code after reporting this. Totally understand you not wanting to handle it. It might be worth noting in the docstrings that these functions are unsuitable for use in the interactive shell?
 

 


comment:4 by Eric Pettersen, 6 years ago

I noted in the new_atom() doc string that it is advisable to add the atom to its residue as soon as possible. Also, noted that there are functions in atomic.struct_edit for adding atoms that are considerably easier and less hazardous than using new_atom().

in reply to:  5 ; comment:5 by tic20@…, 6 years ago

... Huh. I hadn't actually discovered struct_edit. That *does* look much 
easier!

On 2019-06-28 18:18, ChimeraX wrote:

Note: See TracTickets for help on using tickets.