§ ¶I hate reading Raymond Chen's blog
Raymond Chen is a long-time Microsoft employee who was on the Windows 95 team and now has a blog called The Old New Thing. It's a rather fascinating blog, one filled with lots of good programming tips and Windows history. Some of the anecdotes about Windows 95's development are quite funny.
However, it's a very depressing blog to read sometimes.
You see, the problem is that occasionally he'll post an entry about some aspect of the Win32 API and explain its common pitfalls and how it is supposed to be used. So it was with some dread today that I read his article about DeferWindowPos() and its funny behavior with regard to the HDWP handle it accepts and the new HDWP handle it returns. Sure enough, a Find-in-Files search of the VirtualDub 1.6.8 codebase revealed three places where I was calling DeferWindowPos() incorrectly. Sigh.
I love reading his blog because it's full of great information, but I hate reading it because every time I do I have to fix more bugs.
Put this to good use myself :)
Blight (link) - 08 07 05 - 06:07
A bug is sometimes just a question of point of view:
As long as nobody notices, it can't be wrong.
It's the same with falling trees: as long as nobody asks, they have no color, height or anything - they are just falling trees...
Confuzzy - 08 07 05 - 12:39
You're somewhat correct in that there aren't any obvious consequences of the bug right now, and making the change risks introducing a new bug (regression). I also might not be hitting the bug because I always call BeginDeferWindowPos() with the right count, and DeferWindowPos() might only return a new handle on a reallocation. That having been said, I try to fix handle misuse bugs because my experience has been that using freed handles can destabilize Windows 95/98/ME in ways that are very difficult to trace to the cause.
I want to run VirtualDub under the checked build of Windows some day to catch some of these issues, but that's only available to MSDN subscribers, and I haven't been able to justify a subscription yet. Maybe when VS2005 ships I'll get the Professional+MSDN bundle.
Phaeron - 08 07 05 - 23:48
dude, awesome job on the program, it really helped me out editing a rotated video of my 5-year old son I made with my digital camera.
Don't let the Micro$haft hegemony get you down; you took the pill, along with the rest of us. Congrats on making it thru the muck as far as you have to create this most excellent tool.
anderos (link) - 11 07 05 - 14:26
If you're looking for something slightly depressing, do NOT, I repeat, do NOT NOT NOT NOT read MY blog. It's not for you. Really, it really isn't. What? Where is it? http://voldemortician.blogspot.ca/
but you really SHOULDN'T go! I warned you. NO REBELS ALLOWED.
Voldemortician - 28 03 12 - 17:09
Please keep comments on-topic for this entry.
If you have unrelated comments about VirtualDub, the forum is a better place to post them.