Ambiguous Errors
June 5, 2005
You know those errors that just have no sensible description and seemingly, no sensible cause? Those errors that make you go through various lines of code that you know can’t be it but try to change anyway. Those errors that make you try clean builds several times. Those errors that make you restart your IDE, and even your computer to see if that fixes it? Those errors that make you want to smash your computer to pieces? Those errors that give you a throbbing headache? Those that make you want to quit for a day at least? Well, anyway, it can’t help that I’m doing this at 2 AM and there’s some girl throwing up very loudly in the pathway outside my window, drunk from a party in the apartment across from my window.
So, finally, what is the error? “Failed to load resources from resource file. Please check your Setup.” It just popped up after making what seemed like some small changes to my code. I had no idea what it was talking about. I had done no GUI form changes or anything that would remotely mess with the resource files. So, what in the hell was it talking about? After deleting the resource files, recreating them, restarting the IDE a whole bunch of times, restarting the computer, the error wouldn’t go away. I was baffled, stupified, getting angry, getting a headache.
So, what was the problem? Turns out, there was an exception generated with some new code I wrote. A stack overflow exception – was doing a stupid thing:
class ServiceProxy : WebServicesClientProxy
{
...
new public string Url
{
get { ... return this.Url; ... }
set { ... this.Url = value; ... }
}
...
}
(I meant base.Url..)
But since I was displaying a Win Form, the exception was somehow getting caught and turned into that horrible, unrelated error (when the ServiceProxy was used). Ugh.