Monday, June 13, 2011

Not calling your base class in your override ought to be a warning.

I just spent twenty minutes chasing a weird behavior in a RadRibbonForm that turned out to be caused by the fact that my form's Shown event was never called.  It took a while to figure out that I had commented out a large section of my OnLoad override - too large, in fact.  In disabling some code I accidentally also commented out the first line:
base.OnLoad(e)

There are really very few times when you don't want to call the base class implementation, particularly of more complex classes.  Those times when you truly don't, the member is usually pure virtual anyway.  For those times that you really don't want to call the base class, just like those times when you really DO want to fall through a case statement, there ought to be some indication from the programmer that "Yes, I really do know what I'm doing, and this wasn't a mistake".

It would have saved me 20 minutes, anyway.

Tuesday, May 24, 2011

Gurgling sound from Z06 Corvette

I recently was confronted with a noticeable "gurgle" sound from behind the dash area of my 2007 Z06 Corvette.  It was audible at idle and continued for a second or so after turning the car off.

After a bit of research on the forums, it seemed like the most likely explanation was that the dry sump oiling system was overfilled; upon checking it, it was indeed at least a quart high.  Apparently the manual's admonition to ensure that the oil is WARM when reading the dipstick was correct.

Not wanting to drain it and start over, I tried a hand pump (no luck) and eventually resorted to a 3/8" clear plastic tube stuffed down into the dry sump tank which I used to siphon the extra oil out.  Used oil is carcinogenic so clearly you need a safe way to initiate the siphon.  Even with the oil warm it took about 20 minutes for the extra quart to dribble out, but once I was done, problem solved.  No more gurgling noises.