Opened 4 years ago
Closed 3 years ago
#5807 closed defect (fixed)
Session save crashes when it registers all aliased commands
Reported by: | Tom Goddard | Owned by: | Greg Couch |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Sessions | Version: | |
Keywords: | Cc: | chimerax-programmers | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
Saving a session should not register every aliased command as a side-effect, because it leads to save failures if any command registration fails.
Two crashes saving session (the worst time to crash) #5806 and #5787 happened because the session saving code appears to register every command that has an alias. One of those commands is "webcam" and registering it imports the massive QtMultimedia library which was the direct cause of those session save crashes. Apparently it is a Qt bug. But we definitely should not be trying to register every aliased command when saving any session. An error in any command registration completely cripples session save.
Change History (4)
comment:1 by , 4 years ago
Priority: | moderate → high |
---|
comment:2 by , 4 years ago
Maybe it's because mutable default arguments are used for the packages
and supersedes
arguments to BundleInfo.__init__
? If every bundle is recorded there eventually, somewhere later on it could have the knock-on effect of registering all the commands.
comment:3 by , 4 years ago
This should have nothing to do with mutable default arguments. But that should not be done and is easy to fix (will be done shortly).
Deferred registration of commands is an optimization to speed up the startup time. So it is both a bug that the commands failed to register and a bug that it affected the session code.
comment:4 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Limit search for user aliases to completely registered commands (ie., don't do any lazy registration to find aliases unless "all" aliases are requested).
#5863 is another crash when saving a session that could be caused by registering aliased commands.