程序空闲时访问冲突 - 不跟踪信息来跟踪错误 [英] Access violation while the program was idle - not trace information to track down the bug

查看:187
本文介绍了程序空闲时访问冲突 - 不跟踪信息来跟踪错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个程序刚刚弹出AV。到目前为止,Eureka Log可以找到产生错误的源代码行,但现在只显示以下内容:

 地址访问冲突7E452E4E在模块'USER32.dll'。读取地址00000015. 

调用堆栈信息:
----------------------------- -------------------------------------------------- -------------
|地址|模块|单位|类|过程/方法|行|
---------------------------------------------- ----------------------------------------------
|运行线程:ID = 2640;优先级= 0; Class =; [主] |
| --------------------------------------------- ---------------------------------------------
| 77F16A7E | GDI32.dll | | | IntersectClipRect | |
| 7E433000 | USER32.dll | | | EditWndProc | |
| 7E42A993 | USER32.dll | | | CallWindowProcA | |
| 7E42A97D | USER32.dll | | | CallWindowProcA | |
| 7E429011 | USER32.dll | | | OffsetRect | |
| 7E4196C2 | USER32.dll | | | DispatchMessageA | |
| 7E4196B8 | USER32.dll | | | DispatchMessageA | |
| 00625E13 | Amper.exe | Amper.DPR | | | 76 [16] |
| 7C915511 | ntdll.dll | | | RtlFindActivationContextSectionString | |
| 7C915D61 | ntdll.dll | | | RtlFindCharInUnicodeString | |
| 7C910466 | ntdll.dll | | | RtlFreeUnicodeString | |
| 7C80B87C | kernel32.dll | | | IsDBCSLeadByte | |
| 7C9113ED | ntdll.dll | | | RtlDeleteCriticalSection | |
| 7C80EEF5 | kernel32.dll | | | FindClose | |
| 7C901000 | ntdll.dll | | | RtlEnterCriticalSection | |
| 7C912CFF | ntdll.dll | | | LdrLockLoaderLock | |
| 7C9010E0 | ntdll.dll | | | RtlLeaveCriticalSection | |
| 7C912D19 | ntdll.dll | | | LdrUnlockLoaderLock | |
| 7C9166C1 | ntdll.dll | | | LdrGetDllHandleEx | |
| 7C9166B3 | ntdll.dll | | | LdrGetDllHandle | |
| 7C9166A0 | ntdll.dll | | | LdrGetDllHandle | |
| 7C912A8D | ntdll.dll | | | RtlUnicodeToMultiByteN | |
| 7C912C21 | ntdll.dll | | | RtlUnicodeStringToAnsiString | |
| 7C901000 | ntdll.dll | | | RtlEnterCriticalSection | |
| 7C912CC9 | ntdll.dll | | | LdrLockLoaderLock | |
| 7C912CFF | ntdll.dll | | | LdrLockLoaderLock | |
| 7C9010E0 | ntdll.dll | | | RtlLeaveCriticalSection | |
| 7C912D19 | ntdll.dll | | | LdrUnlockLoaderLock | |
| 7C90CF78 | ntdll.dll | | | ZwAllocateVirtualMemory | |
| 7C90CF6E | ntdll.dll | | | ZwAllocateVirtualMemory | |
| 7C9010E0 | ntdll.dll | | | RtlLeaveCriticalSection | |
| 7C80BA57 | kernel32.dll | | | VirtualQueryEx | |
| 7C80BA40 | kernel32.dll | | | VirtualQueryEx | |
| 7C80BA81 | kernel32.dll | | | VirtualQuery | |
| 7C901000 | ntdll.dll | | | RtlEnterCriticalSection | |
| 7C912CC9 | ntdll.dll | | | LdrLockLoaderLock | |
| 7C912CFF | ntdll.dll | | | LdrLockLoaderLock | |
| 7C9010E0 | ntdll.dll | | | RtlLeaveCriticalSection | |
---------------------------------------------- ----------------------------------------------

程序完全空闲,而我收到错误,其窗口被其他窗口隐藏。 FastMM是活动的并设置为完全调试,但它表示没有内存覆盖。
有关如何找到此AV的起源的任何提示?






Win XP,Delphi 7

解决方案

我在user32.dll中没有看到一个EditWndProc()方法,但是Delphi有一对夫妇 - 一个处理组合框消息和一个处理树视图。鉴于MS的comctrl混乱,我猜你有树视图?



检查你的树视图的东西。给定IntersectClipRect的参数,很容易猜到它被传递一个无效的设备上下文 - 所以你正在为树视图做任何自定义绘画?如果是这样,你是否检查以确保画布句柄是!在开始绘画之前没有(尝试断言,如果没有别的话)?


I have a program that just popped up an AV. Until now the Eureka Log could find the source code line that generated the error but now it displays only this:

Access violation at address 7E452E4E in module 'USER32.dll'. Read of address 00000015.

Call Stack Information:
--------------------------------------------------------------------------------------------
|Address |Module          |Unit         |Class|Procedure/Method                     |Line  |
--------------------------------------------------------------------------------------------
|Running Thread: ID=2640; Priority=0; Class=; [Main]                                       |
|------------------------------------------------------------------------------------------|
|77F16A7E|GDI32.dll       |             |     |IntersectClipRect                    |      |
|7E433000|USER32.dll      |             |     |EditWndProc                          |      |
|7E42A993|USER32.dll      |             |     |CallWindowProcA                      |      |
|7E42A97D|USER32.dll      |             |     |CallWindowProcA                      |      |
|7E429011|USER32.dll      |             |     |OffsetRect                           |      |
|7E4196C2|USER32.dll      |             |     |DispatchMessageA                     |      |
|7E4196B8|USER32.dll      |             |     |DispatchMessageA                     |      |
|00625E13|Amper.exe       |Amper.DPR    |     |                                     |76[16]|
|7C915511|ntdll.dll       |             |     |RtlFindActivationContextSectionString|      |
|7C915D61|ntdll.dll       |             |     |RtlFindCharInUnicodeString           |      |
|7C910466|ntdll.dll       |             |     |RtlFreeUnicodeString                 |      |
|7C80B87C|kernel32.dll    |             |     |IsDBCSLeadByte                       |      |
|7C9113ED|ntdll.dll       |             |     |RtlDeleteCriticalSection             |      |
|7C80EEF5|kernel32.dll    |             |     |FindClose                            |      |
|7C901000|ntdll.dll       |             |     |RtlEnterCriticalSection              |      |
|7C912CFF|ntdll.dll       |             |     |LdrLockLoaderLock                    |      |
|7C9010E0|ntdll.dll       |             |     |RtlLeaveCriticalSection              |      |
|7C912D19|ntdll.dll       |             |     |LdrUnlockLoaderLock                  |      |
|7C9166C1|ntdll.dll       |             |     |LdrGetDllHandleEx                    |      |
|7C9166B3|ntdll.dll       |             |     |LdrGetDllHandle                      |      |
|7C9166A0|ntdll.dll       |             |     |LdrGetDllHandle                      |      |
|7C912A8D|ntdll.dll       |             |     |RtlUnicodeToMultiByteN               |      |
|7C912C21|ntdll.dll       |             |     |RtlUnicodeStringToAnsiString         |      |
|7C901000|ntdll.dll       |             |     |RtlEnterCriticalSection              |      |
|7C912CC9|ntdll.dll       |             |     |LdrLockLoaderLock                    |      |
|7C912CFF|ntdll.dll       |             |     |LdrLockLoaderLock                    |      |
|7C9010E0|ntdll.dll       |             |     |RtlLeaveCriticalSection              |      |
|7C912D19|ntdll.dll       |             |     |LdrUnlockLoaderLock                  |      |
|7C90CF78|ntdll.dll       |             |     |ZwAllocateVirtualMemory              |      |
|7C90CF6E|ntdll.dll       |             |     |ZwAllocateVirtualMemory              |      |
|7C9010E0|ntdll.dll       |             |     |RtlLeaveCriticalSection              |      |
|7C80BA57|kernel32.dll    |             |     |VirtualQueryEx                       |      |
|7C80BA40|kernel32.dll    |             |     |VirtualQueryEx                       |      |
|7C80BA81|kernel32.dll    |             |     |VirtualQuery                         |      |
|7C901000|ntdll.dll       |             |     |RtlEnterCriticalSection              |      |
|7C912CC9|ntdll.dll       |             |     |LdrLockLoaderLock                    |      |
|7C912CFF|ntdll.dll       |             |     |LdrLockLoaderLock                    |      |
|7C9010E0|ntdll.dll       |             |     |RtlLeaveCriticalSection              |      |
--------------------------------------------------------------------------------------------

The program was totally idle while I got the error and its window was hidden by other windows. FastMM is active and set to full debug but it indicates no memory overwrite. Any hints about how to find the origin of this AV?


Win XP, Delphi 7

解决方案

I don't see an EditWndProc() method in user32.dll, but Delphi has a couple -- one dealing with combobox messages and one dealing with tree views. Given MS's comctrl mess, I'd guess you have a tree view?

Check your tree view stuff. Given IntersectClipRect's parameters, it's easy to guess that it's being passed an invalid device context -- so...are you doing any custom painting for your tree view? If so, are you checking to make sure the canvas handle is ! NIL before you begin painting (try assertions if nothing else)?

这篇关于程序空闲时访问冲突 - 不跟踪信息来跟踪错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆