Friday, May 28, 2010

Installing Windows 7 in VirtualBox 3.2

This post is mostly in hopes that if other people have the same issue I describe below, they'll find the fix by googling much more easily than I did. Read on for the details.

Yesterday afternoon and this morning, I spent more time than I care to admit trying to install Windows 7 into a VirtualBox VM at work. On the first attempt, using a MSDN installer disk that a coworker lent me, I got an error which I initially attributed to a bad DVDROM: "The file or directory [...] is corrupt and unreadable"

However, after downloading an ISO image from MSDN, I saw the same error with it. I even found that by moving the popup error window, I could find another error window below it with the error code 0x80070570. So, more googling. Which turned up a lot of results regarding odd SATA drivers.

Finally I searched the VirtualBox site directly and found this post showing the same error I'd seen. In it, there is a link to another post which has a solution.

Apparently, my mistake was upgrading to the Oracle-branded VirtualBox v3.2 before attempting my install. It seems the SATA controller it provides to the windows installer isn't so great. If you remove it from your system configuration, and instead attach your virtual hard drive to the IDE controller, your installation will go much more smoothly. By which I mean, actually work.

Monday, March 8, 2010

Glasses

Coworkers and friends pointed out to me a few times in the last couple of months that I couldn't see things that I ought to have been able to. Text on a television screen, the menu items written up on a wall, etc. So I went and got an eye exam this morning.

The last time I had an eye exam I think I was 14 or 15 years old. I went because my eyes were *constantly* dry, so much so that I carried around a bottle of eyedrops with me for months on end. I guess Mom or Dad thought it might've been some sort of eye problem so I got an eye exam. I distinctly remember during the exam that I was only asked to read the top few lines of the eye chart, even though I could clearly read every line on the thing. Sure enough, it turned out my vision was fine, I just had dry eyes.

Fast forward 15 years, and I'm sitting in an exam room with the eye chart on the opposite wall and I realize that even the top most line is a bit blurry. And there's no way I'm reading anything below the second line. Funny how it took looking at an eye chart (even before the doctor came in) to make that painfully obvious.

So in comes the doctor and repeats the same procedure as my last eye exam. "Which is better? One? Or Two? One? .... or Two?" Only this time my vision actually gets better. Having never worn glasses, it's really odd to just put something in front of your eyes and suddenly see detail that wasn't there a second ago. It's like life is suddenly in HD. (again)

After the exam I was walked next door to peruse frames. They sat me down at a desk and brought me different frames to try on, which seemed rather inefficient -- I could've walked around the place and tried on the frames that they had on display myself, but instead the sales guy kept popping back into the back to get some more. I asked if he had any frameless glasses to try on. I can't remember his exact reply, but it was something along the lines of "You don't want those, you're not old. We can do better." Ok, whatever. I ended up with some rectangular jobbers trimmed in a thin charcoal-colored metallic frame. Still not sure whether I actually like them, but they don't have to be stylin' if I'm mostly going to wear them for driving.

Thursday, March 4, 2010

Weird Java SAX XML Parsing Error

One of our customers reported some erroneous data output by our command-line client. After about a day's worth of tracing code, I traced the bad data to the default implementation of SAXParser in Sun's Java 6 JRE.

We use Apache XML-RPC as an XMLRPC client, and it just calls out to SAXParserFactory.newInstance() to grab a SAX implementation. Java 5 and 6 both offer default implementations, but the error only appears in Java 6 JREs. In my debugging, I can see the JRE6 implementation passing in obviously bad data to the ContentHandler.characters() method in the Apache XMLRPC implementation.

Thankfully, if you drop in a replacement SAX parser, Sun's implementation will call out to it, so fixing the error was as easy as dropping in Apache Xerces.

The thing is, I'd like to track down the issue so I can make a proper bug report. I haven't been able to find any similar bug reports via googling or directly searching Sun's bug database.

The bad data is coming from "com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser", so it looks like it's a(n older) version of Xerces, but after about 15 minutes of searching I still hadn't found the correct version of source code to attach to my debugger. If anyone has suggestions let me know, but otherwise I think I'm going to give up searching for the root cause of the issue.

Thursday, February 4, 2010

The Windows 7 Honeymoon is Over

About a month ago I finally bit the bullet and upgraded to Windows 7 from my aging Windows XP. It was about time to do a fresh install of Windows to clean up the cruft, and I had heard somewhat positive things about it from friends. And by "somewhat positive things" I mean things along the lines of "It doesn't suck nearly as much as Windows Vista did!"

I was happy with Windows 7 for a few weeks, but I've started to see some odd DNS issues. DNS resolution seems to be really slow, and often fails. I'd say about 1-2 out of 5 web page requests fail to load due to DNS resolution failure. Then I click reload once or twice, and suddenly it gets the IP address and works.

I first mistakenly attributed it to Time Warner's DNS servers which aren't always the best. But trying GoogleDNS and OpenDNS didn't seem to alleviate the problem.

Tonight I came home and putzed around on my (OS X) laptop for a while. I loaded a number web sites without issue. But as soon as I hopped onto my Windows 7 workstation the DNS issues were back. It seems to *only* affect this machine.

Apparently many other people are having similar issues when using a wide variety of hardware. I've now spent hours trying to debug the issue and am no closer to a solution.

It's not the network layer -- I can pingflood other machines on my network and not lose a single packet. I tried disabling all network protocols but IPv4, and that doesn't seem to change anything. I'm getting pretty close to wiping Windows 7 from my drive and reinstalling XP.

Sooo, if you were thinking of upgrading, maybe wait for another service pack or 3.