Archive for the tag 'debugging'

VMWare Fusion networking gotcha (don’t try to be too smart)

I got a new MacBook, and bought VMWare Fusion, so I could… well, I’m not exactly sure what I planned to do with it, but since I have no other machine in my house that runs Windows, I guess I thought I’d use it for that occasional windows app (PowerISO for example) or to test prince.org through the eyes of IE7. Well, I installed XP into it and that was just dandy, it really knows exactly how to handle hosting Windows, great vmware tools integration, the whole shebang, flawless.

More interestingly, I thought I’d install an Ubuntu instance, and maybe retire the big honking RAID5 Ubuntu server machine, and save the corresponding energy usage, etc. I mostly use it for mysql slave backups of prince.org, and some minor code development (it used to also host my music and photo libraries on the raid disks, but I’ve since moved that to an external drive on the MacBook with TimeMachine on a different device, providing the redundancy.)

Sounds well and good, and vmware also “understands” Ubuntu, but uh, not nearly as smoothly as Windows… the whole vmware tools setup is, while not painful, certainly not “one-click”. But, it works. Well, I thought it did–my networking was hosed. I futzed with it a bit thinking it was their special vmxnet drivers/devices, and then realized my host OSes networking was not working, either. Since I connect via 802.11n, and it’s sometimes flaky (hard to know if it’s Leopard or the wonky apple gigabit router), I turned airport off and then back on and it came back in the host… but Ubuntu was still not happy. If I reboot Ubuntu, it takes out the host networking again… hmmm. Try swithing to bridged mode instead of shared… same thing. Hmmmmmm…. a head-scratcher.

Finally, I hit upon the root cause… I bet the router isn’t happy with my “lock this IP to this specific MAC address”, when there are 2 OSes both sending packets, on that MAC! Yep, that was it. I removed the settings in the Airport itself that caused it to always hand out a specific IP via DHCP to a specific MAC, and assigned IPs manually to the MacBook and Ubuntu, and all was well. Yay. I’m still not sure what magic was going on to make networking in Windows work, but no worries.

I actually wonder if I were to use the “DHCP client ID” instead of the MAC address, if it’d work that way… I just don’t know where to set that in Ubuntu… something to try another day!

Magical, incompatible Firefox display style value for table rows

I was writing some javascript to show/hide table rows based on user input (filtering to match search terms), and saw some really weird behavior. Now, of course, the first problem is that I was writing JS code, which I pretty well suck at. But, this seemed simple enough.

Whenever I’d hide a row, and then make it visible again, the header row would get confused, and all of the unhidden rows’ columns would be squeezed under the first header column. Weird, since the DOM hadn’t changed, and they had equal numbers of columns, etc., as always. After a bunch of head scratching a searching, I finally found this short article which talks about exactly this issue, and apparently it’s specifically a Firefox oddity.

The net/net is that Firefox has another CSS ‘display’ value besides just hidden/inline/block… they have a very special one called “table-row” which makes this work properly. Whodathunkit. But, it works great now, using the try/catch strategy outlined in the link above.