Access Violation in Delphi Program can't find any clue

Sebastian

I have a Delphi application at some customers I get an access violation but I can't reproduce it here on several different systems. Also one customer got 2 identical computers, on one it happens on the other not.

The exception happens when a Form is opened with some 3rd party components (but I try to update them as well), the form is inherited from another one. With MadExcept I get this log, but it doesn't seem to help me either. Has someone any clue what can I try next?

exception class    : EAccessViolation
exception message  : Zugriffsverletzung bei Adresse 0064E033 in Modul 'MyProgram.exe'. Lesen von Adresse 5AC03580.

main thread ($42c):
0064e033 +003 MyProgram.exe Vcl.Controls                 TWinControl.HandleNeeded
0064e059 +005 MyProgram.exe Vcl.Controls                 TWinControl.GetHandle
00757f4d +16d MyProgram.exe Vcl.Forms                    TCustomForm.SetFocusedControl
0064ad51 +1cd MyProgram.exe Vcl.Controls                 TWinControl.WndProc
00f1f1ef +13b MyProgram.exe cxControls                   TcxControl.WndProc
0064a78c +02c MyProgram.exe Vcl.Controls                 TWinControl.MainWndProc
0054dd1c +014 MyProgram.exe System.Classes               StdWndProc
77c40594 +034 ntdll.dll                                    KiUserCallbackDispatcher
00755490 +1a0 MyProgram.exe Vcl.Forms                    TCustomForm.WndProc
00b54029 +03d MyProgram.exe Frm_MDIChildVorlage 1092 +15 TForm_MDIChildVorlage.WndProc
0064a78c +02c MyProgram.exe Vcl.Controls                 TWinControl.MainWndProc
0054dd1c +014 MyProgram.exe System.Classes               StdWndProc
77c40594 +034 ntdll.dll                                    KiUserCallbackDispatcher
777ad6c0 +090 USER32.dll                                   CallWindowProcW
0075596a +03a MyProgram.exe Vcl.Forms                    Default
00755b95 +1d9 MyProgram.exe Vcl.Forms                    TCustomForm.ClientWndProc
0054dd1c +014 MyProgram.exe System.Classes               StdWndProc
777ad6c0 +090 USER32.dll                                   CallWindowProcW
02302e82 +0ea MyProgram.exe Frm_MainVorlage     1251 +22 TForm_MainVorlage.ClientWndProc
0054dd1c +014 MyProgram.exe System.Classes               StdWndProc
777ad6c0 +090 USER32.dll                                   CallWindowProcW
0084819e +2d6 MyProgram.exe AdvMenus            2933 +63 MDIClientWndProc
77c40594 +034 ntdll.dll                                    KiUserCallbackDispatcher
777c8f63 +013 USER32.dll                                   DefMDIChildProcW
777ad6c0 +090 USER32.dll                                   CallWindowProcW
0064b27e +0e6 MyProgram.exe Vcl.Controls                 TWinControl.DefaultHandler
00757c46 +05a MyProgram.exe Vcl.Forms                    TCustomForm.DefaultHandler
0064662d +2bd MyProgram.exe Vcl.Controls                 TControl.WndProc
0064b16d +5e9 MyProgram.exe Vcl.Controls                 TWinControl.WndProc
0075591c +62c MyProgram.exe Vcl.Forms                    TCustomForm.WndProc
00b54029 +03d MyProgram.exe Frm_MDIChildVorlage 1092 +15 TForm_MDIChildVorlage.WndProc
0064a78c +02c MyProgram.exe Vcl.Controls                 TWinControl.MainWndProc
0054dd1c +014 MyProgram.exe System.Classes               StdWndProc
77c40594 +034 ntdll.dll                                    KiUserCallbackDispatcher
777ad6c0 +090 USER32.dll                                   CallWindowProcW
0075596a +03a MyProgram.exe Vcl.Forms                    Default
00755b95 +1d9 MyProgram.exe Vcl.Forms                    TCustomForm.ClientWndProc
0054dd1c +014 MyProgram.exe System.Classes               StdWndProc
777ad6c0 +090 USER32.dll                                   CallWindowProcW
02302e82 +0ea MyProgram.exe Frm_MainVorlage     1251 +22 TForm_MainVorlage.ClientWndProc
0054dd1c +014 MyProgram.exe System.Classes               StdWndProc
777ad6c0 +090 USER32.dll                                   CallWindowProcW
0084819e +2d6 MyProgram.exe AdvMenus            2933 +63 MDIClientWndProc
77c40594 +034 ntdll.dll                                    KiUserCallbackDispatcher
777b2b34 +134 USER32.dll                                   SendMessageW
00757bd2 +042 MyProgram.exe Vcl.Forms                    TCustomForm.DestroyWindowHandle
007544d7 +073 MyProgram.exe Vcl.Forms                    TCustomForm.Destroy
00409df0 +008 MyProgram.exe System               173  +0 TObject.Free
00759c74 +000 MyProgram.exe Vcl.Forms                    TCustomForm.CMRelease
0064662d +2bd MyProgram.exe Vcl.Controls                 TControl.WndProc
0064b16d +5e9 MyProgram.exe Vcl.Controls                 TWinControl.WndProc
0075591c +62c MyProgram.exe Vcl.Forms                    TCustomForm.WndProc
00b54029 +03d MyProgram.exe Frm_MDIChildVorlage 1092 +15 TForm_MDIChildVorlage.WndProc
0064a78c +02c MyProgram.exe Vcl.Controls                 TWinControl.MainWndProc
0054dd1c +014 MyProgram.exe System.Classes               StdWndProc
777aa67b +00b USER32.dll                                   DispatchMessageW
0075ef77 +0f3 MyProgram.exe Vcl.Forms                    TApplication.ProcessMessage
0075efba +00a MyProgram.exe Vcl.Forms                    TApplication.HandleMessage
0075f2ed +0c9 MyProgram.exe Vcl.Forms                    TApplication.Run
02371231 +241 MyProgram.exe REPDOC_Main         1003 +53 initialization
754e7c02 +022 KERNEL32.DLL                                 BaseThreadInitThunk

thread $89c:
754e7c02 +22 KERNEL32.DLL  BaseThreadInitThunk

thread $1fc:
754e7c02 +22 KERNEL32.DLL  BaseThreadInitThunk

thread $3dc:
75e02d54 +24 KERNELBASE.dll            GetQueuedCompletionStatus
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
623ac11a +00 libcef.dll

thread $1150:
754e7c02 +22 KERNEL32.DLL  BaseThreadInitThunk

thread $ca4:
75e02d54 +24 KERNELBASE.dll            GetQueuedCompletionStatus
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
6137fc3b +00 libcef.dll

thread $11cc:
754e7c02 +22 KERNEL32.DLL  BaseThreadInitThunk

thread $bd4:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
75dc2bfd +0d KERNELBASE.dll            WaitForSingleObject
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
6137fc3b +00 libcef.dll

thread $9b8:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
75dc2bfd +0d KERNELBASE.dll            WaitForSingleObject
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
6137fc3b +00 libcef.dll

thread $ef8:
75dd28bd +000 KERNELBASE.dll            WaitForMultipleObjectsEx
777adcbd +15d USER32.dll                MsgWaitForMultipleObjectsEx
004b42ad +00d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +032 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +022 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
6137fc3b +000 libcef.dll

thread $139c:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
75dc2bfd +0d KERNELBASE.dll            WaitForSingleObject
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
6137fc3b +00 libcef.dll

thread $1038:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
75dc2bfd +0d KERNELBASE.dll            WaitForSingleObject
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
6137fc3b +00 libcef.dll

thread $ac:
75e02d54 +24 KERNELBASE.dll            GetQueuedCompletionStatus
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
6137fc3b +00 libcef.dll

thread $1294:
75e02d54 +24 KERNELBASE.dll            GetQueuedCompletionStatus
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
6137fc3b +00 libcef.dll

thread $11fc:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
75dc2bfd +0d KERNELBASE.dll            WaitForSingleObject
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by thread $1294 at:
6137fc3b +00 libcef.dll

thread $1194:
77cbb56c +ac ntdll.dll                 RtlSleepConditionVariableCS
75e78d2a +1a KERNELBASE.dll            SleepConditionVariableCS
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
6137fc3b +00 libcef.dll

thread $d54:
75e02d54 +24 KERNELBASE.dll            GetQueuedCompletionStatus
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by thread $ef8 at:
6137fc3b +00 libcef.dll

thread $104c:
754e7c02 +22 KERNEL32.DLL  BaseThreadInitThunk

thread $bbc:
75dd28bd +00 KERNELBASE.dll            WaitForMultipleObjectsEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
758c9e7e +00 combase.dll

thread $ee4: <priority:2>
777bd577 +47 USER32.dll                GetMessageA
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
6ad45607 +00 WINMM.dll

thread $2f4:
75dd28bd +00 KERNELBASE.dll            WaitForMultipleObjectsEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
7388e7bc +00 clr.dll

thread $200: <priority:2>
75dd28bd +00 KERNELBASE.dll            WaitForMultipleObjectsEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
7390be93 +00 clr.dll

thread $ecc:
75dc2b7d +4d KERNELBASE.dll            SleepEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
738bc074 +00 clr.dll

thread $51c:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by thread $ecc at:
7390be93 +00 clr.dll

thread $180:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
75dc2bfd +0d KERNELBASE.dll            WaitForSingleObject
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by thread $ecc at:
738bc074 +00 clr.dll

thread $107c:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by thread $51c at:
7390be93 +00 clr.dll

thread $f68:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by thread $51c at:
7390be93 +00 clr.dll

thread $e9c:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by thread $107c at:
7390be93 +00 clr.dll

thread $99c:
75dd28bd +00 KERNELBASE.dll            WaitForMultipleObjectsEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
60ddcb57 +00 comsvcs.dll

thread $13fc:
754e7c02 +22 KERNEL32.DLL  BaseThreadInitThunk

thread $948:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
75dc2bfd +0d KERNELBASE.dll            WaitForSingleObject
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by thread $1294 at:
6137fc3b +00 libcef.dll

thread $20:
75e02d54 +24 KERNELBASE.dll            GetQueuedCompletionStatus
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
67b5280f +00 System.Data.dll

thread $1018:
75dc2cc1 +0b1 KERNELBASE.dll            WaitForSingleObjectEx
004b42ad +00d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +032 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +022 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
6b863451 +241 rasman.dll                RasAddNotification

thread $37c:
75dd28bd +00 KERNELBASE.dll            WaitForMultipleObjectsEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
7390be93 +00 clr.dll

thread $74c:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
75dc2bfd +0d KERNELBASE.dll            WaitForSingleObject
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
7562808b +6b msvcrt.dll                _beginthreadex

thread $129c:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
75dc2bfd +0d KERNELBASE.dll            WaitForSingleObject
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
7562808b +6b msvcrt.dll                _beginthreadex

thread $f80: <priority:-1>
75dd28bd +00 KERNELBASE.dll            WaitForMultipleObjectsEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
7562808b +6b msvcrt.dll                _beginthreadex

thread $1154:
75dd28bd +000 KERNELBASE.dll            WaitForMultipleObjectsEx
777adcbd +15d USER32.dll                MsgWaitForMultipleObjectsEx
004b42ad +00d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +032 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +022 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
5dc09787 +000 MSHTML.dll

thread $127c: <priority:-1>
75dd28bd +00 KERNELBASE.dll            WaitForMultipleObjectsEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
7562808b +6b msvcrt.dll                _beginthreadex

thread $1298:
75dd28bd +000 KERNELBASE.dll            WaitForMultipleObjectsEx
777adcbd +15d USER32.dll                MsgWaitForMultipleObjectsEx
004b42ad +00d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +032 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +022 KERNEL32.DLL              BaseThreadInitThunk
>> created by thread $1154 at:
5dc09787 +000 MSHTML.dll

thread $1010:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
75dc2bfd +0d KERNELBASE.dll            WaitForSingleObject
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
7562808b +6b msvcrt.dll                _beginthreadex

thread $131c:
75dd28bd +000 KERNELBASE.dll            WaitForMultipleObjectsEx
777adcbd +15d USER32.dll                MsgWaitForMultipleObjectsEx
004b42ad +00d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +032 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +022 KERNEL32.DLL              BaseThreadInitThunk
>> created by thread $1154 at:
5dc09787 +000 MSHTML.dll

thread $121c:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
75dc2bfd +0d KERNELBASE.dll            WaitForSingleObject
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
5dc09787 +00 MSHTML.dll

thread $ad4: <priority:15>
75dd28bd +00 KERNELBASE.dll            WaitForMultipleObjectsEx
754e7b83 +13 KERNEL32.DLL              WaitForMultipleObjects
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by main thread ($42c) at:
5dc06f90 +00 MSHTML.dll

thread $1234:
754e7c02 +22 KERNEL32.DLL  BaseThreadInitThunk

thread $1310:
75dc2cc1 +b1 KERNELBASE.dll            WaitForSingleObjectEx
004b42ad +0d MyProgram.exe madExcept CallThreadProcSafe
004b4312 +32 MyProgram.exe madExcept ThreadExceptFrame
754e7c02 +22 KERNEL32.DLL              BaseThreadInitThunk
>> created by thread $e9c at:
7390be93 +00 clr.dll

cpu registers:
eax = 5ac03308
ebx = 5ac03308
ecx = 2a59eaa5
edx = 00000000
esi = 5ac03308
edi = 119810fc
eip = 0064e033
esp = 0018e3e4
ebp = 0018e414

stack dump:
0018e3e4  08 33 c0 5a 5e e0 64 00 - 44 06 13 00 52 7f 75 00  .3.Z^.d.D...R.u.
0018e3f4  68 e4 18 00 04 b2 40 00 - 14 e4 18 00 da 00 b7 0f  h.....@.........
0018e404  07 00 00 00 fc 10 98 11 - 07 00 00 00 c8 6f 9c 11  .............o..
0018e414  60 e4 18 00 57 ad 64 00 - 07 00 00 00 07 00 00 00  `...W.d.........
0018e424  cc a4 40 00 4c e4 18 00 - db a4 40 00 44 e4 18 00  [email protected][email protected]...
0018e434  c8 6f 9c 11 1c ef c9 04 - c8 6f 9c 11 68 bf a9 16  .o.......o..h...
0018e444  98 e4 18 00 cd 9d 40 00 - a0 e4 18 00 c8 6f 9c 11  [email protected]..
0018e454  1c ef c9 04 d0 e4 18 00 - c8 6f 9c 11 98 e4 18 00  .........o......
0018e464  f4 f1 f1 00 a0 e4 18 00 - 04 b2 40 00 98 e4 18 00  ..........@.....
0018e474  07 00 00 00 c8 6f 9c 11 - 8b 96 7a 77 00 00 00 00  .....o....zw....
0018e484  00 00 00 00 29 0e 41 2a - 68 bf a9 16 d0 e4 18 00  ....).A*h.......
0018e494  c8 6f 9c 11 c8 e4 18 00 - 8f a7 64 00 ac e4 18 00  .o........d.....
0018e4a4  04 b2 40 00 c8 e4 18 00 - 90 e5 18 00 d4 af 40 00  ..@...........@.
0018e4b4  c8 e4 18 00 da 00 b7 0f - 07 00 00 00 00 00 00 00  ................
0018e4c4  c8 6f 9c 11 e0 e4 18 00 - 1e dd 54 00 07 00 00 00  .o........T.....
0018e4d4  ae 02 0a 00 00 00 00 00 - 00 00 00 00 0c e5 18 00  ................
0018e4e4  71 8e 7a 77 02 06 02 00 - 07 00 00 00 ae 02 0a 00  q.zw............
0018e4f4  00 00 00 00 07 00 00 00 - cd ab ba dc 00 00 00 00  ................
0018e504  da 00 b7 0f 07 00 00 00 - a0 e5 18 00 d1 90 7a 77  ..............zw
0018e514  da 00 b7 0f 02 06 02 00 - 07 00 00 00 ae 02 0a 00  ................

disassembling:
[...]
00b5401a        call    -$505fcb ($64e054)     ; Vcl.Controls.TWinControl.GetHandle
00b5401f        push    eax
00b54020        call    -$738f2d ($41b0f8)     ; Winapi.Windows.PostMessage
00b54025 1092   mov     edx, esi
00b54027        mov     eax, ebx
00b54029      > call    -$3fed3e ($7552f0)     ; Vcl.Forms.TCustomForm.WndProc
00b5402e 1093   pop     esi
00b5402f        pop     ebx
00b54030        ret
David Heffernan

Top of the stack trace from madExcept is:

0064e033 +003 MyProgram.exe Vcl.Controls TWinControl.HandleNeeded

You really should be building your program with enough information to get line number information, but +003 is enough as it happens. Disassemble TWinControl.HandleNeeded and it looks like this:

Vcl.Controls.pas.12079: begin
005659FC 56               push esi
005659FD 8BF0             mov esi,eax
Vcl.Controls.pas.12080: if WindowHandle = 0 then
005659FF 83BE7802000000   cmp dword ptr [esi+$00000278],$00
00565A06 7516             jnz $00565a1e

The addresses will differ in your program, but the point is that 005659FF - 005659FC is the offset +003. So the exception is in the first line of the function:

if WindowHandle = 0 then

The only memory access there is the attempt to read the instance field WindowHandle.

And when a read of an instance field fails that usually means that the instance pointer is either nil, or refers to an instance that has already been destroyed. And since the exception text states:

Lesen von Adresse 5AC03580

you know that the program was attempting to read the address 5AC03580. Since that is a long way from zero you know that the instance pointer is not nil. So, all signs point to an instance that has already been destroyed.

There's no way for us to tell you why you have an instance that has been destroyed. Now it's your job to debug that. And please don't be like so many askers here and expect us to say more than is humanly possible. Sometimes the answer to a question is simply to tell you what to do next.

Debugging double free scenarios can be a little tricky since they tend to be slippery. You won't always encounter a runtime exception. Try using a tool like FastMM with full debug options enabled which includes tools to attempt to detect double free errors.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related