Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
214 Beiträge
 
#8

AW: Exception in IsFormSizeStored

  Alt 27. Feb 2024, 10:32
Hi

Zitat:
was ist das und wo kommt das her?
Its usage in in the name, callback from the kernel, essential and everywhere, in essence it is you main thread loop origin.

Zitat:
And above all: how can you prevent this?
If you are talking about KiUserCallbackDispatcher, then the answer is no you can't prevent passing or remove it from your application logic using GUI.

Now to the discuss the call stack you provided:

I can see the problem pinpoint it
Zitat:
006cc0ef +00f My_Prog.exe Vcl .Forms TCustomForm.IsFormSizeStored
006cc0d5 +005 My_Prog.exe Vcl .Forms TCustomForm.IsClientSizeStored
006ce988 +5a4 My_Prog.exe Vcl .Forms TCustomForm.CreateParams
005c755 0 +034 My_Prog.exe Vcl .Controls TWinControl.CreateWnd
006ca421 +005 My_Prog.exe Vcl .Forms TScrollingWinControl.CreateWnd
006cea02 +00a My_Prog.exe Vcl .Forms TCustomForm.CreateWnd
005c7b62 +016 My_Prog.exe Vcl .Controls TWinControl.CreateHandle // Creating Handle for most likely already freed parent or owner
005cbbe0 +01c My_ Prog.exe Vcl .Controls TWinControl.HandleNeeded
005cbbed + 005 My_Prog.exe Vcl .Controls TWinControl.GetHandle // GetHandle
006cf205 +0f1 My_Prog.exe Vcl .Forms TCustomForm.SetFocusedControl // <----- Oops !! the code is trying to set focus to another form or a component !!
005c872f +21f My_Prog.exe Vcl .Controls TWinControl.WndProc
006ccc61 +64d My_Prog.exe Vcl .Forms TC ustomForm.WndProc
00bae796 +05e My_Prog .exe Main 945 +14 TWomiTota.WndProc
005c8118 +02c My_Prog.exe Vcl .Controls TWinControl.MainWndProc
00543edc +014 My_Prog.exe System.Classes StdWndProc
0040f6b0 +20c My_Prog.exe System 168 +0 DynArraySetLength
7751507b +04b ntdll.dll KiUserCallbackDispatcher
005c3f66 +2be My_Prog.exe Vcl.Controls TControl.WndProc
005c8b4b +63b My_Prog.exe Vcl.Controls TWinControl.WndProc
006ccc61 +64d My_Prog.exe Vcl.Forms TCustomForm.WndProc
00bae796 +05e My_Prog.exe Main 945 +14 TWomiTota.WndProc
005c8118 +02c My_Prog.exe Vcl.Controls TWinControl.MainWndProc
00543edc +014 My_Prog.exe System.Classes StdWndProc // <------- more messages after the destruction
7751507b +04b ntdll.dll KiUserCallbackDispatcher
0040a8c4 +008 My_Prog.exe System 168 +0 TObject.Free // <------- last free before end the destruction
00460ee0 +008 My_Prog.exe System.SysUtils FreeAndNil
00820ea3 +01b My_Prog.exe ElSBCtrl 3377 +2 TElSBHandlerCustom.DestroyScrollTimer
00820e63 +07f My_Prog.exe ElSBCtrl 3370 +9 TElSBHandlerCustom.Destroy
0040a8c4 +008 My_Prog.exe System 168 +0 TObject.Free
00460ee0 +008 My_Prog.exe System.SysUtils FreeAndNil
0082249b +017 My_Prog.exe ElSBCtrl 4165 +1 TElSBController.Destroy
0040a8c4 +008 My_Prog.exe System 168 +0 TObject.Free
00541bec +074 My_Prog.exe System.Classes TComponent.DestroyComponents
0054168b +01b My_Prog.exe System.Classes TComponent.Destroy
005c12d9 +121 My_Prog.exe Vcl.Controls TControl.Destroy
005c5dbf +16b My_Prog.exe Vcl.Controls TWinControl.Destroy
005cee90 +01c My_Prog.exe Vcl.Controls TCustomControl.Destroy
007d3544 +034 My_Prog.exe ElXPThemedControl 439 +3 TElXPThemedControl.Destroy
00842a1f +037 My_Prog.exe ElListBox 789 +4 TCustomElListBox.Destroy
0040a8c4 +008 My_Prog.exe System 168 +0 TObject.Free
00857ede +01a My_Prog.exe ElCombos 1626 +1 TCustomElComboBox.Destroy
00b3c80a +06a My_Prog.exe eboxen 2488 +10 TMyComboBox.Destroy
I may be wrong but from what i see it is a SetFocus called without checking for free/exiting...
If you had a decent logging you could have found it earlier, when forms/frames/modules report creation and destruction.

Hope that helps.
  Mit Zitat antworten Zitat