EDbkError: Unable to access debug process memory: Only part of a ReadProcessMemory or WriteProcessMemory request was completed

EDbkError: Unable to access debug process memory: Only part of a ReadProcessMemory or WriteProcessMemory request was completed

我开始收到与调试器相关的消息(Delphi 悉尼)。知道这是什么意思吗? 该错误似乎很神秘。 MS网站上没有关于它的官方文档。

更新:

我可以按需复制: 启动一个新项目,声明一个对象,将其设置为 nil,访问其属性。 我没有显示可以调试的“标准”AV,而是看到这个“无法访问调试进程内存”错误。此时无法再调试任何内容。

DelphiRio 一切顺利。 这似乎是 Windows 错误或 Delphi 悉尼错误! 全新安装仅 2 周后出现问题。

date/time          : 2020-10-29, 20:35:12, 331ms
operating system   : Windows 7 x64 Service Pack 1 build 7601
system language    : English
system up time     : 19 minutes 17 seconds
program up time    : 11 seconds
processors         : 8x AMD FX(tm)-8350 Eight-Core Processor
physical memory    : 27298/32729 MB (free/total)
free disk space    : (C:) 12.76 GB
display mode       : 1920x1200, 32 bit
process id         : e18
allocated memory   : 223.37 MB
largest free block : 1.99 GB
command line       : "C:\Delphi\Delphi Sydney\bin\bds.exe" -pDelphi
executable         : bds.exe
current module     : madExcept_.bpl
exec. date/time    : 2020-08-22 14:55
version            : 27.0.38860.1461
compiled with      : Delphi 10.4 Sydney
madExcept version  : 5.1.0
callstack crc      : $e65dfdcc, 6ea7d6, c89cd5
exception number   : 1
exception class    : EDbkError
exception message  : Unable to access debug process memory: Only part of a ReadProcessMemory or WriteProcessMemory request was completed.

thread $f50:
20378bc0 +058 dbkdebugide270.bpl   Debug          13205   +3 TDebugger.DBKError
20318cc1 +065 dbkdebugide270.bpl   DbkHelper        150   +4 CheckRetVal
20370113 +05f dbkdebugide270.bpl   Debug           9799   +6 TProcess.ReadProcessMemory
203785ae +016 dbkdebugide270.bpl   Debug          13076   +4 TDebugger.ShowException
20856336 +03a coreide270.bpl       DebuggerMgr     2204   +3 TDebuggerMgr.ShowException
004b0a64 +018 bds.exe              AppMain         4195   +3 TAppBuilder.ProcessException
2085720b +03b coreide270.bpl       DebuggerMgr     2605   +7 TDebuggerMgr.ProcessStateChanged
20373b12 +066 dbkdebugide270.bpl   Debug          11440   +2 TDebugger.DoNotifyProcessStateChanged
210688c1 +05d designide270.bpl     ToolUtils        100   +5 ForEach
20373a71 +10d dbkdebugide270.bpl   Debug          11432  +27 TDebugger.NotifyProcessStateChanged
2036ff7a +01e dbkdebugide270.bpl   Debug           9739   +4 TProcess.SetProcessState
2238cd11 +111 win32debugide270.bpl Win32Debug      1473  +39 TNativeThread.DoHandleStopOnFirstChanceException
20369179 +5d1 dbkdebugide270.bpl   Debug           6469 +158 TThread.ntfyThread
50180120 +01c rtl270.bpl           System.Classes 17196   +1 TComponent.UpdateAction
50e56afb +017 vcl270.bpl           Vcl.Forms       7907   +1 ProcessUpdate
50cf6f46 +2be vcl270.bpl           Vcl.Controls    7480  +91 TControl.WndProc
50064530 +10c rtl270.bpl           System         33034  +56 @FinalizeRecord
50df4287 +1c7 vcl270.bpl           Vcl.Themes      5636  +18 TStyleManager.GetStyle
50df7b76 +14a vcl270.bpl           Vcl.Themes      7397  +38 TStyleHook.WndProc
50df7d6c +000 vcl270.bpl           Vcl.Themes      7505   +0 TMouseTrackControlStyleHook.WndProc
50df739a +066 vcl270.bpl           Vcl.Themes      7110  +20 TStyleHook.HandleMessage
50df4334 +054 vcl270.bpl           Vcl.Themes      5665  +11 TStyleManager.HandleMessage
50cfa147 +00f vcl270.bpl           Vcl.Controls    9344   +0 TWinControl.DoHandleStyleMessage
50cf6b80 +024 vcl270.bpl           Vcl.Controls    7258  +10 TControl.Perform
50e5cf0f +087 vcl270.bpl           Vcl.Forms      12246   +9 TApplication.DispatchAction
50e5a655 +469 vcl270.bpl           Vcl.Forms      10589  +98 TApplication.WndProc
50181450 +014 rtl270.bpl           System.Classes 18021   +8 StdWndProc
50064530 +10c rtl270.bpl           System         33034  +56 @FinalizeRecord
75df7bd5 +00a USER32.dll                                     DispatchMessageA
50e5b247 +0fb vcl270.bpl           Vcl.Forms      11030  +25 TApplication.ProcessMessage
50e5b282 +00a vcl270.bpl           Vcl.Forms      11058   +1 TApplication.HandleMessage
50e5b5b5 +0c9 vcl270.bpl           Vcl.Forms      11196  +26 TApplication.Run
0051e178 +0cc bds.exe              bds              222  +13 initialization
75c2343b +010 kernel32.dll                                   BaseThreadInitThunk

thread cac:
77380156 +0e ntdll.dll     NtWaitForMultipleObjects
75c2343b +10 kernel32.dll  BaseThreadInitThunk

thread e70:
77381f3f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75c2343b +10 kernel32.dll  BaseThreadInitThunk

thread c:
77380156 +0e ntdll.dll       NtWaitForMultipleObjects
7625176f +fa KERNELBASE.dll  WaitForMultipleObjectsEx
75c219f7 +89 kernel32.dll    WaitForMultipleObjectsEx
75e00894 +00 USER32.dll      MsgWaitForMultipleObjectsEx
75e00b94 +1a USER32.dll      MsgWaitForMultipleObjects
75c2343b +10 kernel32.dll    BaseThreadInitThunk

thread 34: <priority:1>
77380156 +0e ntdll.dll                                NtWaitForMultipleObjects
7625176f +fa KERNELBASE.dll                           WaitForMultipleObjectsEx
75c219f7 +89 kernel32.dll                             WaitForMultipleObjectsEx
5023d6d6 +06 rtl270.bpl     System.SyncObjs   774  +1 THandleObject.WaitFor
5017d4a1 +49 rtl270.bpl     System.Classes  15509 +18 ThreadProc
50061d64 +28 rtl270.bpl     System          25422 +45 ThreadWrapper
75c2343b +10 kernel32.dll                             BaseThreadInitThunk

thread adc:
77381f3f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75c2343b +10 kernel32.dll  BaseThreadInitThunk

thread 78:
77381f3f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75c2343b +10 kernel32.dll  BaseThreadInitThunk

thread e40:
7737fd8a +0e ntdll.dll       NtDelayExecution
76253d91 +5f KERNELBASE.dll  SleepEx
76254662 +0a KERNELBASE.dll  Sleep
75c2343b +10 kernel32.dll    BaseThreadInitThunk

thread $d88:
77381f3f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75c2343b +10 kernel32.dll  BaseThreadInitThunk

thread 0:
77380156 +0e ntdll.dll       NtWaitForMultipleObjects
7625176f +fa KERNELBASE.dll  WaitForMultipleObjectsEx
75c219f7 +89 kernel32.dll    WaitForMultipleObjectsEx
75c2343b +10 kernel32.dll    BaseThreadInitThunk

thread $bec:
7737fd8a +00e ntdll.dll                                 NtDelayExecution
76253d91 +05f KERNELBASE.dll                            SleepEx
76254662 +00a KERNELBASE.dll                            Sleep
5017e341 +001 rtl270.bpl     System.Classes   16266  +0 TThread.Sleep
004ddf4a +156 bds.exe        SanctuaryChecker  2309 +20 CrossRefBinFolder$ActRec.[=10=]$Body
5017b8ad +005 rtl270.bpl     System.Classes   15293  +0 TAnonymousThread.Execute
5017d4a1 +049 rtl270.bpl     System.Classes   15509 +18 ThreadProc
50061d64 +028 rtl270.bpl     System           25422 +45 ThreadWrapper
75c2343b +010 kernel32.dll                              BaseThreadInitThunk

thread ed8:
77380156 +0e ntdll.dll                                               NtWaitForMultipleObjects
7625176f +fa KERNELBASE.dll                                          WaitForMultipleObjectsEx
75c219f7 +89 kernel32.dll                                            WaitForMultipleObjectsEx
5023d6d6 +06 rtl270.bpl     System.SyncObjs                  774  +1 THandleObject.WaitFor
004536cf +2f bds.exe        Sanctuary.LicenseRenewalThread   121  +3 TLicenseRenewalThread.Execute
5017d4a1 +49 rtl270.bpl     System.Classes                 15509 +18 ThreadProc
50061d64 +28 rtl270.bpl     System                         25422 +45 ThreadWrapper
75c2343b +10 kernel32.dll                                            BaseThreadInitThunk

thread ad8:
77380156 +0e ntdll.dll       NtWaitForMultipleObjects
7625176f +fa KERNELBASE.dll  WaitForMultipleObjectsEx
75c219f7 +89 kernel32.dll    WaitForMultipleObjectsEx
75c2343b +10 kernel32.dll    BaseThreadInitThunk

thread e54: <priority:2>
77380156 +0e ntdll.dll       NtWaitForMultipleObjects
7625176f +fa KERNELBASE.dll  WaitForMultipleObjectsEx
75c219f7 +89 kernel32.dll    WaitForMultipleObjectsEx
75c2343b +10 kernel32.dll    BaseThreadInitThunk

thread 50:
7737f8ca +00e ntdll.dll                                              NtWaitForSingleObject
76292f7b +05b ws2_32.dll                                             WahReferenceContextByHandle
7629673b +09c ws2_32.dll                                             select
004cd24e +2b6 bds.exe      Sanctuary.SanctSocketUtil         359 +18 TSanctSocketHelper.AcceptConnections
004ce125 +02d bds.exe      Sanctuary.InstanceCountListener    64  +6 TInstanceCountListener.Execute
5017d4a1 +049 rtl270.bpl   System.Classes                  15509 +18 ThreadProc
50061d64 +028 rtl270.bpl   System                          25422 +45 ThreadWrapper
75c2343b +010 kernel32.dll                                           BaseThreadInitThunk

thread eb0:
7737f8ca +00e ntdll.dll                                                    NtWaitForSingleObject
76251623 +092 KERNELBASE.dll                                               WaitForSingleObjectEx
75c2118f +03e kernel32.dll                                                 WaitForSingleObjectEx
75c21143 +00d kernel32.dll                                                 WaitForSingleObject
5009fe5e +002 rtl270.bpl     System.SysUtils                     23655  +0 WaitForSyncWaitObj
500a004f +01f rtl270.bpl     System.SysUtils                     23884  +6 WaitOrSignalObj
50060c89 +065 rtl270.bpl     System                              19934 +16 TMonitor.Wait
50060cfa +022 rtl270.bpl     System                              19952  +3 TMonitor.Wait
004522ef +13f bds.exe        Sanctuary.LicenseVerificationThread    96 +19 TLicenseVerificationThread.Execute
5017d4a1 +049 rtl270.bpl     System.Classes                      15509 +18 ThreadProc
50061d64 +028 rtl270.bpl     System                              25422 +45 ThreadWrapper
75c2343b +010 kernel32.dll                                                 BaseThreadInitThunk

thread $c0c:
7737f8ca +0e ntdll.dll                                NtWaitForSingleObject
76251623 +92 KERNELBASE.dll                           WaitForSingleObjectEx
75c2118f +3e kernel32.dll                             WaitForSingleObjectEx
75c21143 +0d kernel32.dll                             WaitForSingleObject
212fcc6e +26 vclide270.bpl  IDEVirtualTrees  5264  +4 TWorkerThread.Execute
5017d4a1 +49 rtl270.bpl     System.Classes  15509 +18 ThreadProc
50061d64 +28 rtl270.bpl     System          25422 +45 ThreadWrapper
75c2343b +10 kernel32.dll                             BaseThreadInitThunk

thread $df8:
77380156 +0e ntdll.dll                                      NtWaitForMultipleObjects
7625176f +fa KERNELBASE.dll                                 WaitForMultipleObjectsEx
75c219f7 +89 kernel32.dll                                   WaitForMultipleObjectsEx
5023d6d6 +06 rtl270.bpl         System.SyncObjs     774  +1 THandleObject.WaitFor
0e37c759 +11 LivePreview270.bpl LivePreviewServer   733  +3 TStreamStackThread.TStreamStack.WaitStream
0e37c40d +29 LivePreview270.bpl LivePreviewServer   625  +4 TStreamStackThread.Execute
5017d4a1 +49 rtl270.bpl         System.Classes    15509 +18 ThreadProc
50061d64 +28 rtl270.bpl         System            25422 +45 ThreadWrapper
75c2343b +10 kernel32.dll                                   BaseThreadInitThunk

thread f4 (TDosThread):
77380156 +00e ntdll.dll                                    NtWaitForMultipleObjects
7625176f +0fa KERNELBASE.dll                               WaitForMultipleObjectsEx
75c219f7 +089 kernel32.dll                                 WaitForMultipleObjectsEx
75c22687 +013 kernel32.dll                                 WaitForMultipleObjects
0d306bd9 +795 IDELSP270.bpl  BaseLSP.DosCommand   849 +160 TDosThread.Execute
5985b4eb +02b madExcept_.bpl madExcept                     HookedTThreadExecute
5017d4a1 +049 rtl270.bpl     System.Classes     15509  +18 ThreadProc
50061d64 +028 rtl270.bpl     System             25422  +45 ThreadWrapper
5985b3d1 +00d madExcept_.bpl madExcept                     CallThreadProcSafe
5985b436 +032 madExcept_.bpl madExcept                     ThreadExceptFrame
75c2343b +010 kernel32.dll                                 BaseThreadInitThunk
>> created by thread $f50 at:
5017d564 +018 rtl270.bpl     System.Classes     15564   +1 TThread.Create

thread f0c (TReadPipe):
7737f8fe +00e ntdll.dll                                   NtReadFile
7624deef +112 KERNELBASE.dll                              ReadFile
75c24034 +04f kernel32.dll                                ReadFile
0d303162 +086 IDELSP270.bpl  ReaderUnit           173 +20 TReader.ReadBuffer
0d302fa2 +026 IDELSP270.bpl  ReaderUnit            92  +4 TReader.Find
0d307bb5 +089 IDELSP270.bpl  BaseLSP.DosCommand  1295  +4 TReadPipe.Execute
5017d4a1 +049 rtl270.bpl     System.Classes     15509 +18 ThreadProc
50061d64 +028 rtl270.bpl     System             25422 +45 ThreadWrapper
5985b3d1 +00d madExcept_.bpl madExcept                    CallThreadProcSafe
5985b436 +032 madExcept_.bpl madExcept                    ThreadExceptFrame
75c2343b +010 kernel32.dll                                BaseThreadInitThunk
>> created by thread f4 (TDosThread) at:
5017d564 +018 rtl270.bpl     System.Classes     15564  +1 TThread.Create

thread 30: <priority:1>
77381f0b +0b ntdll.dll                NtWaitForDebugEvent
773ff355 +19 ntdll.dll                DbgUiWaitStateChange
75c989f9 +1c kernel32.dll             WaitForDebugEvent
5985b3d1 +0d madExcept_.bpl madExcept CallThreadProcSafe
5985b436 +32 madExcept_.bpl madExcept ThreadExceptFrame
75c2343b +10 kernel32.dll             BaseThreadInitThunk
>> created by thread $f50 at:
1ea9f48b +00 bordbk270N.dll

thread 0:
7737f8ca +0e ntdll.dll                NtWaitForSingleObject
76251623 +92 KERNELBASE.dll           WaitForSingleObjectEx
75c2118f +3e kernel32.dll             WaitForSingleObjectEx
75c21143 +0d kernel32.dll             WaitForSingleObject
5985b3d1 +0d madExcept_.bpl madExcept CallThreadProcSafe
5985b436 +32 madExcept_.bpl madExcept ThreadExceptFrame
75c2343b +10 kernel32.dll             BaseThreadInitThunk
>> created by thread $f50 at:
1ea707ee +00 bordbk270N.dll

disassembling:
[...]
20378b8e          mov     edx, ebx
20378b90          mov     eax, esi
20378b92          call    -b (378b4c)       ; Debug.TDebugger.GetDbkErrorMsg (dbkdebugide270.bpl)
20378b92
20378b97 013204   cmp     dword ptr [ebp-8], 0
20378b9b          jnz     loc_20378bc7
20378b9b
20378b9d 013205   mov     eax, ebx
20378b9f          call    -ff80 (318c24)    ; Dbkhelper.ErrCode (dbkdebugide270.bpl)
20378b9f
20378ba4          mov     [ebp-], eax
20378ba7          mov     byte ptr [ebp-$c], 0
20378bab          lea     eax, [ebp-]
20378bae          push    eax
20378baf          push    0
20378bb1          mov     ecx, [ebp-4]
20378bb4          mov     dl, 1
20378bb6          mov     eax, [3188bc]       ; Dbkhelper.EDbkError.Create (dbkdebugide270.bpl)
20378bbb          call    -934 (31328c)    ; Winapi.PsAPI.System.SysUtils.Exception.CreateFmt (dbkdebugide270.bpl)
20378bbb
20378bc0        > call    -add (3110e8)    ; System.@RaiseExcept (dbkdebugide270.bpl)
20378bc0
20378bc5          jmp     loc_20378bf3
20378bc5
20378bc5        ; ---------------------------------------------------------
20378bc5
20378bc7        loc_20378bc7:
20378bc7 013207   mov     eax, ebx
20378bc9          call    -ffaa (318c24)    ; Dbkhelper.ErrCode (dbkdebugide270.bpl)
20378bc9
20378bce          mov     [ebp-], eax
20378bd1          mov     byte ptr [ebp-$c], 0
20378bd5          lea     eax, [ebp-]
20378bd8          push    eax
20378bd9          push    0
20378bdb          mov     eax, [ebp-8]
20378bde          push    eax
20378bdf          mov     ecx, [ebp-4]
20378be2          mov     dl, 1
20378be4          mov     eax, [3188bc]       ; Dbkhelper.EDbkError.Create (dbkdebugide270.bpl)
20378be9          call    -94a (3132a4)    ; Winapi.PsAPI.System.SysUtils.Exception.CreateFmtHelp (dbkdebugide270.bpl)
20378be9
[...]

已修复!

删除了 GExperts 插件注册表项。现在调试器可以工作了。

\BDS.0\Experts\"GExperts"="c:\Delphi\Tools\GExperts1.3.16\GExpertsRS104.dll"

这可能是新 GExperts“过滤异常”专家中的错误。禁用它将解决问题。