Skip to content

Environment.Exit() causes the application to hang #990

@jamespearce2006

Description

@jamespearce2006

My WPF application catches unhandled dispatcher exceptions, notifies the user, logs the stack trace, then calls Environment.Exit() to shut the application down immediately.

Unfortunately, with CefSharp, calling Environment.Exit() causes the application to totally lockup. In fact, it locks up so badly that I cannot attach a debugger. Calling it with the debugger attached also causes Visual Studio to lock up.

The same issue affects the WpfExample.

Calling Environment.FailFast works, but unfortunately shows Microsoft's own exception dialog.
The only solution I can think of is to kill the current process, but this seems messy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions