View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005225||JEDI VCL||00 JVCL Components||public||2010-04-21 11:08||2011-06-10 16:10|
|Product Version||Daily / GIT|
|Target Version||Fixed in Version||3.40|
|Summary||0005225: runtime designer surface - Issue with WM_WINDOWPOSCHANGED handling|
|Description||I have next mysterious issue with runtime designer surface. Sometimes my application crashed when user working with runtime designer. Crashes are mysterious like in ticket 0004912 and have same symptoms.|
So, I try to see code around WM_WINDOWPOSCHANGED handling again. All seems to be fine when I remove UpdateDesigner call. IMHO it causing never-ending message loop in some cases and application crash.
Is this call of UpdateDesigner really needed? I not see any designer problems when I remove this line.
I am using Delphi 7. I not know if I am able to reproduce error as some public code. If I can, then I attach it later.
|Tags||No tags attached.|
After some time I got exactly same error on my modified code too. Problem seems to be much deeper inside.
I try to debug code much better now. Interesting is - latest problem does not occur on W7. It crashing only on WinXP!
Crash is caused by neverending recursiva call of WM_WINDOWPOSCHANGED while user click on the control at designer surface. But on some specific content on the surface only, usually after load surface from the file.
But why? Current code for handling WM_WINDOWPOSCHANGED message do enumerate all controls on the surface and trying to find right one by comparing handles. Here is the problem hidden! Problem is caused by reading Control.Handle.
While Control does not have allocated handle yet, then TControl touch parent and try to allocate new handle. And somewhere here inside it generate next WM_WINDOWPOSCHANGED message. Maybe on some control only and in some specific situations only.
So, my final fix is easy - check 'HandleAllocated' first. Then I can return UpdateDesigner call removed in my first post and all still working fine.
My current code looks like:
Control := TAccessWinControl(Container.Components[I]);
if Control.HandleAllocated then //Added by me!
if PosChangedHandle = Control.Handle then
if not (csDestroyingHandle in Control.ControlState) then
Thank you for updating your sources.
||Thanks, this is now in SVN|
|2010-04-21 11:08||geby||New Issue|
|2010-05-14 12:54||geby||Note Added: 0017386|
|2010-06-07 10:34||obones||Note Added: 0017436|
|2010-06-07 10:34||obones||Status||new => resolved|
|2010-06-07 10:34||obones||Fixed in Version||=> Daily / SVN|
|2010-06-07 10:34||obones||Resolution||open => fixed|
|2010-06-07 10:34||obones||Assigned To||=> obones|
|2011-06-10 16:10||obones||Fixed in Version||Daily / SVN => 3.40|