我試圖從內存轉儲中使用Konica Minolta PCL驅動程序查找訪問衝突的原因。我會盡量根據需要提供儘可能多的信息。也許其他處於類似情況的人會從中受益。如何從轉儲中分析打印機驅動程序中的崩潰
我正在調查的軟件是在Delphi 2007中通過COM託管.NET組件的非託管窗口的組合。其他崩潰轉儲表明可能的連接在設置浮點異常時出現錯誤http://connect.microsoft.com/VisualStudio/feedback/details/535285/using-events-on-interop-assemblies-causes-system-stackoverflowexception#details,我試圖確定是否有任何相似之處。
轉儲創建造成了第二次機會異常:KOAZ8J_O OAPIGetPrinterEncryptionSettingForDriver + 36778在C:!\ Windows \ System32下\閥芯\ DRIVERS \ W32X86 \ 3 \ KOAZ8J_O.DLL造成的訪問衝突異常(0000005)試圖從存儲器位置0x1906ef0c上線程讀取16
加載了WinDBG的,當我發現這個調用堆棧: 0:016>千升 ChildEBP RetAddr
警告:堆棧放鬆無法得到的信息。以下框架可能是錯誤的。 253efdcc 22958881 KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver + 0x36778 253efe1c 2294eff5 KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver + 0x36819 253efe28 22976dde KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver + 0x2cf8d 253efe68 22976e85 KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver + 0x54d76 253efe90 7795f731 KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver + 0x54e1d 253eff34 7795f632 NTDLL!LdrShutdownThread + 0xe6 253eff44 75c576f5 NTDLL!RtlExitUserThread + 0x2a 253eff58 774c03c0 KERNELBASE!的FreeLibraryAndExitThread + 0x5F的 253eff68 5e59367e KERNEL32!FreeLibraryAndExitThreadStub + 0×10 253eff88 774ced6c + 0x23367e 253eff94 779937 7B KERNEL32!BaseThreadInitThunk + 0xe 253effd4 7799374e NTDLL!__ RtlUserThreadStart + 0x70 253effec 00000000 NTDLL!_RtlUserThreadStart + 0x1b
我沒有打印機驅動程序,並通過偏移上的最後一個已知函數的名字,我懷疑有問題的函數符號是完全不同的一個。
0:016> r
eax=22920000 ebx=00000001 ecx=1906ef00 edx=22a01000 esi=24e42ff0 edi=229e6598
eip=229587e0 esp=253efdbc ebp=253efdcc iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010206
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x36778:
229587e0 3944d904 cmp dword ptr [ecx+ebx*8+4],eax ds:0023:1906ef0c=????????
0:016> db ecx+ebx*8+4
1906ef0c ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? ????????????????
1906ef1c ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? ????????????????
1906ef2c ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? ????????????????
1906ef3c ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? ????????????????
1906ef4c ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? ????????????????
1906ef5c ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? ????????????????
1906ef6c ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? ????????????????
1906ef7c ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? ????????????????
0:016> uf 229587e0
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x3676e:
229587d6 8b450c mov eax,dword ptr [ebp+0Ch]
229587d9 85c0 test eax,eax
229587db 7418 je KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x3678d (229587f5)
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x36775:
229587dd 8b4f10 mov ecx,dword ptr [edi+10h]
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x36778:
229587e0 3944d904 cmp dword ptr [ecx+ebx*8+4],eax
229587e4 740f je KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x3678d (229587f5)
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x3677e:
229587e6 8b460c mov eax,dword ptr [esi+0Ch]
229587e9 833c9800 cmp dword ptr [eax+ebx*4],0
229587ed 741d je KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x367a4 (2295880c)
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x36787:
229587ef 8365fc00 and dword ptr [ebp-4],0
229587f3 eb17 jmp KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x367a4 (2295880c)
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x3678d:
229587f5 8b460c mov eax,dword ptr [esi+0Ch]
229587f8 8b0c98 mov ecx,dword ptr [eax+ebx*4]
229587fb 85c9 test ecx,ecx
229587fd 7406 je KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x3679d (22958805)
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x36797:
229587ff 8b01 mov eax,dword ptr [ecx]
22958801 6a01 push 1
22958803 ff10 call dword ptr [eax]
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x3679d:
22958805 8b460c mov eax,dword ptr [esi+0Ch]
22958808 83249800 and dword ptr [eax+ebx*4],0
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x367a4:
2295880c 43 inc ebx
2295880d 3b5e08 cmp ebx,dword ptr [esi+8]
22958810 7cc4 jl KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x3676e (229587d6)
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x367aa:
22958812 837dfc00 cmp dword ptr [ebp-4],0
22958816 7435 je KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x367e5 (2295884d)
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x367b0:
22958818 8d5f1c lea ebx,[edi+1Ch]
2295881b 53 push ebx
2295881c ff1544c19e22 call dword ptr [KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0xca0dc (229ec144)]
22958822 56 push esi
22958823 8d4f14 lea ecx,[edi+14h]
22958826 e80bfcffff call KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x363ce (22958436)
2295882b 53 push ebx
2295882c ff1548c19e22 call dword ptr [KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0xca0e0 (229ec148)]
22958832 ff760c push dword ptr [esi+0Ch]
22958835 ff1530c19e22 call dword ptr [KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0xca0c8 (229ec130)]
2295883b 8b06 mov eax,dword ptr [esi]
2295883d 6a01 push 1
2295883f 8bce mov ecx,esi
22958841 ff10 call dword ptr [eax]
22958843 6a00 push 0
22958845 ff37 push dword ptr [edi]
22958847 ff15c8bf9e22 call dword ptr [KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0xc9f60 (229ebfc8)]
KOAZ8J_O!OAPIGetPrinterEncryptionSettingForDriver+0x367e5:
2295884d 5f pop edi
2295884e 5e pop esi
2295884f 5b pop ebx
22958850 c9 leave
22958851 c20800 ret 8
是否有人能夠發現此彙編代碼中的任何明顯錯誤?爲什麼它會處理這個無效的內存位置。我還在尋找有關如何進一步查明錯誤的指導。我的目標是尋找一種解決方法(因此不會運行此代碼塊)並向驅動程序的作者提供儘可能多的信息。