退出程序时出现“access violation at address 7C95F350 in module "ntdll dll ",write of address 00000020” 怎样解决
当我退出程序时出现“access violation at address 7C95F350 in module "ntdll dll ",write of address 00000020”错误提示框, 怎样解决
[解决办法]
关闭的时候出现CPU窗口 : ntdll.DbgBreakPoint 的解决方法,我不知道你的是不是这种现象
procedure PatchInt3;var NOP: Byte; NTDLL: THandle; BytesWritten: DWORD; Address: Pointer;begin if Win32Platform <> VER_PLATFORM_WIN32_NT then Exit; NTDLL := GetModuleHandle('NTDLL.DLL'); if NTDLL = 0 then Exit; Address := GetProcAddress(NTDLL, 'DbgBreakPoint'); if Address = nil then Exit; try if Char(Address^) <> #$CC then Exit; NOP := $90; if WriteProcessMemory(GetCurrentProcess, Address, @NOP, 1, BytesWritten) and (BytesWritten = 1) then FlushInstructionCache(GetCurrentProcess, Address, 1); except // Do not panic if you see an EAccessViolation here, it is perfectly harmless! on EAccessViolation do ; else raise; end;end;initialization begin PatchInt3; //防止关闭窗口时出现CPU: ntdll.DbgBreakPoint end;
[解决办法]
照这个错误提示的意思是,你在访问一个已经被释放了的对象。
仔细检查。
ps: AV错误就两种,一种地址全0,表示访问一个还没创建的对象。还有一种地址不全0,表示对象已经释放掉了还在访问。
这个应该很好理解的。