Debug Assertion Failed!

Microsoft Visual C++ Debug Library

Debug Assertion Failed!

Program:E:\gyb.2.5\hotfoxd.exe

File:dbgdel.cpp

Line:52

Expression:_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)

对话框如下图所示:

 

该对话框为调式环境下断言失败提示对话框,由释放内存时,内存块头部结构非法引发。通常是由于内存被多次释放所致。

 

单击重试按钮,产生minidump,分析minidump,结果如下所示:

Microsoft (R) Windows Debugger Version 6.11.0001.404 X86

Copyright (c) Microsoft Corporation. All rights reserved.

 

 

Loading Dump File [E:\gyb.2.5\CrashLog\20120131150956\crash.dmp]

User Mini Dump File: Only registers, stack and portions of memory are available

 

WARNING: Whitespace at start of path element

Symbol search path is: SRV*d:/temp/*http://msdl.microsoft.com/download/symbols;

E:\可执行文件\服务端\output\pdb

Executable search path is:

Windows Server 2003 Version 3790 (Service Pack 2) MP (4 procs) Free x86 compatible

Product: Server, suite: Enterprise TerminalServer SingleUserTS

Machine Name:

Debug session time: Tue Jan 31 15:09:58.000 2012 (GMT+8)

System Uptime: not available

Process Uptime: 7 days 7:23:09.000

................................................................

..........................................

This dump file has a breakpoint exception stored in it.

The stored exception information can be accessed via .ecxr.

eax=2f880000 ebx=003f1050 ecx=00000007 edx=7c95847c esi=2f2fefe8 edi=00005020

eip=7c95847c esp=2f2fe468 ebp=2f2fe478 iopl=0         nv up ei pl zr na pe nc

cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246

ntdll!RtlRaiseException+0xd:

7c95847c c3              ret

0:378> !analyze -v

*******************************************************************************

*                                                                             *

*                        Exception Analysis                                   *

*                                                                             *

*******************************************************************************

 

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for aced.dll -

*** WARNING: Unable to verify checksum for hotfoxd.exe

*** WARNING: Unable to verify checksum for BugReport.dll

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for BugReport.dll -

*** WARNING: Unable to verify checksum for ssleay32.dll

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ssleay32.dll -

*** WARNING: Unable to verify checksum for rudp.dll

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for rudp.dll -

*** ERROR: Module load completed but symbols could not be loaded for sqloledb.rll

*** WARNING: Unable to verify checksum for mysql_ext.dll

*** WARNING: Unable to verify checksum for rto.dll

*** WARNING: Unable to verify checksum for brsp.dll

*** WARNING: Unable to verify checksum for asu.dll

*** WARNING: Unable to verify checksum for monitorp.dll

*************************************************************************

***                                                                   ***

***                                                                   ***

***    Your debugger is not using the correct symbols                 ***

***                                                                   ***

***    In order for this command to work properly, your symbol path   ***

***    must point to .pdb files that have full type information.      ***

***                                                                   ***

***    Certain .pdb files (such as the public OS symbols) do not      ***

***    contain the required information.  Contact the group that      ***

***    provided you with these symbols if you need this command to    ***

***    work.                                                          ***

***                                                                   ***

***    Type referenced: kernel32!pNlsUserInfo                         ***

***                                                                   ***

*************************************************************************

*************************************************************************

***                                                                   ***

***                                                                   ***

***    Your debugger is not using the correct symbols                 ***

***                                                                   ***

***    In order for this command to work properly, your symbol path   ***

***    must point to .pdb files that have full type information.      ***

***                                                                   ***

***    Certain .pdb files (such as the public OS symbols) do not      ***

***    contain the required information.  Contact the group that      ***

***    provided you with these symbols if you need this command to    ***

***    work.                                                          ***

***                                                                   ***

***    Type referenced: kernel32!pNlsUserInfo                         ***

***                                                                   ***

*************************************************************************

 

FAULTING_IP:

msvcr80d!operator delete+a6 [f:\rtm\vctools\crt_bld\self_x86\crt\src\dbgdel.cpp @ 52]

102527a6 cc              int     3

 

EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)

ExceptionAddress: 102527a6 (msvcr80d!operator delete+0x000000a6)

   ExceptionCode: 80000003 (Break instruction exception)

  ExceptionFlags: 00000000

NumberParameters: 3

   Parameter[0]: 00000000

   Parameter[1]: f9abe3d0

   Parameter[2]: 1e954ed0

 

DEFAULT_BUCKET_ID:  STATUS_BREAKPOINT

 

PROCESS_NAME:  hotfoxd.exe

 

ERROR_CODE: (NTSTATUS) 0x80000003 - {

 

EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - <Unable to get error code text>

 

EXCEPTION_PARAMETER1:  00000000

 

EXCEPTION_PARAMETER2:  f9abe3d0

 

EXCEPTION_PARAMETER3:  1e954ed0

 

FAULTING_THREAD:  00002478

 

PRIMARY_PROBLEM_CLASS:  STATUS_BREAKPOINT

 

BUGCHECK_STR:  APPLICATION_FAULT_STATUS_BREAKPOINT

 

LAST_CONTROL_TRANSFER:  from 1026917c to 102527a6

 

STACK_TEXT:  

2f2ffd24 1026917c 2d2e1ce8 2f2ffd44 01706746 msvcr80d!operator delete+0xa6 [f:\rtm\vctools\crt_bld\self_x86\crt\src\dbgdel.cpp @ 52]

2f2ffd30 01706746 2d2e1ce8 2d2e1ce8 0183ef14 msvcr80d!operator delete[]+0xc [f:\rtm\vctools\crt_bld\self_x86\crt\src\delete2.cpp @ 21]

WARNING: Stack unwind information not available. Following frames may be wrong.

2f2ffd44 01712a38 2d2e1ce8 893bed66 2f2ffea4 aced!ACE_New_Allocator::free+0x26

2f2ffd90 004bab84 2f2fff04 2f2ffeac 2d66aa10 aced!ACE_Message_Block::release+0x138

2f2ffea4 01779d47 2f2ffecc cccccccc cccccccc hotfoxd!HTX_Socket_Sender::svc+0x114 [e:\src\server\hotfox\sockhandler.cpp @ 476]

2f2ffec0 0177a81d 26d26d44 893befea 00000000 aced!ACE_Task_Base::svc_run+0x47

2f2fff1c 0177a6d3 893befaa 2f2fff64 2d6fac38 aced!ACE_Thread_Adapter::invoke_i+0xdd

2f2fff5c 016c85b9 00000000 cccccccc 2d61f358 aced!ACE_Thread_Adapter::invoke+0xc3

2f2fff70 102047c1 2d61f358 8a572bac 00000000 aced!ace_thread_adapter+0x29

2f2fffac 10204767 2d747048 2f2fffec 7c824829 msvcr80d!_callthreadstartex+0x51 [f:\rtm\vctools\crt_bld\self_x86\crt\src\threadex.c @ 348]

2f2fffb8 7c824829 2d747048 00000000 00000000 msvcr80d!_threadstartex+0x87 [f:\rtm\vctools\crt_bld\self_x86\crt\src\threadex.c @ 331]

2f2fffec 00000000 102046e0 2d66aa10 00000000 kernel32!BaseThreadStart+0x34

 

 

FOLLOWUP_IP:

msvcr80d!operator delete+a6 [f:\rtm\vctools\crt_bld\self_x86\crt\src\dbgdel.cpp @ 52]

102527a6 cc              int     3

 

SYMBOL_STACK_INDEX:  0

 

SYMBOL_NAME:  msvcr80d!operator delete+a6

 

FOLLOWUP_NAME:  MachineOwner

 

MODULE_NAME: msvcr80d

 

IMAGE_NAME:  msvcr80d.dll

 

DEBUG_FLR_IMAGE_TIMESTAMP:  4333a44e

 

STACK_COMMAND:  ~378s; .ecxr ; kb

 

FAILURE_BUCKET_ID:  STATUS_BREAKPOINT_80000003_msvcr80d.dll!operator_delete

 

BUCKET_ID:  APPLICATION_FAULT_STATUS_BREAKPOINT_msvcr80d!operator_delete+a6

 

WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/hotfoxd_exe/1_0_0_2465/4ee72f9a/msvcr80d_dll/8_0_50727_42/4333a44e/80000003/000527a6.htm?Retriage=1

 

Followup: MachineOwner

---------

 

通过dv、dt进一步分析栈上变量发现,产生错误的原因是内存被多次释放所致。产生断言代码如下:

void operator delete(

        void *pUserData

        )

{

        _CrtMemBlockHeader * pHead;

 

        RTCCALLBACK(_RTC_Free_hook, (pUserData, 0));

 

        if (pUserData == NULL)

            return;

 

        _mlock(_HEAP_LOCK);  /* block other threads */

        __TRY

 

            /* get a pointer to memory block header */

            pHead = pHdr(pUserData);

 

             /* verify block type */

            _ASSERTE(_BLOCK_TYPE_IS_VALID(pHead->nBlockUse));

 

            _free_dbg( pUserData, pHead->nBlockUse );

 

        __FINALLY

            _munlock(_HEAP_LOCK);  /* release other threads */

        __END_TRY_FINALLY

 

        return;

}

 

_ASSERTE(_BLOCK_TYPE_IS_VALID(pHead->nBlockUse));

该宏检查内存块是否为有效的内存块。由于内存已经被释放,内存块头部结构已经被破坏,因此,该断言将失败导致出现vc调式对话框。

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
根据提供的引用内容,"vs2013报错 Debug Assertion Failed! Program:C:\Windows\SYSTEM32\mfc120ud.dll File:f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp?" 是一个调试断言失败的错误。这种错误通常发生在运行时,当程序执行到一个不满足特定条件的地方时,会触发断言失败并终止程序的执行。 这个错误的原因可能是多种多样的,但通常是由于以下几个原因之一引起的: 1. 程序中存在空指针或无效指针。 2. 程序中存在数组越界或访问无效内存的情况。 3. 程序中存在逻辑错误或不一致的状态。 为了解决这个问题,你可以尝试以下几个步骤: 1. 检查代码中是否存在空指针或无效指针的情况。确保所有指针在使用之前都被正确初始化,并且没有被释放或删除。 2. 检查代码中是否存在数组越界或访问无效内存的情况。确保所有数组的索引在有效范围内,并且没有越界访问。 3. 检查代码中的逻辑错误或不一致的状态。确保程序的逻辑正确,并且所有的状态都是一致的。 如果以上步骤都没有解决问题,你可以尝试以下方法: 1. 使用调试器来跟踪错误的发生位置。通过调试器可以查看程序的执行过程,并找到导致断言失败的具体代码行。 2. 查看错误信息中提供的文件和行号,定位到具体的代码位置。检查该位置的代码是否存在问题,并进行修复。 3. 如果你使用的是第三方库或框架,确保你使用的版本与你的开发环境兼容,并且正确地配置和链接库文件。 希望以上信息对你有帮助。如果你还有其他问题,请随时提问。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值