# Crash on exit (not related to charts)

**URL:** <https://discourse.slicer.org/t/crash-on-exit-not-related-to-charts/2057>\
**Category:** Development\
**Created:** [February 9, 2018, 4:04pm UTC](https://discourse.slicer.org/t/crash-on-exit-not-related-to-charts/2057 "2018-02-09T16:04:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 9, 2018, 4:04pm UTC](https://discourse.slicer.org/t/crash-on-exit-not-related-to-charts/2057/1 "2018-02-09T16:04:38Z")

</div>

Many python tests are failing because there is a crash on exit, most of these not related to the charts-related crash that is being fixed now. Here’s a [Slicer](http://slicer.cdash.org/viewTest.php?onlyfailed&buildid=1197956) and a [SlicerRT](http://slicer.cdash.org/viewTest.php?onlyfailed&buildid=1198152) dashboard.

I did some debugging with two of the RT tests, and the call stack is the same:

> **Call stack (Windows)**
>
> ```
> python27.dll!00007ffdef0b33cb()	Unknown
> python27.dll!00007ffdef0b2bb6()	Unknown
> python27.dll!00007ffdef068934()	Unknown
> PythonQt.dll!PythonQtShell_QDialog::nativeEvent(const QByteArray & eventType0, void * message1, long * result2) Line 6233	C++
> Qt5Widgetsd.dll!QWidgetWindow::nativeEvent(const QByteArray & eventType, void * message, long * result) Line 975	C++
> Qt5Guid.dll!QGuiApplicationPrivate::processNativeEvent(QWindow * window, const QByteArray & eventType, void * message, long * result) Line 1726	C++
> Qt5Guid.dll!QWindowSystemInterface::handleNativeEvent(QWindow * window, const QByteArray & eventType, void * message, long * result) Line 728	C++
> qwindowsd.dll!QWindowsContext::windowsProc(HWND __* hwnd, unsigned int message, QtWindows::WindowsEventType et, unsigned__ int64 wParam, __int64 lParam,__ int64 * result, QWindowsWindow * * platformWindowPtr) Line 871	C++
> qwindowsd.dll!qWindowsWndProc(HWND __* hwnd, unsigned int message, unsigned__ int64 wParam, __int64 lParam) Line 1298	C++
> [External Code]	
> qwindowsd.dll!QWindowsWindow::destroyWindow() Line 1117	C++
> qwindowsd.dll!QWindowsWindow::~QWindowsWindow() Line 1074	C++
> [External Code]	
> Qt5Guid.dll!QWindowPrivate::destroy() Line 1832	C++
> Qt5Guid.dll!QWindow::destroy() Line 1787	C++
> Qt5Widgetsd.dll!QWidgetPrivate::deleteTLSysExtra() Line 1917	C++
> Qt5Widgetsd.dll!QWidget::destroy(bool destroyWindow, bool destroySubWindows) Line 12390	C++
> Qt5Widgetsd.dll!QApplication::~QApplication() Line 820	C++
> qSlicerBaseQTCore.dll!qSlicerCoreApplication::~qSlicerCoreApplication() Line 660	C++
> qSlicerBaseQTGUI.dll!qSlicerApplication::~qSlicerApplication() Line 375	C++
> SlicerApp-real.exe!`anonymous namespace'::SlicerAppMain(int argc, char * * argv) Line 268	C++
> SlicerApp-real.exe!main(int argc, char * * argv) Line 303	C++
> 
> ```

It seems to be related to processing events when destroying a window. Could it be related to --no-main-window? Any other ideas? Thanks!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 9, 2018, 4:48pm UTC](https://discourse.slicer.org/t/crash-on-exit-not-related-to-charts/2057/2 "2018-02-09T16:48:11Z")

</div>

Do any of the test failures in the Slicer core look similar to the test failures that you experience in SlicerRT?

Currently these tests fail in the Slicer core:

- qMRMLLayoutManagerVisibilityTest (Failed)
- py\_VolumeRenderingThreeDOnlyLayout (Failed)
- py\_nomainwindow\_SlicerOptionDisableSettingsTest (Failed)
- py\_AtlasTests (Failed)
- py\_AbdominalAtlasTest (Failed)
- py\_FiducialLayoutSwitchBug1914 (Failed)
- py\_SimpleFiltersModuleTest (Failed)
- py\_LandmarkRegistration (Failed)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 9, 2018, 6:17pm UTC](https://discourse.slicer.org/t/crash-on-exit-not-related-to-charts/2057/3 "2018-02-09T18:17:13Z")

</div>

I tried two Slicer tests but one passed and the other one crashed Visual Studio too, but now I have to take the computer to the store because of fan issues, so no luck yet. I’ll keep trying at home.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 15, 2018, 2:42pm UTC](https://discourse.slicer.org/t/crash-on-exit-not-related-to-charts/2057/4 "2018-02-15T14:42:57Z")

</div>

The dashboard shows passing tests now, so the crash doesn’t seem to happen any more. If it starts again I’ll do more investigation.
