Notes (weeks 11-12) – Hunt for bug

No snapshot this week unfortunately. I started last week by transferring the QuickView prototype code into CE. Once everything was up and running I noticed severe painting issues on resize. It was something I hadn’t seen before and it made very little sense. So I spent many days in trying to figure out what the problem was. Eventually I realized that the problem appeared when using too many nested windows. In the prototype everything worked fine because I was using only few nested windows but since CE has more complex layout, the limit was reached.

resize_bug

It turned out to be a limit in Windows Kernel that caused those painting issues. Here’s a good description about the issue by Jordan Russell: http://news.jrsoftware.org/news/toolbar2000/msg07779.html. Thankfully there was already a fix available so I didn’t have to do any major changes.

For those interested, here’s the fix (credits goes to Andreas Hausladen)

ControlResizeBugFix.pas (not needed for Delphi 2009 and up)
http://cubicexplorer.googlecode.com/svn/trunk/Source/ControlResizeBugFix.pas

1 Comment
1.
Stefan_E

Amazing.. I mean, if Redmond bothered you with that at a recursion depth of 2000 … Ok.; but at double-digit nmbers???

Amazed… Stefan

Leave a reply

Or login with your forum information

:| :x :twisted: :) 8O :( :roll: :P :oops: :o :mrgreen: :lol: :idea: :D :evil: :cry: 8) :arrow: :? :?: :!:

Please use the forum to report bugs or feature requests