-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save. Close. Reopen. crashes UV-CDAT #230
Comments
I wonder if this is related to #213 and the
If I start uvcdat fresh and load a saved project before doing anything else, I get that message on the console (this might go to the uvcdatsession.log as well). |
I don't think it is related, because it happens before and after I fixed #213. And the error on Linux does not mention setCurrentWidget. But it may have something to do with invalid or dangling references. VisTrails may be reloading the same Vistrail object because of the way Locator caching works. |
Clearing the VisTrails cache avoids the problem. But then I get the error below instead. What is {{{ |
It seems to be related to the VCSQtManager. This only happens with vcs projects, DV3D and others work fine. I traced it to this line vistrails/packages/uvcdat_cdms/init.py:1070 self.window = VCSQtManager.window(self.windowId) produces this (partial) segfault dump
The segfault occurs while trying to step into that function, almost as if it's unable to access the VCSQtManager class It appears that sometimes this function succeeds, but returns some QAbstractUriResolver, which causes the exception Tommy was seeing, which is then followed by this segfault dump
My best guess is that the VCSQtManager address space is being deleted when a project is closed, and sometimes gets replaced by this QAbstractUriResolver. @doutriaux1 any idea how this might be happening? What all get's released when a project is closed? |
This function at vistrails/packages/uvcdat_cdms/init.py:1140, part of the QCDATWidget class looks suspect: def deleteLater(self):
""" deleteLater() -> None
Make sure to free render window resource when
deallocating. Overriding PyQt deleteLater to free up
resources
"""
#we need to re-parent self.window or it will be deleted together with
#this widget. The immediate parent is also deleted, so we will set to
# parent of the parent widget
if self.window is not None:
self.window.setParent(self.parent().parent())
self.window.setVisible(False)
self.canvas = None
self.window = None
QCDATWidget.usedIndexes.remove(self.windowId)
QCellWidget.deleteLater(self) Removing this function altogether (restoring base deleteLater functionality) gets passed the initial segfault, but causes a new segfault.
I traced this to lines 1105 and 1109 which try to change attributes on the graphicsmethod. cgm = self.get_graphics_method(plot.plot_type, plot.graphics_method_name)
if plot.graphics_method_name != 'default':
for k in plot.gm_attributes:
if hasattr(plot,k):
if k in ['legend']:
setattr(cgm,k,eval(getattr(plot,k))) ################## SEGFAULT HERE
else:
if getattr(plot,k)!=getattr(cgm,k):
#print "Setting:",k,getattr(plot,k)
setattr(cgm,k,getattr(plot,k)) ##################### OR HERE
#print k, " = ", getattr(cgm,k) |
I was able to get around the issue by setting the QCDATWidget's parent to the main window, and then reusing that widget if it had been saved. It seems to be working. I will push the fix soon. |
Fixed on branch uvcdat-230-save-close-open-crash and merged into uvcdat-next. |
A new high level gui test has been added for this on these branches VisTrails: uvcdat-246-gui-ctests They have been merged into uvcdat-next and devel-master respectively. |
Worked for me, however found another problem. Will file a new bug. |
Create an ASD + clt plot. Save. Close. Reopen. UV-CDAT will crash. This happens on Linux and Mac. Below is the stack trace on mac.
The text was updated successfully, but these errors were encountered: