Moved is called for already destroyed form an produces AV
Original Reporter info from Mantis: PascalR @PascalRiekenberg
-
Reporter name: Pascal Riekenberg
Original Reporter info from Mantis: PascalR @PascalRiekenberg
- Reporter name: Pascal Riekenberg
Description:
With enabled Anchordocking sometimes an AV happens:
#0 MOVED(0xd828600, 0) at ..\..\laz\lcl\include\customform.inc:733
#1 PROCESSASYNCCALLQUEUE(0x11d750) at ..\..\laz\lcl\include\application.inc:1080
#2 DESTROY(0x11d750, 0x1) at ..\..\laz\lcl\include\application.inc:145
#3 SYSTEM$_$TOBJECT_$__$$_FREE at :0
#4 FREEWIDGETSET at ..\..\laz\lcl\forms.pp:2124
#5 INTERFACES_$$_finalize at :0
#6 SYSTEM_$$_FINALIZEUNITS at :0
#7 SYSTEM_$$_INTERNALEXIT at :0
#8 $WIN32INT$_Ld13 at :0
#9 ?? at :0
#10 SYSTEM_$$_EXE_ENTRY$TENTRYINFORMATION at :0
This is because an async Move is prepared and in Application.Destroy the asyncqueue is handled for the already destroyed form.
To fix this:
TApplication.ControlDestroyed should remove asynccalls for the destroyed object with RemoveAsyncCalls(AControl).
See attached patch.
Mantis conversion info:
- Mantis ID: 30281
- OS: Windows
- OS Build: 7 + 8.1
- Platform: i386
- Version: 1.7 (SVN)
- Target version: 1.6.2