|Anonymous | Login | Signup for a new account||2019-04-20 11:29 CEST|
|Main | My View | View Issues | Change Log | Roadmap | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0004020||[JEDI VCL] 00 JVCL Components||crash||always||2006-12-13 19:40||2007-03-20 14:37|
|Status||resolved||Product Version||Daily / GIT|
|Summary||0004020: JvDocking error when reading layout|
a) In one of the Dock Forms add an OnFormActivate event with the following code:
b) Save a layout with that form visible but not docked
c) Load the saved layout -> List index out of bounds error
The LoadDockTreeFrom* methods create a fantom form the purpose of which escapes me. At the end of these methods you have the following code:
Here is ReshowAllVisibleWindow:
1652 procedure ReshowAllVisibleWindow;
1654 I: Integer;
1656 if IsWinXP then
1657 for I := 0 to Screen.FormCount - 1 do
1658 if Screen.Forms[I].Visible then
1659 Windows.ShowWindow(Screen.Forms[I].Handle, SW_SHOW)
1661 Windows.ShowWindow(Screen.Forms[I].Handle, SW_HIDE);
This methods iterates through all forms from the Screen.Form list and shows/hides them. In doing so it modifies the Z-order of the forms and is not actully recommended to do that but this actually works and is not the problem. The problem lies in that we have called Form.Release on the fantom form, so it has not been freed yet and is included in Screen.Forms. While in the loop, if the OnFormActivate event handler of one of the forms calls Application.ProcessMessages that form gets destroyed halfway through the loop causing a List index error on the last iteration.
In the three LoadDockTreeFrom* methods replace
This should not have any side effects since the fantom form does not have any pending events. In fact you may want to consider removing all the code related to the fantom form. Doing so does not affect my application in any way and as I said I cannot the purpose of this code.
|Tags||No tags attached.|
edited on: 2007-03-08 17:25
The original code has a Chinese comment that translates to something like:
Create a form with window size of 0, the effect was to prevent the Windows Screen Flicker.
|I cannot see how this affects flicker, but to be in the safe side you may keep that code in and just change Release to Free in all three methods. This should have no side effects.|
I've removed the code that creates a temporary window.
But when I create a temporary window in the TMainForm.LoadFromAppStorage procedure of the AdvanceDemo - before the LoadFormsFromAppStorage call - I actually see some visual difference, ie less flicker. This is on a slow computer.
I still removed the code because IMO it is up to the component user to use such tricks.
This is in Rev 11224.
|2006-12-13 19:40||Kiriakos||New Issue|
|2007-03-08 17:24||remkobonte||Note Added: 0011300|
|2007-03-08 17:25||remkobonte||Note Edited: 0011300|
|2007-03-10 15:40||Kiriakos||Note Added: 0011302|
|2007-03-20 14:37||remkobonte||Status||new => resolved|
|2007-03-20 14:37||remkobonte||Fixed in Version||=> Daily / SVN|
|2007-03-20 14:37||remkobonte||Resolution||open => fixed|
|2007-03-20 14:37||remkobonte||Assigned To||=> remkobonte|
|2007-03-20 14:37||remkobonte||Note Added: 0011523|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|