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調式對話框。

 

發佈了71 篇原創文章 · 獲贊 9 · 訪問量 21萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章