FCHOUSE - Photographing London Photoblogging our life from London!

C#, a strange SEHException and the impossible debugging…

In these days I’ve had a strange problem on .Net. In a project I’m using the “Reflection” and everything was working fine, as long as I had to debug some part of the application where some Guid were created. If the code was used without step-by-step debugging, everything worked perfectly, but if I only tried to do a breakpoint, the solution threw me a strange (and not clearly documented) exception: SEHException.

This problem bugged me for some hours, then I decided to take some tests.

The exact same code in another machine was working like a charm, therefore the problem was on the PC I was using. I decided the first “MadeInWindows” solution: a reboot. Ok, I knew it wasn’t going to work, nevertheless was the cheap er test to take. It didn’t work, of course.

Visual Studio 2005 Setup

The second step was rebuilding the Visual Studio 2005 cache, removing all my settings and thrashing away all the “bin” and “obj” folders. The test was unsuccessful, again.

I googled a lot without finding anything good, but a simple comment on a blog talking about the GAC (corrupted?)… well, if that was my only hints I had one more step to take before sending a nuke in the heart of Windows, reinstalling the system: reinstall “only” Visual Studio 2005.

It has been quite slow (VS2005 does not have this light installer, though) but in the end everything went back working again.

I still don’t know why all this happened, but at the end of the day my system was working again. That is the good thing… the bad one is that to fix a problem I had to use the worst method possible: clean up everything without understanding why it happened!


No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment

The record of the spammer stupidity! (and I feel fine) C# partial classes: an easier way of providing framework supported objects