Closed cpinter closed 4 years ago
I tried with RANDO ENT and PROSTATE, and TinyPatient. It crashed in each case.
The crash does not happen in the nightly of January 6, but it does in that of February 19.
Since the line in the code where the crash happens had a toLatin1 call in it, I quickly applied the UTF-8 changes in case it is related, but it did not improve things. Any help would be appreciated. Without being able to load RT data, SlicerRT is unusable. Thanks.
I committed a temporary fix so that at least DICOM-RT can be loaded from the application.
The crash, however, happens in tests, for example py_DicomRtImportTest. After loading the structure set, the next concole output is:
12: QSqlQuery::prepare: database not open
12: ASSERT: "!isEmpty()" in file c:\users\qt\work\qt\qtbase\include\qtcore\../../src/corelib/tools/qlist.h, line 345
which is the same place where it crashed in the case above.
@Sunderlandkyl Since you're leading the SlicerRT maintenance efforts, could you at least react to this please?
Sorry, I didn't see this issue. I'll get right on it. Thanks!
Thank you! Please make sure you're subscribed to this repository. I usually take care of PRs and minor things, but sometimes it is important that you see these.
For example the recent contributions have broken a few things, which I have partially fixed (there are issues for each). This one is probably not related to those improvements (MLC, ion, etc.) though.
I uncommented the code in https://github.com/SlicerRt/SlicerRT/commit/e089c61f8f23a386694679d61e497b620da984ec, and I can't replicate the same crash.
When I tested, both PROSTATE and TinyPatient both loaded fine, however ENT either crashes during vtkAppendPolyData execution, or never terminates (probably it does, but it may take several hours in debug mode).
The long execution time is a result of a large number of RequestRender calls during load.
Still looking into it.
This line is a little bit risky:
name += OFString(": ") + OFString(dicomDatabase->fileValue(rtPlanFileName,rtPlanLabelTag).toUtf8().constData());
There are several temporary buffers created, which normally would not be deleted until the expression is evaluated completely, but maybe something is not implemented cleanly. Splitting the expression to several expressions could be safer:
std::string planLabel = dicomDatabase->fileValue(rtPlanFileName,rtPlanLabelTag).toUtf8().constData();
name += OFString(": ") + OFString(planLabel);
It is not very likely that this is an issue, but it is easy to try if it makes a difference.
I can't replicate the same crash
I have a clean build of Slicer. I'll clean build SlicerRT too and try again.
I tested this again and now it does not crash. I will uncomment the part that caused a crash in a commit soon.
However, it took around 10 minutes to load the Eclipse ENT test dataset. It only happens if I load the RT plan as well. It seems an unreasonably long time even if the plan is complex. In addition, it created dozens of beam nodes, with one MLC table in each. I added a new ticket for this, see https://github.com/SlicerRt/SlicerRT/issues/145
When trying to load an RT study, then the application crashes at the examine stage. When the dose volume is examined, the corresponding plan's name is retrieved. The crash originates from the DICOM database during a fileForInstance call, and it goes dep into Qt. Here is the call stack:
@Sunderlandkyl @lassoan