Bugsie - Part 2

In my previous post, I mentioned a minor layout bug that I watched during the CodeRage Encore presentations. I can now consistently replicate it but other people have mixed success depending on what system they use. Here are the necessary steps to reproduce that show that it is in fact a question of the IDE not redrawing the gray/black corner handles.

  1. File -> New Form
  2. Add 2 buttons to the form such that they're not aligned
  3. Drag a selection rectangle and note which button has darker corner handles
  4. Right-Click the other button, that is, the one with the lighter corners
  5. Select Position -> Align -> Cancel
  6. At this point, if the bug happens on your system, the corner grabbing rectangles should not have changed colors, i.e., the button with the darker corners is still the same
  7. If step 6 happens on your system, then click the Align Tops on the Align toolbar and see that the anchor button was the wrong button!

Now, I said that you could see that it was a display issue. Here's how to do that:

  1. Repeat steps 1-5 on the above list
  2. If, after step 5, you can confirm that the button corner handles haven't changed color, i.e., bug is happening, then simply open up something that will cover the form so as to force Delphi to later redraw it (Internet Explorer, FireFox, Explorer, Outlook, etc)
  3. When you move that window away (or switch back to Delphi), you will see that the darker corners are now properly displayed.

Here's the QC report created on this one:

Report No: 48631          Status: Reported
Form designer may fail to correctly update changed anchors

BTW, if you need more information on the black/gray corner handles, check this post from Steve Trefethen...


Anonymous said...

I think the big deal you making about this bug, and its obscurity is a testament to how stable the latest releases of Delphi are.

Fernando Madruga said...

Alister: I'm not making a big deal out of this bug! It's just that it's one that I found that was a bit weird to replicate at first!

If you search QC, you'll see that I placed quite a few entries there for Delphi 2007 alone (I'm too lazy to check now, but if memory serves me, over 40).

I stopped adding more when after a few months some of my reports had not even been looked at, that is, even with all the effort on my side adding screenshots, replicating the bugs on a clean VM with nothing but a clean Delphi install, and trying to add as problem descriptions and steps as clear as possible, even with all that effort on my side, noone bothered to see if they could replicate the reports...

Yes, I know that many others were looked upon, but still, it feels a bit of a waste of time to spend several hours replicating a bug and trying to create a minimal example of the bug happening only to see that effort wasted...

Heck, when I started helping out on QC, I found some reports that were clearly described and about bugs in Delphi 7, reported 5 years ago that were still present in Delphi 2007!!

So, all this post and the previous one were about were to try and determine the exact conditions of that bug that initially was hard to replicate consistently! In fact, it's only because I had found the bug quite some time ago that it was still on my "report it" list. Otherwise, I'd simply let it go and have someone else bother with reporting!

(Phew! When one is waiting for a lengthy download to finish before going to bed, one tends to be more verbose! :))