“Error creating window handle” but the Handles count isn’t “high”

I have a complex application, and recently some users have been bumping with and error on a process that used to work just fine. When they click the button, the process runs and finishes but then the application throws the "error creating window handle" exception and freezes. So I started reading about the handles and all, and some people mention the 10.000 limit and stuff. I checked with a handle verifying tool, and at the point of the process the application was floating around 1000 handles. So I decided to check the GDI objects and it was aways around 250. I never managed to reproduce the error on my machines. Anyone have any idea of what might be "exploding" the handlers error with these conditions?

by paulodemoc via /r/csharp

Leave a Reply