View Issue Details

IDProjectCategoryView StatusLast Update
0003209Slicer4Module DICOMpublic2017-06-07 23:27
Reporterfedorov Assigned Topieper  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.4.0Fixed in VersionSlicer 4.3.0 
Summary0003209: Crash importing the directory
Description

Trying to import this directory: https://www.dropbox.com/sh/io6wfpvcuw3wew2/C_rbq4mvsM I have a crash Processing /Users/fedorov/Downloads/TESTSlicer/PCAMPMRI-00685_20040222_1113/SCANS/8/DICOM/PCAMPMRI-00685.MR.M2197_BD_Pelvis_w.8.27.20040222.111314.cqg9ee.dcm
QSqlQuery::value: not positioned on a valid record
QSqlQuery::value: not positioned on a valid record
inserting filePath:
"/Users/fedorov/Downloads/TESTSlicer/PCAMPMRI-00685_20040222_1113/SCANS/8/DICOM/PCAMPMRI-00685.MR.M2197_BD_Pelvis_w.8.27.20040222.111314.cqg9ee.dcm"
database filename for
"1.3.6.1.4.1.14519.5.2.1.3671.7001.212940720243354890456184752998" is
empty - we should insert on top of it
This looks like a different patient from last insert: "PCAMPMRI-00685"
Found patient in the database as UId: 5
Going to insert this instance with dbPatientID: 5
Used existing study:
"1.3.6.1.4.1.14519.5.2.1.3671.7001.113526380131074083860111581079"
Statement: SELECT * FROM Series WHERE SeriesInstanceUID = ?
Used existing series:
"1.3.6.1.4.1.14519.5.2.1.3671.7001.333629939733410600012358856645"
Could not load ""
DCMTK says: Invalid filename
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

Additional Information

r22153

TagsNo tags attached.

Relationships

related to 0001832 closedpieper add try/catch around render calls and event processing 

Activities

fedorov

fedorov

2013-07-09 09:37

developer   ~0008965

This might be because I have multiple instances of Slicer running. I cannot close them at the moment, will update if confirmed.

pieper

pieper

2013-07-09 11:46

administrator   ~0008968

I was able to import and load this data on my machine so maybe it si something to do with you having two instances running. There is another bug on that topic, so we can mark this as duplicate if so.

I'd like to figure out the exact circumstances that lead to the crash though, since I haven't ever been able to replicate it on my machine with multiple instances running.

fedorov

fedorov

2013-08-05 07:29

developer   ~0009380

I have the crash consistently with only one instance of Slicer running, r22257, here's the dataset: https://www.dropbox.com/s/12n4kts4icseagr/ProstatePhantom_MR.tgz

fedorov

fedorov

2013-08-05 07:29

developer   ~0009381

Processing /Users/fedorov/ImageData/MR-US/ProstatePhantom/MR/ANDRIY_PROSTATE_TEST.MR.INTERVENTIONAL_PROSTATE.2.1.20130501.075723.y5v654.dcm
QSqlQuery::value: not positioned on a valid record
QSqlQuery::value: not positioned on a valid record
inserting filePath: "/Users/fedorov/ImageData/MR-US/ProstatePhantom/MR/ANDRIY_PROSTATE_TEST.MR.INTERVENTIONAL_PROSTATE.2.1.20130501.075723.y5v654.dcm"
database filename for "1.3.12.2.1107.5.2.36.40481.2013050108070063028606399" is empty - we should insert on top of it
This looks like a different patient from last insert: "AMIGO"
Found patient in the database as UId: 2
Going to insert this instance with dbPatientID: 2
Used existing study: "1.3.12.2.1107.5.2.36.40481.30000013042912083307800000007"
Statement: SELECT * FROM Series WHERE SeriesInstanceUID = ?
Used existing series: "1.3.12.2.1107.5.2.36.40481.2013050108065967063706343.0.0.0"
Could not load "/Users/fedorov/Downloads/ASTA_and_RESOLVE/20120501-2/SCANS/2/DICOM/ANDRIY_PROSTATE_TEST.MR.INTERVENTIONAL_PROSTATE.2.1.20130501.075723.y5v654.dcm"
DCMTK says: No such file or directory
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

error: [/Users/fedorov/github/Slicer-Superbuild-Release-ITK4/Slicer-build/bin/Slicer.app/Contents/MacOS/./Slicer] exit abnormally - Report the problem.

pieper

pieper

2013-08-06 07:21

administrator   ~0009394

I tried this on a developer build and it did not crash (see attached image).

Was this done on your build? I wonder if it works on the nightly.

2013-08-06 07:21

 

pieper

pieper

2013-08-06 10:03

administrator   ~0009409

We'll need to try debugging on your machine if possible.

fedorov

fedorov

2013-08-06 12:33

developer   ~0009416

yes: can crash the nightly!

fedorov

fedorov

2013-08-06 13:57

developer   ~0009418

The crash seems to happen for the following scenario:

1) study is imported into DICOM db, images are not copied to the import directory
2) image files are deleted from the disk location
3) the same study is imported again - DICOM module complains about the file missing, pointing to the old file location, which does no longer exist

pieper

pieper

2013-08-09 06:20

administrator   ~0009436

Better exception handling added in r22273

The underlying issue that causes the exception to be thrown is reported here:

https://github.com/commontk/CTK/issues/357

fedorov

fedorov

2013-08-09 14:53

developer   ~0009451

This time, I get the exception message in the screenshot attached. I assume this is expected behavior pending CTK issue resolution, right?

If so, let's keep this bug open until the underlying CTK issue is resolved?

2013-08-09 14:53

 

fedorov

fedorov

2013-08-11 08:39

developer   ~0009462

Steve: there seems to be a side-effect of fixing that issue. The popup box telling how many patients/studies were imported is not focal and is hidden behind the directory selection dialog window. Or maybe that directory selection dialog should be closed after the directory is selected?

First time it happened, I didn't realize what actually happened and had to kill Slicer to regain control.

pieper

pieper

2013-08-19 13:40

administrator   ~0009522

Has this recurred? I could not reproduce it.

fedorov

fedorov

2013-08-19 15:19

developer   ~0009526

Nope, can't reproduce that modal window issue.

jcfr

jcfr

2013-09-10 12:24

administrator   ~0009923

Changed severity from crash => minor since Slicer doesn't crash anymore. See 0001832

pieper

pieper

2014-03-06 11:08

administrator   ~0011260

Andrey - can we close this issue now?

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file 8c53d089

2013-08-09 10:12:42

pieper

Details Diff
BUG: 0001832 0003140 0003209 avoid crashes by catching exceptions

Some libraries and systems throw exceptions, but Qt's default
event processing does not catch them[1]. For example, slicer
could crash when ctkDICOMItem is pointed to a file that does
not exist. Wrapping event processing in try/catch should handle
other conditions, like out of memory exceptions thrown from
inside render operations (e.g. due to overly complex glyph
rendering).

[1] http://qt-project.org/doc/qt-4.8/exceptionsafety.html

http://stackoverflow.com/questions/10665655/how-to-log-uncatched-exceptions-of-a-qapplication

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22273 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/QTGUI/qSlicerApplication.cxx Diff File
mod - Base/QTGUI/qSlicerApplication.h Diff File

Issue History

Date Modified Username Field Change
2013-07-09 08:38 fedorov New Issue
2013-07-09 08:38 fedorov Status new => assigned
2013-07-09 08:38 fedorov Assigned To => pieper
2013-07-09 09:37 fedorov Note Added: 0008965
2013-07-09 09:46 pieper Target Version => Slicer 4.3.0
2013-07-09 11:46 pieper Note Added: 0008968
2013-08-05 07:29 fedorov Note Added: 0009380
2013-08-05 07:29 fedorov Note Added: 0009381
2013-08-06 07:21 pieper Note Added: 0009394
2013-08-06 07:21 pieper File Added: Screen Shot 2013-08-06 at 11.19.07 AM.png
2013-08-06 10:03 pieper Note Added: 0009409
2013-08-06 10:03 pieper Status assigned => feedback
2013-08-06 12:33 fedorov Note Added: 0009416
2013-08-06 13:57 fedorov Note Added: 0009418
2013-08-09 06:20 pieper Note Added: 0009436
2013-08-09 06:20 pieper Status feedback => resolved
2013-08-09 06:20 pieper Fixed in Version => Slicer 4.3.0
2013-08-09 06:20 pieper Resolution open => fixed
2013-08-09 06:20 pieper Relationship added related to 0001832
2013-08-09 14:53 fedorov Note Added: 0009451
2013-08-09 14:53 fedorov File Added: Screen Shot 2013-08-09 at 18.44.22 .png
2013-08-09 14:53 fedorov Status resolved => feedback
2013-08-09 14:53 fedorov Resolution fixed => reopened
2013-08-11 08:39 fedorov Note Added: 0009462
2013-08-19 13:40 pieper Note Added: 0009522
2013-08-19 15:19 fedorov Note Added: 0009526
2013-08-30 12:45 jcfr Target Version Slicer 4.3.0 => Slicer 4.3.1
2013-09-10 12:23 jcfr Severity crash => minor
2013-09-10 12:24 jcfr Note Added: 0009923
2013-09-11 12:19 fedorov Status feedback => assigned
2013-09-17 12:21 jcfr Target Version Slicer 4.3.1 => Slicer 4.3.2
2014-03-06 10:15 nicole Target Version Slicer 4.3.2 => Slicer 4.4.0
2014-03-06 11:08 pieper Note Added: 0011260
2014-03-06 12:35 fedorov Status assigned => closed
2014-03-06 12:35 fedorov Resolution reopened => fixed
2017-06-07 23:27 pieper Changeset attached => Slicer 2145-support-for-installing-extension-from-file 8c53d089