gpt4 book ai didi

gdi+ - 应用程序验证程序停止 0202 : Freeing heap block containing an active critical section during GdiPlusShutdown

转载 作者:行者123 更新时间:2023-12-02 02:24:53 24 4
gpt4 key购买 nike

运行 Microsoft Application Verifier 时,我会在关闭时收到错误0202:

VERIFIER STOP 00000202:
pid 0x1160: Freeing heap block containing an active critical section.
11456F48 : Critical section address.
047D05B4 : Critical section initialization stack trace.
11456F40 : Heap block...(cut off)

调用 GdiplusShutdown 时会发生错误。

来自应用程序验证器文档:

Freeing heap block containing an active critical section

Application Verifier break message

Freeing heap block containing an active critical section. Memory location at of size contains an active lock.

Probable cause

This break is generated if a heap allocation contains a critical section, the allocation is freed and the critical section has not been deleted.

Information displayed by Application Verifier

  • Parameter1 - Critical section address
  • Parameter2 - Critical section initialization stack trace
  • Parameter3 - Heap block address
  • Parameter4 - Heap block size
  • Description - Freeing heap block containing an active critical section

Additional information

Verifier stop code 0202.

Check the contents of the current call stack. The culprit is usually the caller of HeapFree or HeapDestroy on the current stack trace.

Frequency of this error is high.

To debug this stop use the following debugger commands:

  • !cs –s parameter1 - dump information about this critical section.
  • ln parameter1 – to show symbols near the address of the critical section. This should help identify the leaked critical section.
  • dds parameter2 – to dump the stack trace for this critical section initialization.

parameter3 and parameter4 might help understand where was this heap block allocated (the size of the allocation is probably significant).

最佳答案

几个月前我遇到了这个错误,但我忘记了解决方案。

在尝试关闭 GDI+ 之前,请务必释放所有 GDI+ 镜像(例如 GdipDisposeImage )。

否则你会泄漏一个关键部分,谁知道还会发生什么。当然不要尝试dispose an image after GDI+ has already been shutdown .

关于gdi+ - 应用程序验证程序停止 0202 : Freeing heap block containing an active critical section during GdiPlusShutdown,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11145714/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com