- This topic has 11 replies, 3 voices, and was last updated 7 years, 6 months ago by HeDiBo.
-
AuthorPosts
-
May 5, 2017 at 1:36 pm #37452HeDiBoParticipant
In my project, which uses a mixture of PageControls with Tabsheets carrying frames, I have a consistent Exception if I close the application. The exception occurs if I have used the drop down form for the TsSkinSelector. This control is on a tab sheet on a page of a page controller, which is in a frame, which is placed on a tab sheet of another page controller. But even trying to mimic this construct in a demo project I could not reproduce the bug.
The exception, therefore, is timing dependent. Some of my form destroyers take some time to finish.
The problem is in this piece of code in acPopupController.pas:
Code:procedure TacFormHandler.DoWndProc(var Message: TMessage);
begin
.
.
.
else
if Assigned(FormWndProc) then <<-- FormWndProc is assigned but invalid (hex 80808080).
FormWndProc(Message);
end;
end;In other words, in certain situations FormWndProc is destroyed but not set to nil.
If I set the conditional AC_NOHANDLEFORM obviously the problem does not occur.
PS: what is this AC_NOHANDLEFORM used for?
May 10, 2017 at 7:08 am #56567SupportKeymasterHello
AC_NOHANDLEFORM was used for debug. If this key is enabled then Window proc of the popup form is not changed. But some features are not available in this case, such as autohidding for example).
I will try research this component more and find a cause of the exception.
May 16, 2017 at 10:50 am #56636HeDiBoParticipant'Support' wrote:Hello
AC_NOHANDLEFORM was used for debug. If this key is enabled then Window proc of the popup form is not changed. But some features are not available in this case, such as autohidding for example).
I will try research this component more and find a cause of the exception.
Not solved in 12.07, but maybe that's too soon .
May 17, 2017 at 8:48 am #56637StertorParticipantЭта ошибка ещё с 2016-версии тянется, и сабклассинг тут ни при чём.
May 17, 2017 at 2:29 pm #56639HeDiBoParticipant'Stertor' wrote:Эта ошибка ещё с 2016-версии тянется, и сабклассинг тут ни при чём.
I think this says:
This error still runs from the 2016 version, and subclassing has nothing to do with it.
but even in English I do not know what you mean.
May 18, 2017 at 4:46 pm #56642SupportKeymasterDick, this error is new or you had it earlier?
Please, try the v12.08, I have added some changes in destroying of controls there.
I hope, this changes works because I can't repeat and debug this issue, unfortunately.
Stertor, can you repeat the error in the test-app?
May 20, 2017 at 10:45 am #56662HeDiBoParticipant'Support' wrote:Dick, this error is new or you had it earlier?
Please, try the v12.08, I have added some changes in destroying of controls there.
I hope, this changes works because I can't repeat and debug this issue, unfortunately.
I'm not sure if it was in 12.06 already. I will try to find out more about this bug.
To start with, this is the stack trace at the moment of the exception:
Code::000e0008
acPopupController.TacShadowForm.NewWndProc((794, 4294967295, -2147483647, 0, 65535, 65535, (), 1, 32768, (), 0, 0, ()))
Vcl.Controls.TWinControl.MainWndProc(???)
System.Classes.StdWndProc(68476,794,4294967295,2147483649)
:76272b5b ; C:WINDOWSSysWOW64user32.dll
:762650f3 ; C:WINDOWSSysWOW64user32.dll
:76264d4a ; C:WINDOWSSysWOW64user32.dll
:7626ec69 ; C:WINDOWSSysWOW64user32.dll
:77c1416d ntdll.KiUserCallbackDispatcher + 0x4d
:7625090f ; C:WINDOWSSysWOW64user32.dll
:757842f3 uxtheme.SetWindowTheme + 0x53
acSBUtils.TacMainWnd.Destroy
acSBUtils.TacScrollWnd.Destroy
System.TObject.Free
sSkinProvider.TsSkinProvider.AC_SMAlphaCmd_Common((41216, 131072, 102432912, 0, 0, 2, (), 144, 1563, (), 0, 0, ()))
sSkinProvider.TsSkinProvider.NewWndProc((41216, 131072, 102432912, 0, 0, 2, (), 144, 1563, (), 0, 0, ()))
Vcl.Controls.TWinControl.MainWndProc(???)
System.Classes.StdWndProc(68476,41216,131072,102432912)
:76272b5b ; C:WINDOWSSysWOW64user32.dll
:762650f3 ; C:WINDOWSSysWOW64user32.dll
:76264d4a ; C:WINDOWSSysWOW64user32.dll
:7626ec69 ; C:WINDOWSSysWOW64user32.dll
:77c1416d ntdll.KiUserCallbackDispatcher + 0x4d
:7625090f ; C:WINDOWSSysWOW64user32.dll
sStyleSimply.SendToHooked((no value))
sStyleSimply.AppBroadCastS((no value))
sSkinManager.TsSkinManager.SendRemoveSkin
sSkinManager.TsSkinManager.SetActive(False)
WipDM.TdmWIP4.FreeResources
WIP4Main.TWIP4MainForm.FormClose($5020310,caHide)
Vcl.Forms.TCustomForm.DoClose(???)
Vcl.Forms.TCustomForm.Close
Vcl.Forms.TCustomForm.WMClose(???)
Vcl.Controls.TControl.WndProc((16, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
Vcl.Controls.TWinControl.WndProc((16, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
Vcl.Forms.TCustomForm.WndProc((16, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
sSkinProvider.TsSkinProvider.AC_WMClose((16, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
sSkinProvider.TsSkinProvider.NewWndProc((16, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
acSBUtils.TacMainWnd.CallPrevWndProc(1116912,16,0,0)
acSBUtils.TacScrollWnd.acWndProc((16, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
Vcl.Controls.TWinControl.MainWndProc(???)
System.Classes.StdWndProc(1116912,16,0,0)
:76272b5b ; C:WINDOWSSysWOW64user32.dll
:762650f3 ; C:WINDOWSSysWOW64user32.dll
:76264d4a ; C:WINDOWSSysWOW64user32.dll
:7626ec69 ; C:WINDOWSSysWOW64user32.dll
:77c1416d ntdll.KiUserCallbackDispatcher + 0x4d
:76265a7b ; C:WINDOWSSysWOW64user32.dll
:75797094 ; C:WINDOWSSysWOW64uxtheme.dll
:75795ed8 ; C:WINDOWSSysWOW64uxtheme.dll
:76265e4b ; C:WINDOWSSysWOW64user32.dll
:76272b5b ; C:WINDOWSSysWOW64user32.dll
:762650f3 ; C:WINDOWSSysWOW64user32.dll
:7625aeb7 user32.CallWindowProcW + 0x97
Vcl.Controls.TWinControl.DefaultHandler(???)
:0055622b TWinControl.DefaultHandler + $EB
:0063e32a TCustomForm.WMSysCommand + $5A
:0055611a TWinControl.WndProc + $5CA
:0063aef2 TCustomForm.WndProc + $612
:008c56f0 TsSkinProvider.AC_WMSysCommand + $B50
:008b35b1 TsSkinProvider.NewWndProc + $8F9
:007e97c5 TacMainWnd.CallPrevWndProc + $41
:007dc88a TacScrollWnd.acWndProc + $B86
:0082c323 TrySendMessage + $4B
:008c09d7 TsSkinProvider.AC_WMLButtonUp + $F3
:008b3651 TsSkinProvider.NewWndProc + $999
:007e97c5 TacMainWnd.CallPrevWndProc + $41
:007dc88a TacScrollWnd.acWndProc + $B86
:0055575b TWinControl.MainWndProc + $2F
:004d4542 StdWndProc + $16
:76272b5b ; C:WINDOWSSysWOW64user32.dll
:762650f3 ; C:WINDOWSSysWOW64user32.dll
:76264a82 ; C:WINDOWSSysWOW64user32.dll
:76264850 user32.DispatchMessageW + 0x10I hope you can make some sense about it.
It may lead to points that you would like to get tested. Don't hesitate to ask.
May 20, 2017 at 11:19 am #56663HeDiBoParticipantA further analysis showed that it is caused by a sSkinManager.Active := False statement in the DataModule.
That's part of a procedure called when the FormClose event in the Main Form is handled.
If I remove the explicit resetting of the Active property, the exception does not occur. In stead of that I get a multitude of memory leaks.
The memory leak info is included:
[attachment=8304:WIP4_MemoryManager_EventLog.txt]
May 20, 2017 at 3:01 pm #56665HeDiBoParticipantI found a simple test application that shows the bug:
[attachment=8305:acSkineSelectBug.zip]
Click the skin selector and then close the application: BOOOOIIIIINNGG
May 20, 2017 at 3:25 pm #56666HeDiBoParticipantThe problem seems to be, that AC keeps handling messages after the application has closed.
If you look at the stack trace at the moment of the error, you will find at the bottom System._Halt0
You would not expect to much message handling going on after this, but it goes on and on.
May 21, 2017 at 2:36 pm #56670SupportKeymasterWow, thank you for the demo, I will research it.
May 27, 2017 at 2:51 pm #56734HeDiBoParticipant'Support' wrote:Wow, thank you for the demo, I will research it.
Somewhere, sometime, the bug is solved (AC 12.10)
-
AuthorPosts
- You must be logged in to reply to this topic.