Skip to content

Commit

Permalink
HACKY trial to catch and cope with OutOfMemory errors due to the LDAS…
Browse files Browse the repository at this point in the history
…tuff etc.: jimmejardine#19
  • Loading branch information
GerHobbelt committed Aug 2, 2019
1 parent 7bd3ee6 commit bd65680
Show file tree
Hide file tree
Showing 2 changed files with 203 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ public static void DisplayException(Exception ex)
// Collect all generations of memory.
GC.Collect();

// When we're looking at an OutOfMem exception, there's nothing we can do but abort everything!
if (ex is System.OutOfMemoryException)
{
throw ex;
}

if (!Application.Current.Dispatcher.CheckAccess())
{
Application.Current.Dispatcher.Invoke(((Action)(() => DisplayException(ex))));
Expand Down
Loading

0 comments on commit bd65680

Please sign in to comment.