I think the problem is that Im running the debug configuration because with the release configuration works fine also

Then see my above post (I just edited it a second ago). Apparently, VC.NET is 'smart' enough to let you know when you've used a variable without initializing it, and gives you a crash so that you don't end up with a bug going unnoticed.

Then see my above post (I just edited it a second ago). Apparently, VC.NET is 'smart' enough to let you know when you've used a variable without initializing it, and gives you a crash so that you don't end up with a bug going unnoticed.