Page MenuHomePhabricator

Loading of empty and corrupt files
Closed, InvalidPublic

Description

Caspar did the following:

Loading was always done by drag'N'drop.

Loading:

Renaming an empty .txt to various extensions produced the following results:

  • .nrrd : Nothing (usual cryptic Console message+)
  • .nii : Nothing (usual cryptic Console message)
  • .nii.gz : Nothing (usual cryptic Console message)
  • .qbi : Console Warning
  • .dti : Console Warning
  • .dwi : Console Message Containing an Error
  • .fib : Console Error and possible program corruption messagte box
  • .cnf : Console Error

Renaming a .txt filled with "ßäöasdfäpaorgäipnoi²€€@µ" (without quotes):

  • .nrrd : Nothing (usual cryptic Console message)
  • .nii : Nothing (usual cryptic Console message)
  • .nii.gz : Nothing (usual cryptic Console message)
  • .qbi : Freeze (crash)
  • .dti : Freeze (crash)
  • .dwi : Freeze (crash)
  • .fib : Console Error and possible program corruption message box (file is blocked by MITK afterwards)
  • .cnf : Console Error

Debuging reveals a debug assertion failure (sequence not ordered) from the
allWriters.merge(list2);
call in mitkCoreObjectFactory.cpp. This seems to prevent the dialogue from opening. The (correct) Writer will then continue using the node name as filename (no path, no extension).

+ Usual Cryptic Console message:
("application/x-qt-windows-mime;value="Shell IDList Array"", "application/x-qt-windows-mime;value="UsingDefaultDragImage"", "application/x-qt-windows-mime;value="DragImageBits"", "application/x-qt-windows-mime;value="DragContext"", "application/x-qt-windows-mime;value="DragSourceHelperFlags"", "application/x-qt-windows-mime;value="InShellDragLoop"", "text/uri-list","application/x-qt-windows-mime;value="FileName"", "application/x-qt-windows-mime;value="FileNameW"")""

Event Timeline

Nice find Caspar ;)

If this is not specific to drag'n'drop I think we should write some CMake script (or c++ program) to generate all these empty and strange files with many different endings and pass them one by one to IOUtil.

New remote branch pushed: bug-13524-LoadingOfEmptyAndCorruptFiles

The problem is caused by the different behavior of the different file reader, it is not caused by drag'n'drop.

Frank and I extended the IOUtilTest to check that the behavior of all core readers is the same. There is still the problem that there is no central mechanism that test if all file readers. This should be discussed.

It also needs to be discussed what the expected behavior is.

We need to discuss those points in the next mitk meeting.

The default behaviour should be an MITK_THROW error.

Since the reader are not in the core, it is not possible to ensure this behaviour by a test in the core.

It seems as if this problem has been influenced by the ITK-4 update.

For an empty .txt file with renamed extension, all extensions return an error messsage in the console. An additional user feedback might be helpful.

for file names containing string "ßäöasdfäpaorgäipnoi²€€@µ": All extension lead to an error which states that the file is not found.

For files containing the string "ßäöasdfäpaorgäipnoi²€€@µ": They lead to an freeze of MITK. This is an bug in ITK / Teem Nrrd library.
(NrrdIO\string.c). I will notice the Teem-team.

kislinsk changed the task status from Invalid to Spite.Jun 27 2018, 1:30 PM
kislinsk added a project: Bulk Edit.
kislinsk changed the task status from Spite to Invalid.Jun 27 2018, 1:36 PM
kislinsk removed a project: Bulk Edit.