Debugging abnormal exits on Windows

Hi folks,

I’m wondering if anyone has experience debugging abnormal exits/crashes on Windows, and what the best practices are for debugging these – errors like

error: [.../SlicerApp-real.exe] exit abnormally - Report the problem.

I’m familiar with the resources at https://slicer.readthedocs.io/en/latest/developer_guide/debugging/index.html and attaching to processes for line by line debugging, but it seems difficult to use this method to debug my issue. I have an Azure Pipeline where an installed instance of Slicer is called with some custom scripted (Python) modules running through some unit/integration tests, which throws the abnormal exit issue seemingly at random – a certain job may fail once, but rerunning that job can get it to pass.

For this, I think what I want is to dump the stack trace from Slicer automatically whenever a crash has occurred, but I’m not sure how to do this on Windows.

Probably you can set up automatic stack trace of a crashing application - see for example tips here.

I’m not sure how detailed the stack trace is without debug symbols. Probably for many functions you only see the address and not the function name. A RelWithDebInfo (Release-mode build with debug information) build could give you more information, but debug symbols (all the .pdb files) for a Slicer build are quite large, about 9GB, so it would not be very easy to distribute those.

1 Like