ravibpatel / CrashReporter.NET

Send crash reports of your classic desktop application developed using .NET Framework directly to your mail's inbox with full exception report, stack trace and screenshot.
MIT License
185 stars 74 forks source link

How does it handles an OutOfMemoryException? #20

Closed rafael-biz closed 5 years ago

rafael-biz commented 5 years ago

If an application gets out of memory because of a memory leek, how does CrashReporter.NET manages to handle it and send the reports?

And what if an application reaches the maximum number of sockets supported, how does it sends the reports?

PandaWood commented 5 years ago

Hi @rafael-biz

FYI An “out of memory” error happens because the process is unable to find a large enough section of contiguous unused pages in its virtual address space to do the requested mapping.

So most of the time, the memory to do anything else (eg send a report) should be fine.

https://blogs.msdn.microsoft.com/ericlippert/2009/06/08/out-of-memory-does-not-refer-to-physical-memory/

rafael-biz commented 5 years ago

Hi @PandaWood,

Thanks for the clarification. So, if I got it right, the CrashReporter.NET relyies on catching unhlanded exceptions by adding an event handler on AppDomain.CurrentDomain.UnhandledException, right?

ravibpatel commented 5 years ago

@rafael-biz Yes, That is correct.