Opened 7 years ago
Closed 7 years ago
#1590 closed defect (can't reproduce)
Session restore of graphics: self._positions is None
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Sessions | Version: | 0.9 |
Keywords: | Cc: | Greg Couch | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: Darwin-15.3.0-x86_64-i386-64bit ChimeraX Version: 0.9 (2019-01-05) Description (Describe the actions that caused this problem to occur here) Log: UCSF ChimeraX version: 0.9 (2019-01-05) How to cite UCSF ChimeraX > open /Users/jliu/Desktop/T7-Ian/T7-BIN2/20190105-Figure.cxs Unable to restore session, resetting. Traceback (most recent call last): File "/Volumes/ChimeraXInstaller 1/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/session.py", line 593, in restore obj = sm.restore_snapshot(self, data) File "/Volumes/ChimeraXInstaller 1/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/std_commands/view.py", line 214, in restore_snapshot for k,v in data['view attrs'].items(): TypeError: 'NoneType' object is not subscriptable opened ChimeraX session Traceback (most recent call last): File "/Volumes/ChimeraXInstaller 1/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/triggerset.py", line 130, in invoke return self._func(self._name, data) File "/Volumes/ChimeraXInstaller 1/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/map/volume.py", line 3376, in _update_drawings if v.display: File "/Volumes/ChimeraXInstaller 1/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/graphics/drawing.py", line 311, in get_display return self._any_displayed_positions and len(self._positions) > 0 TypeError: object of type 'NoneType' has no len() Error processing trigger "graphics update": object of type 'NoneType' has no len(): TypeError: object of type 'NoneType' has no len() File "/Volumes/ChimeraXInstaller 1/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/graphics/drawing.py", line 311, in get_display return self._any_displayed_positions and len(self._positions) > 0 See log for complete Python traceback. OpenGL version: 4.1 INTEL-10.12.13 OpenGL renderer: Intel(R) HD Graphics 6000 OpenGL vendor: Intel Inc.
Change History (4)
comment:1 by , 7 years ago
Component: | Unassigned → Sessions |
---|---|
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → Session restore of graphics: self._positions is None |
Version: | → 0.9 |
comment:2 by , 7 years ago
Cc: | added |
---|
comment:3 by , 7 years ago
It is possible for restore_snapshot to be called with None. If there is a problem saving the session, then a warning is printed: 'Unable to save "%s". Session might not restore properly.' and None is saved for the object. That can happen if take_snapshot throws an exception, or if it returns None.
To see the problem use the "debug sdump" command to convert the session file to text.
comment:4 by , 7 years ago
Resolution: | → can't reproduce |
---|---|
Status: | assigned → closed |
Ok. Seems likely that there was an error on saving the session then. I don't think I will put in code to try to allow restoring the partially saved session unless I get more reports of the same problem.
NamedView.restore_snapshot(session, data) is being called with data = None. But the take_snapshot() method can never produce data = None. So I don't see how this can happen. I tested saving and restoring sessions with named views and did not get any error.
Are there circumstances where restore_snapshot() can be called with data = None? The take_snapshot() / restore_snapshot() code for named views is the same back to ChimeraX 0.7 and the session file the person opened has a date in the file name from a few days ago. So I don't think this is caused by writing the session in an old ChimeraX.
Greg, any ideas about how restore_snapshot() could be called with data = None?