Crash reporter

../_images/crash-report.png

In rare cases, untreated exceptions may occur in the application.

The Crash reporter displays all available information of the exception and stores it for later analysis.

The user can respond to the exception in two ways:

  • Ignore: The application is not terminated. However, the state of the program may be corrupted by the exception. If unknown behavior occurs, the application should be restarted.

  • Exit Application: The application is terminated. Unsaved changes are lost.

Each report is stored as crashReport.txt in a separate folder below %ProgramData%\Gefasoft\CrashReporter (folder name from date and time). With the command line parameter -suppressCrashDialog no dialog is shown; the report is still created and the crash is also written to the log.

As long as the crash dialog is open, Viper does not open another dialog for further exceptions and does not create another report. Each further exception is then only written to the Viper log as a FATAL entry with the complete exception text, recognizable by repFile=suppressed (recurring crash). If such an exception occurs outside the user interface and ends the application, Viper ends without a second dialog. The crash dialog always stays in the foreground. With -suppressCrashDialog every exception still creates its own report, as before.

Up to Viper 8.0.6, every further exception opened a new dialog on top of the previous one. With an error that keeps recurring, Viper could then no longer be operated, e.g. when the display rendering is lost after a laptop resumes from standby with a different monitor setup. In this case Viper still has to be restarted (Exit Application).

Native crashes

After a native crash, e.g. an access violation inside HALCON or a camera SDK, the state of the application is corrupted. In this case no crash dialog is shown, and Ignore is not possible. Instead, Viper writes:

  • a FATAL entry to the Viper log with error code, thread and stack trace, starting with CrashReporter: native crash (corrupted-state exception, 0x...),

  • a short crashReport.txt in the folder mentioned above.

Viper then terminates. If the crash occurs in a HalconWrapper tool, an additional FATAL entry names the tool and the HDevelop procedure that was running.

Up to Viper 8.0.5, Viper ended in this case without any entry in its own log. The only trace was in the Windows event log (source .NET Runtime, event 1026).