Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2613 closed defect (fixed)

Sessions + Basic Actions + Objects == buggy

Reported by: phil.cruz@… Owned by: Conrad Huang
Priority: normal Milestone:
Component: Sessions Version:
Keywords: Cc: chimera-programmers
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Darwin-17.7.0-x86_64-i386-64bit
ChimeraX Version: 0.91 (2019-10-08)
Description
I am having trouble reading in ChimeraX session files. This is one example but there are others.

Log:
UCSF ChimeraX version: 0.91 (2019-10-08)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open "/Users/cruzp2/OneDrive - National Institutes of Health/Pathogen
Explorer/H1plusAB/H1plusABchimerax.cxs"

Unable to restore session, resetting.  
  
Traceback (most recent call last):  
File
"/Users/cruzp2/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/session.py", line 653, in restore  
obj = sm.restore_snapshot(self, data)  
File
"/Users/cruzp2/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/basic_actions/statemgr.py", line 65, in restore_snapshot  
cmd.name_frozen(session, name, Objects(**value))  
File
"/Users/cruzp2/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/objects.py", line 54, in __init__  
self._handlers = { m:m.triggers.add_handler("deleted", self._model_deleted_cb)
for m in self._models }  
File
"/Users/cruzp2/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/objects.py", line 54, in <dictcomp>  
self._handlers = { m:m.triggers.add_handler("deleted", self._model_deleted_cb)
for m in self._models }  
AttributeError: 'NoneType' object has no attribute 'triggers'  
  
Error processing trigger "deleted":  
AttributeError: 'Objects' object has no attribute '_handlers'  
  
File
"/Users/cruzp2/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/objects.py", line 74, in _model_deleted_cb  
del self._handlers[model]  
  
See log for complete Python traceback.  
  
Summary of feedback from opening /Users/cruzp2/OneDrive - National Institutes
of Health/Pathogen Explorer/H1plusAB/H1plusABchimerax.cxs  
---  
note | Traceback (most recent call last):  
  
File
"/Users/cruzp2/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/session.py", line 653, in restore  
  
obj = sm.restore_snapshot(self, data)  
  
File
"/Users/cruzp2/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/basic_actions/statemgr.py", line 65, in restore_snapshot  
  
cmd.name_frozen(session, name, Objects(**value))  
  
File
"/Users/cruzp2/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/objects.py", line 54, in __init__  
  
self._handlers = { m:m.triggers.add_handler("deleted", self._model_deleted_cb)
for m in self._models }  
  
File
"/Users/cruzp2/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/objects.py", line 54, in <dictcomp>  
  
self._handlers = { m:m.triggers.add_handler("deleted", self._model_deleted_cb)
for m in self._models }  
  
AttributeError: 'NoneType' object has no attribute 'triggers'  
  
  
  
During handling of the above exception, another exception occurred:  
  
  
  
Traceback (most recent call last):  
  
File
"/Users/cruzp2/Applications/ChimeraX_Daily.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/cruzp2/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/objects.py", line 74, in _model_deleted_cb  
  
del self._handlers[model]  
  
AttributeError: 'Objects' object has no attribute '_handlers'  
  
  
  
  
opened ChimeraX session  
Exception ignored in: <function Objects.__del__ at 0x1283ead40>  
Traceback (most recent call last):  
File
"/Users/cruzp2/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/objects.py", line 57, in __del__  
for handler in self._handlers.values():  
AttributeError: 'Objects' object has no attribute '_handlers'  




OpenGL version: 4.1 ATI-1.68.23
OpenGL renderer: AMD Radeon Pro 560 OpenGL Engine
OpenGL vendor: ATI Technologies Inc.
File attachment: H1plusABchimerax.cxs

H1plusABchimerax.cxs

Attachments (2)

H1plusABchimerax.cxs (62.2 MB ) - added by phil.cruz@… 6 years ago.
Added by email2trac
H1plusABchimerax.txt (1.8 MB ) - added by Greg Couch 6 years ago.
Textual version of session file

Change History (6)

by phil.cruz@…, 6 years ago

Attachment: H1plusABchimerax.cxs added

Added by email2trac

comment:1 by Eric Pettersen, 6 years ago

Cc: chimera-programmers added
Component: UnassignedSessions
Owner: set to Conrad Huang
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionSessions + Basic Actions + Objects == buggy

Somehow, the basic_actions' named-selection state manager is initializing an Objects instance with a list of Models that contains a None. It's unclear if the None infiltrates the list before the original take_snapshot or as part of the session-restore mechanism by some Model's restore_snapshot returning None/nothing. Is there anyway we can find out? It would also be nice if this relatively minor restore error didn't prevent the entire session from restoring. Also, it would be good if the session-restore mechanism issued a warning if a restore_snapshot call returns None.

A different but tangentially related problem is that if you name a frozen selection and then close all models, Basic Actions continues to display it unchanged. If you then open some models, the frozen selection disappears, but if you save a session in between then bad things happen upon restore (complains about empty selection).

--Eric

by Greg Couch, 6 years ago

Attachment: H1plusABchimerax.txt added

Textual version of session file

comment:2 by Eric Pettersen, 6 years ago

Resolution: fixed
Status: assignedclosed

restore_snapshot for MolecularSurface wasn't returning the restored surface. Left in the "debugging" code that warns if restore_snapshot returns None.

comment:3 by Eric Pettersen, 6 years ago

Fix will be in tonight's builds. Phil, please let us know if this doesn't fix the problem for your other session files as well.

--Eric

comment:4 by Conrad Huang, 6 years ago

Add trigger handler when models are removed to clean up frozen selectors that contain no models a7cfead8f. Also added workaround to ignore None values coming in from sessions when initializing Objects instances bcc117563.

Note: See TracTickets for help on using tickets.