I just tried your code on a form.. no crash. On a user control... no crash. In a class... no crash. I also tried it all on both 32-bit and 64-bit... no crash.

There's good reason behind us asking for a simple example project, and that is because other factors can influence the problem that perhaps you are not aware of. Sometimes the act of creating a minimal example helps you to further narrow down the problem before we even get to look at it, and this ultimately makes it more likely we'll get to fix the problem sooner.

It would be much appreciated if you could please give us a simple example project to demonstrate the issue.