Page MenuHomePhabricator

save qbi lead to critical error
Closed, ResolvedPublic

Description

  • load dwi
  • start any reconstruction

Event Timeline

the missing file extension ".qbi" leads to the crash

The cause of the bug is the call to

> extension = ...GetFilenameLastExtension(...)
in QmitkIOUtil::GetFileNameWithQDialog

which is using the QString selectedFilter passed into the function without checking for != null_ptr

It will not happen for regular image types (extensions) since the code execution differs before reaching the GetFileNmaeWithQDialog function. For normal images, the call stack is

SaveBaseDataWithDialog
SaveImageWithDialog
GetFileNameWithQDialog

and in diffusion

SaveBaseDataWithDialog
SaveToFileWriter <-- this one is not setting the selectedFilter parameter, so it has the default value of 0x0
GetFileNameWithQDialog

Quick fix : check for 'selectedFilter != NULL' before call and throw an exception stating 'no extension given, could not save' or so

Better fix: create the selectedFilter also for the SaveToFileWriter

New remote branch pushed: bug-15460-saveQbiLeadToCriticalError

Merged into release branch. release_fix+

Could not be reproduced.
Possibly this is already fixed.