Opened 6 years ago
Closed 6 years ago
#2278 closed defect (fixed)
Nucleotides: object of type 'NoneType' has no len()
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Depiction | 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-07-27) Description Log: UCSF ChimeraX version: 0.91 (2019-07-27) © 2016-2019 Regents of the University of California. All rights reserved. How to cite UCSF ChimeraX > open /home/tic20/isolde/isolde/src/demo_data/3io0/before.pdb before.pdb title: Crystal structure of etub from clostridium kluyveri [more info...] Chain information for before.pdb #1 --- Chain | Description A | predicted microcompartment protein > toolshed show Shell /opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/IPython/core/history.py:226: UserWarning: IPython History requires SQLite, your history will not be saved warn("IPython History requires SQLite, your history will not be saved") > close > open 6h0s Summary of feedback from opening 6h0s fetched from pdb --- notes | Fetching compressed mmCIF 6h0s from http://files.rcsb.org/download/6h0s.cif Fetching CCD FOX from http://ligand-expo.rcsb.org/reports/F/FOX/FOX.cif 6h0s title: Crystal structure of the complex between the Lactococcus lactis FPG mutant G226P and a Fapy-dG containing DNA [more info...] Chain information for 6h0s #1 --- Chain | Description A | Formamidopyrimidine-DNA glycosylase B | DNA (5'-D(*CP*TP*CP*TP*TP*TP*(fox)P*TP*TP*TP*CP*TP*CP*G)-3') C | DNA (5'-D(*GP*CP*GP*ap*GP*ap*ap*ap*CP*ap*ap*ap*GP*A)-3') Non-standard residues in 6h0s #1 --- GOL — glycerol (glycerin; propane-1,2,3-triol) ZN — zinc ion > nucleotides selAtoms fill > style nucleic & selAtoms stick Changed 569 atom styles > nucleotides selAtoms slab > style nucleic & selAtoms stick Changed 569 atom styles > nucleotides selAtoms tube/slab shape box An error occurred in drawing the scene. Redrawing graphics is now stopped to avoid a continuous stream of error messages. To restart graphics use the command "graphics restart" after changing the settings that caused the error. Traceback (most recent call last): File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/chimerax/core/updateloop.py", line 72, in draw_new_frame view.draw(check_for_changes = False) File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/chimerax/core/graphics/view.py", line 164, in draw self._draw_scene(camera, drawings) File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/chimerax/core/graphics/view.py", line 230, in _draw_scene draw_opaque(r, opaque_drawings) File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/chimerax/core/graphics/drawing.py", line 1418, in draw_opaque _draw_multiple(drawings, renderer, Drawing.OPAQUE_DRAW_PASS) File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/chimerax/core/graphics/drawing.py", line 1429, in _draw_multiple d.draw(renderer, draw_pass) File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/chimerax/core/graphics/drawing.py", line 711, in draw if not self.display: File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/chimerax/core/graphics/drawing.py", line 334, in get_display return self._any_displayed_positions and len(self._positions) > 0 TypeError: object of type 'NoneType' has no len() OpenGL version: 3.3.0 NVIDIA 415.27 OpenGL renderer: TITAN Xp/PCIe/SSE2 OpenGL vendor: NVIDIA Corporation
Change History (4)
comment:1 by , 6 years ago
Cc: | added |
---|---|
Component: | Unassigned → Depiction |
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → Nucleotides: object of type 'NoneType' has no len() |
comment:2 by , 6 years ago
comment:3 by , 6 years ago
Cc: | removed |
---|---|
Owner: | changed from | to
This is a subtle problem in the graphics code. The error is because the drawing for filled rings is deleted and recreated in the middle of rendering the scene where the list of drawing to draw has already been collected. No drawings can be deleted or created in the middle of a rendering. But it is happening when the scene drawing calls View.drawing_bounds() to update the near/far depth of the projection matrix (and for depth cue), and that routine in turn calls View.check_for_drawing_change() and that routine allows all the models to update themselves (such as replacing rings). This situation is indicated in the following call stack printed when the "rings" drawing was being deleted.
nucleotides selAtoms tube/slab shape box
nucleotides selAtoms slabremoving ring drawing
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ChimeraX_main.py", line 871, in <module>
exit_code = init(sys.argv)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ChimeraX_main.py", line 747, in init
sess.ui.event_loop()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/ui/gui.py", line 260, in event_loop
self.exec_()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/updateloop.py", line 127, in _redraw_timer_callback
self.draw_new_frame()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/updateloop.py", line 64, in draw_new_frame
changed = view.check_for_drawing_change()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 262, in check_for_drawing_change
trig.activate_trigger('graphics update', self)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/triggerset.py", line 325, in activate_trigger
trigger.activate(data)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/triggerset.py", line 190, in activate
ret = handler.invoke(data, self._remove_bad_handlers)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/triggerset.py", line 130, in invoke
return self._func(self._name, data)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/atomic/structure.py", line 2680, in _update_graphics_if_needed
s[i]._update_graphics_if_needed()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/atomic/structure.py", line 314, in _update_graphics_if_needed
self._create_ring_graphics()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/atomic/structure.py", line 486, in _create_ring_graphics
traceback.print_stack()
removing ring drawing
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ChimeraX_main.py", line 871, in <module>
exit_code = init(sys.argv)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ChimeraX_main.py", line 747, in init
sess.ui.event_loop()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/ui/gui.py", line 260, in event_loop
self.exec_()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/updateloop.py", line 127, in _redraw_timer_callback
self.draw_new_frame()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/updateloop.py", line 72, in draw_new_frame
view.draw(check_for_changes = False)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 164, in draw
self._draw_scene(camera, drawings)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 211, in _draw_scene
self._update_projection(camera, vnum)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 800, in _update_projection
near_far = self.near_far_distances(camera, view_num)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 815, in near_far_distances
near, far = self._near_far_bounds(cp, vd)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 828, in _near_far_bounds
b = self.drawing_bounds()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 580, in drawing_bounds
self.check_for_drawing_change()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 262, in check_for_drawing_change
trig.activate_trigger('graphics update', self)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/triggerset.py", line 325, in activate_trigger
trigger.activate(data)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/triggerset.py", line 190, in activate
ret = handler.invoke(data, self._remove_bad_handlers)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/triggerset.py", line 130, in invoke
return self._func(self._name, data)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/atomic/structure.py", line 2680, in _update_graphics_if_needed
s[i]._update_graphics_if_needed()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/atomic/structure.py", line 314, in _update_graphics_if_needed
self._create_ring_graphics()
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/atomic/structure.py", line 486, in _create_ring_graphics
traceback.print_stack()
querying deleted model rings True
An error occurred in drawing the scene. Redrawing graphics is now stopped to avoid a continuous stream of error messages. To restart graphics use the command "graphics restart" after changing the settings that caused the error.
comment:4 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The correct behavior is that the near/far bounds should use current bounds without allowing models to update themselves. Made that change.
Also Structure.bounds() was updating ribbon graphics again allowing drawings to change when asking for bounds. I removed that. The Drawing.bounds() method is defined to be the bounds of the current graphics, not the bounds after the graphics is updated. This change could cause some bounds problems in existing code that assumes the bounds include pending graphics changes. Will fix those as they are encountered.
This error suggests ChimeraX attempted to draw a deleted drawing.