View Issue Details

IDProjectCategoryView StatusLast Update
0002707Slicer4Core: GUIpublic2014-03-06 05:09
Reporternicole Assigned Toalexy  
PrioritynormalSeveritycrashReproducibilitysometimes
Status closedResolutionfixed 
PlatformlinuxOSOS Version
Product VersionSlicer 4.1.1 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.2.0 
Summary0002707: Crash via assert when trying to save a scene opened from MRB
Description

When opening an MRB, the file is expanded into a temporary directory which is then deleted.
I need to make adjustments to the scene views and then save a new copy of the MRB or sometimes just save the mrml file, but most of the time opening the save data dialog causes an assert crash because the scene's root directory is set but does not exist.

Steps To Reproduce

Open an MRB file
(Restore a scene view?)
File -> Save
ASSERT: "newDir.exists()" in file /projects/birn/nicole/Slicer42/Slicer/Base/QTGUI/qSlicerSaveDataDialog.cxx, line 198

TagsNo tags attached.

Activities

nicole

nicole

2012-10-30 09:52

administrator   ~0006908

Possible solution?

  • Q_ASSERT(newDir.exists());
  • if (!newDir.exists())
  • {
  • newDir.mkdir(newDirectory);
  • }
pieper

pieper

2012-10-30 10:24

administrator   ~0006909

Yes, I think that's a better solution.

I'm reassigning this to Julien.

pieper

pieper

2012-10-30 10:26

administrator   ~0006910

Julien - have a look at the logic here - probably this should prompt the user rather than just creating the old directory. Or it should switch the default directory.

finetjul

finetjul

2012-10-30 10:37

administrator   ~0006913

Concerning the MRB scene case, I think it's a mistake to keep around an obsolete scene path. I believe when the temporary path is deleted, the scene URL and nodes scene root dirs should be reset. If they are reset (empty), I believe (not 100% sure) the save data dialog chooses a default directory.

Nonetheless, the user can also delete the scene directory after loading it. If that happens (newDir.exists() == false), then I believe we can create the directory but the user should be warned (yes/no message box).

alexy

alexy

2012-10-30 14:49

developer   ~0006944

If the scene root directory does not exist set it to current dir.

http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21288

pieper

pieper

2012-10-30 14:53

administrator   ~0006947

Alex, Nicole, and I worked on this - Alex is committing a fix.

I agree that the user should be warned of invalid paths, but right now
the operation of saving will create the directories and not crash.
This may not be ideal behavior, but the user will have every
opportunity to change the paths inside the dialog if they want to.

jcfr

jcfr

2014-03-06 05:08

administrator   ~0010996

Closing resolved issues that have not been updated in more than 3 months

Issue History

Date Modified Username Field Change
2012-10-30 09:46 nicole New Issue
2012-10-30 09:46 nicole Status new => assigned
2012-10-30 09:46 nicole Assigned To => pieper
2012-10-30 09:50 nicole Additional Information Updated
2012-10-30 09:52 nicole Note Added: 0006908
2012-10-30 10:24 pieper Note Added: 0006909
2012-10-30 10:25 pieper Assigned To pieper => finetjul
2012-10-30 10:26 pieper Note Added: 0006910
2012-10-30 10:26 pieper Status assigned => acknowledged
2012-10-30 10:37 finetjul Note Added: 0006913
2012-10-30 14:49 alexy Note Added: 0006944
2012-10-30 14:49 alexy Status acknowledged => resolved
2012-10-30 14:49 alexy Resolution open => fixed
2012-10-30 14:52 pieper Status resolved => assigned
2012-10-30 14:52 pieper Assigned To finetjul => alexy
2012-10-30 14:53 pieper Note Added: 0006947
2012-10-30 18:18 alexy Status assigned => resolved
2012-10-30 18:35 finetjul Product Version => Slicer 4.1.1
2012-10-30 18:35 finetjul Fixed in Version => Slicer 4.2.0 - coming release
2012-10-30 18:35 finetjul Target Version Slicer 4.3.0 => Slicer 4.2.0 - coming release
2014-03-06 05:08 jcfr Note Added: 0010996
2014-03-06 05:09 jcfr Status resolved => closed