I just grappled with an annoying, extremely persistent bug that had me scratching my head for several hours. I'm using C# (.Net Framework 2.0) in conjunction with the built in Settings, which generates an XML file. The settings worked wonderfully... until today. Today, whenever I ran the program from the IDE, it gave me this error:
Configuration system failed to initialize.
Root element missing at (C:\Documents and Settings\... several directories in ... \ user.config)
I checked the folder it referenced, which included a long string of seemingly random characters and didn't exist. I even went so far as to create it and populate it with the necessary user.config file, to no avail.
Eventually, I changed the folder name. I'd just renamed that folder from "NanoMETER#"
to "NanoMETE#"
temporarily. It worked.
So I got rid of the revision, and added the R back onto the end of "NanoMETE"
. It errored. Removed the R, it worked. Any folder named "NanoMETER#"
, exactly as such, crashes when it tries to load the application configuration settings. If I name the folder to anything else, it works beautifully.
I ... I just don't get it. Nowhere in the entire project is the name of the folder referenced, nor is "NanoMETER#"
used as a variable anywhere. Does anyone have any idea what could have caused this? I'm just completely stumped. It's probably been one of the most WTF bugs I've had on the project...