Opened 6 years ago

Closed 6 years ago

#1943 closed defect (fixed)

Error using named selection holding deleted model

Reported by: Elaine Meng Owned by: Tom Goddard
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc: pett
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Darwin-18.5.0-x86_64-i386-64bit
ChimeraX Version: 0.9 (2019-05-15)
Description
TypeError: object of type 'NoneType' has no len()

User-defined selection in Select menu "blob" (selected volume isosurface) did not go away when volume model was closed.  Choosing it from menu after closing the volume model caused the traceback shown in the Log.

Can create volume isosurf to test with molmap, e.g.

open 2gbp
molmap ligand 8
(Ctrl-click isosurf to select it)
name frozen blob sel
close
(choose "blob" from menu)

Log:
UCSF ChimeraX version: 0.9 (2019-05-15)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> help help:credits.html

> open 2gbp format mmCIF fromDatabase pdb

2gbp title:  
Sugar and signal-transducer binding sites of the escherichia coli galactose
chemoreceptor protein [more info...]  
  
Chain information for 2gbp #1  
---  
Chain | Description  
A | D-galactose/D-glucose binding protein  
  
Non-standard residues in 2gbp #1  
---  
BGC — β-D-glucose  
CA — calcium ion  
  
  

> molmap ligand 8

> select #2

2 models selected  

> view sel

> view cofr false

> name trips :trp

> name frozen blob sel

> select clear

> select blob

2 models selected  

> select trips

70 atoms, 75 bonds selected  

> show selAtoms

> open 1zik

1zik title:  
GCN4-leucine zipper core mutant ASN16LYS In the dimeric state [more info...]  
  
Chain information for 1zik #3  
---  
Chain | Description  
A B | general control protein GCN4  
  
  

> sequence chain /b

Alignment identifier is 3.B  

Unknown command: sequence dissoc :1  
Unknown command: sequence dissoc :1  

Unknown command: sequence dissoc 1  
Unknown command: sequence dissoc 1  

Unknown command: sequence dissoc 1  
Unknown command: sequence dissoc 1  

> close

> open 1zik

1zik title:  
GCN4-leucine zipper core mutant ASN16LYS In the dimeric state [more info...]  
  
Chain information for 1zik #1  
---  
Chain | Description  
A B | general control protein GCN4  
  
  

> sequence chain /b

Alignment identifier is 1.B  

> sequence associate /a 1

Associated 1zik chain A to chain B with 0 mismatches  

Unknown command: sequence dissoc /a  
Unknown command: sequence dissoc /a  

Unknown command: sequence dissoc /a  
Unknown command: sequence dissoc /a  

Unknown command: sequence dissoc /b  
Unknown command: sequence dissoc /b  

Unknown command: sequence dissoc /a 1.B  
Unknown command: sequence dissoc /a 1.B  

> close session

> open 1zik

1zik title:  
GCN4-leucine zipper core mutant ASN16LYS In the dimeric state [more info...]  
  
Chain information for 1zik #1  
---  
Chain | Description  
A B | general control protein GCN4  
  
  

> sequence chain /b

Alignment identifier is 1.B  

> sequence associate /a

Associated 1zik chain A to chain B with 0 mismatches  

Unknown command: sequence dissoc /a  
Unknown command: sequence dissoc /a  

Unknown command: sequence dissoc /a 1.B  
Unknown command: sequence dissoc /a 1.B  

> sequence associate /a :1

Disassociated 1zik chain A from chain B  
Associated 1zik chain A to chain B with 0 mismatches  

> sequence associate /a :2

Disassociated 1zik chain A from chain B  
Associated 1zik chain A to chain B with 0 mismatches  

> sequence associate /a 1

Disassociated 1zik chain A from chain B  
Associated 1zik chain A to chain B with 0 mismatches  

> sequence associate /a "chain B"

Disassociated 1zik chain A from chain B  
Associated 1zik chain A to chain B with 0 mismatches  

> select blob

Traceback (most recent call last):  
File
"/Users/meng/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/ui/gui.py", line 1017, in <lambda>  
selectors_menu.triggered.connect(lambda name, ses=self.session, run=run:
run(ses, "sel " + name.text()))  
File
"/Users/meng/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/commands/run.py", line 31, in run  
results = command.run(text, log=log)  
File
"/Users/meng/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/commands/cli.py", line 2631, in run  
result = ci.function(session, **kw_args)  
File
"/Users/meng/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/std_commands/select.py", line 48, in select  
modify_selection(objects, 'add', undo_state, full_residues = residues)  
File
"/Users/meng/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/std_commands/select.py", line 207, in modify_selection  
m.selected = select  
File
"/Users/meng/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/graphics/drawing.py", line 234, in __setattr__  
super(Drawing, self).__setattr__(key, value)  
File
"/Users/meng/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py", line 1048, in _set_selected  
Model.set_selected(self, sel, fire_trigger=fire_trigger)  
File
"/Users/meng/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/models.py", line 172, in set_selected  
Drawing.set_highlighted(self, sel)  
File
"/Users/meng/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/graphics/drawing.py", line 375, in set_highlighted  
self._highlighted_positions = ones(len(self.positions), bool)  
TypeError: object of type 'NoneType' has no len()  
  
TypeError: object of type 'NoneType' has no len()  
  
File
"/Users/meng/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/graphics/drawing.py", line 375, in set_highlighted  
self._highlighted_positions = ones(len(self.positions), bool)  
  
See log for complete Python traceback.  
  

> select trips

Nothing selected  




OpenGL version: 4.1 INTEL-12.8.38
OpenGL renderer: Intel Iris Pro OpenGL Engine
OpenGL vendor: Intel Inc.

Change History (2)

comment:1 by pett, 6 years ago

Cc: pett added
Component: UnassignedVolume Data
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionIsosurface not deleted when volume model closed

This could be a bug with isosurfaces, or Objects, or both. Initially running with isosurfaces, since Objects shouldn't hold onto them if all other (non-weak) references go away.

Does the isosurface call Model.delete? The plan is for Objects to stop using weak references and start using a Model.delete trigger, but if the isosurface doesn't call Model.delete then it's really an isosurface problem.

comment:2 by Tom Goddard, 6 years ago

Component: Volume DataCore
Resolution: fixed
Status: assignedclosed
Summary: Isosurface not deleted when volume model closedError using named selection holding deleted model

Fixed.

The Objects instance that holds frozen named selectiions was not purging deleted models. Using the named selection after the model was closed would cause this error. Made Objects filter out deleted models.

Note: See TracTickets for help on using tickets.