Background: I am working on a WinForm based .NET 4.0 desktop application that has few threads and timers and uses some GDI processing for user controls. During
You mention using threads - since each thread gets its own stack it could be that the default stack size is being exceeded at some point causing the exception which is then trapped by the .NET runtime. What kind of work are you doing in the threads (recursion, lots of stack variables, etc)?
I believe default thread stack size is set at 1MB - try setting the stack size to 4MB in the thread constructor and see if the error persists.