• 📚 A new project from the admin: Check out PictureBooks.io, an AI storyteller that lets you build custom picture books for kids in seconds. Let me know what you think here!

Must Close Debugging

Omegon3

Prince
Joined
Aug 31, 2007
Messages
486
Location
Michigan
I'm really hoping that someone can help me with this question as I am terribly frustrated with NOT being able to continue debugging a "modmodod" that I am currently developing using a couple of FfH children...

I have managed to get past all of the initialization errors (python, uncached XML, etc.), but now I'm getting the VERY annoying "BTS Must Close" message that is absolutely worthless so far as trying to figure out what is causing the problem. I have modified "HidePythonExceptions" to "0", but it still doesn't tell me a blasted thing. I look at the technical details that you can get from this window and, quite frankly, it's Greek to me (looks like a trace of the DLLs and other functions that have been called and something that appears to be a coredump of memory...???).

Does any of you fine developers know some way to "debug" the "needs to close" message (i.e. determine exactly what is causing it)? I would really be in anyone's debt that can provided assistance because, at this point (and after all the hours I've spent working on this "modmodmod") I'm more than a little frustated.

Thanks in advance for any feedback that is provided!!!
 
I assume this is the window which offers to make a Normal or Full Dump, or do nothing? I personally use WinDbg to look at the dumpfile after it is generated, by your comments on how it appears to be a DLL trace I assume you have some method of looking at it, I hadn't tried a raw text editor to see if you can see anything with that, but I'll assume you have something that works well.

Really that dump is the best tool short of compiling a debug DLL. Typically it will tell you precisely which function caused the error which resulted in the crash, then you can open the source code and check the function to decide on possible causes. But learning where to look in the dump file took a while when I first started out IIRC.
 
I assume this is the window which offers to make a Normal or Full Dump, or do nothing? I personally use WinDbg to look at the dumpfile after it is generated, by your comments on how it appears to be a DLL trace I assume you have some method of looking at it, I hadn't tried a raw text editor to see if you can see anything with that, but I'll assume you have something that works well.

Really that dump is the best tool short of compiling a debug DLL. Typically it will tell you precisely which function caused the error which resulted in the crash, then you can open the source code and check the function to decide on possible causes. But learning where to look in the dump file took a while when I first started out IIRC.
I'm looking at the "Details" screen of the "must close" window. Is there a way to generate a text (or other) file from it so that I could look at it via the WinDbg you mentioned? Also, I assume there is a site where I could download a free version of this tool or is it fairly cheap to acquire?

Thanks for the response, Xienwolf!!! As always you are the master....
 
In the ini there is a setting for creating crashdumps, just like the setting to allow python error messages. If you enable that, then instead of the normal "I crashed, want some useless details?" message, you get a nicer looking box saying "I crashed, want some useless details that I will take 5 minutes to create and then not show you?"

Then if you have WindDbg, you can open the crashdump and !analze -v to see some nice details which are normally quite useful at pointing you at the cause of your crash.

WinDbg is a free debugging tool from microsoft, so you can get it the same place you get all your windows updates and whatnot.
 
In the ini there is a setting for creating crashdumps, just like the setting to allow python error messages. If you enable that, then instead of the normal "I crashed, want some useless details?" message, you get a nicer looking box saying "I crashed, want some useless details that I will take 5 minutes to create and then not show you?"

Then if you have WindDbg, you can open the crashdump and !analze -v to see some nice details which are normally quite useful at pointing you at the cause of your crash.

WinDbg is a free debugging tool from microsoft, so you can get it the same place you get all your windows updates and whatnot.
I'm going into WinDbg and opening the crash dump. Where do I enter the command "!analyze -v"??? I thought the "view"and "WinDbg command line" would do it, but I get some type of error that says "C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe" (doesn't really tell me what the problem is). Also, despite the fact that the dump is over 1 million KB, what it shows after I open the crash dump is an extremely short text.

Thanks.
 
OK, Xienwolf... I got past the above question. Here's what I'm getting; maybe it might make sense to you:

*********************************************************************
* Symbols can not be loaded because symbol path is not initialized. *
* *
* The Symbol Path can be set by: *
* using the _NT_SYMBOL_PATH environment variable. *
* using the -y <symbol_path> argument when starting the debugger. *
* using .sympath and .sympath+ *
*********************************************************************
*********************************************************************
* Symbols can not be loaded because symbol path is not initialized. *
* *
* The Symbol Path can be set by: *
* using the _NT_SYMBOL_PATH environment variable. *
* using the -y <symbol_path> argument when starting the debugger. *
* using .sympath and .sympath+ *
*********************************************************************
Loading symbols for 00340000 zlib1.dll -> zlib1.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for zlib1.dll -
Loading symbols for 00360000 hapdbg.dll -> hapdbg.dll
*** WARNING: Unable to verify checksum for hapdbg.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for hapdbg.dll -
Loading symbols for 01010000 d3dx9_33.dll -> d3dx9_33.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for d3dx9_33.dll -
Loading symbols for 020a0000 CvGameCoreDLL.dll -> CvGameCoreDLL.dll
*** WARNING: Unable to verify checksum for CvGameCoreDLL.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for CvGameCoreDLL.dll -
Loading symbols for 10000000 boost_python-vc71-mt-1_32.dll -> boost_python-vc71-mt-1_32.dll
*** WARNING: Unable to verify checksum for boost_python-vc71-mt-1_32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for boost_python-vc71-mt-1_32.dll -
Loading symbols for 17f70000 mssmp3.asi -> mssmp3.asi
*** WARNING: Unable to verify checksum for mssmp3.asi
*** ERROR: Symbol file could not be found. Defaulted to export symbols for mssmp3.asi -
Loading symbols for 17fb0000 mssvoice.asi -> mssvoice.asi
*** WARNING: Unable to verify checksum for mssvoice.asi
*** ERROR: Symbol file could not be found. Defaulted to export symbols for mssvoice.asi -
Loading symbols for 18000000 binkw32.dll -> binkw32.dll
*** WARNING: Unable to verify checksum for binkw32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for binkw32.dll -
Loading symbols for 18240000 mssdolby.flt -> mssdolby.flt
*** WARNING: Unable to verify checksum for mssdolby.flt
*** ERROR: Symbol file could not be found. Defaulted to export symbols for mssdolby.flt -
Loading symbols for 18260000 mssds3d.flt -> mssds3d.flt
*** WARNING: Unable to verify checksum for mssds3d.flt
*** ERROR: Symbol file could not be found. Defaulted to export symbols for mssds3d.flt -
Loading symbols for 18280000 mssdsp.flt -> mssdsp.flt
*** WARNING: Unable to verify checksum for mssdsp.flt
*** ERROR: Symbol file could not be found. Defaulted to export symbols for mssdsp.flt -
Loading symbols for 182b0000 msseax.flt -> msseax.flt
*** WARNING: Unable to verify checksum for msseax.flt
*** ERROR: Symbol file could not be found. Defaulted to export symbols for msseax.flt -
Loading symbols for 182e0000 msssrs.flt -> msssrs.flt
*** WARNING: Unable to verify checksum for msssrs.flt
*** ERROR: Symbol file could not be found. Defaulted to export symbols for msssrs.flt -
Loading symbols for 1e000000 python24.dll -> python24.dll
*** WARNING: Unable to verify checksum for python24.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for python24.dll -
Loading symbols for 201d0000 d3d9.dll -> d3d9.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for d3d9.dll -
Loading symbols for 21100000 Mss32.dll -> Mss32.dll
*** WARNING: Unable to verify checksum for Mss32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for Mss32.dll -
Loading symbols for 59a60000 dbghelp.dll -> dbghelp.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for dbghelp.dll -
Loading symbols for 5ad70000 uxtheme.dll -> uxtheme.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for uxtheme.dll -
Loading symbols for 5b860000 netapi32.dll -> netapi32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for netapi32.dll -
Loading symbols for 5d090000 comctl32.dll -> comctl32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for comctl32.dll -
Loading symbols for 68000000 rsaenh.dll -> rsaenh.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for rsaenh.dll -
Loading symbols for 6d990000 d3d8thk.dll -> d3d8thk.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for d3d8thk.dll -
Loading symbols for 71aa0000 ws2help.dll -> ws2help.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ws2help.dll -
Loading symbols for 71ab0000 ws2_32.dll -> ws2_32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ws2_32.dll -
Loading symbols for 72d10000 msacm32.drv -> msacm32.drv
*** ERROR: Symbol file could not be found. Defaulted to export symbols for msacm32.drv -
Loading symbols for 72d20000 wdmaud.drv -> wdmaud.drv
*** ERROR: Symbol file could not be found. Defaulted to export symbols for wdmaud.drv -
Loading symbols for 73ee0000 ksuser.dll -> ksuser.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ksuser.dll -
Loading symbols for 73f10000 dsound.dll -> dsound.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for dsound.dll -
Loading symbols for 74980000 msxml3.dll -> msxml3.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for msxml3.dll -
Loading symbols for 755c0000 msctfime.ime -> msctfime.ime
*** ERROR: Symbol file could not be found. Defaulted to export symbols for msctfime.ime -
Loading symbols for 76360000 winsta.dll -> winsta.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for winsta.dll -
Loading symbols for 76390000 imm32.dll -> imm32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for imm32.dll -
Loading symbols for 76980000 linkinfo.dll -> linkinfo.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for linkinfo.dll -
Loading symbols for 76990000 ntshrui.dll -> ntshrui.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntshrui.dll -
Loading symbols for 769c0000 userenv.dll -> userenv.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for userenv.dll -
Loading symbols for 76b20000 atl.dll -> atl.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for atl.dll -
Loading symbols for 76b40000 winmm.dll -> winmm.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for winmm.dll -
Loading symbols for 76bf0000 PSAPI.DLL -> PSAPI.DLL
*** ERROR: Symbol file could not be found. Defaulted to export symbols for PSAPI.DLL -
Loading symbols for 76c30000 wintrust.dll -> wintrust.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for wintrust.dll -
Loading symbols for 76c90000 imagehlp.dll -> imagehlp.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for imagehlp.dll -
Loading symbols for 76f50000 wtsapi32.dll -> wtsapi32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for wtsapi32.dll -
Loading symbols for 76fd0000 clbcatq.dll -> clbcatq.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for clbcatq.dll -
Loading symbols for 77050000 comres.dll -> comres.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for comres.dll -
Loading symbols for 77120000 oleaut32.dll -> oleaut32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for oleaut32.dll -
Loading symbols for 773d0000 comctl32.dll -> comctl32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for comctl32.dll -
Loading symbols for 774e0000 ole32.dll -> ole32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ole32.dll -
Loading symbols for 77920000 setupapi.dll -> setupapi.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for setupapi.dll -
Loading symbols for 77a80000 crypt32.dll -> crypt32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for crypt32.dll -
Loading symbols for 77b20000 msasn1.dll -> msasn1.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for msasn1.dll -
Loading symbols for 77bd0000 midimap.dll -> midimap.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for midimap.dll -
Loading symbols for 77be0000 msacm32.dll -> msacm32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for msacm32.dll -
Loading symbols for 77c00000 version.dll -> version.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for version.dll -
Loading symbols for 77c10000 msvcrt.dll -> msvcrt.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for msvcrt.dll -
Loading symbols for 77dd0000 advapi32.dll -> advapi32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for advapi32.dll -
Loading symbols for 77e70000 rpcrt4.dll -> rpcrt4.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for rpcrt4.dll -
Loading symbols for 77f10000 gdi32.dll -> gdi32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for gdi32.dll -
Loading symbols for 77f60000 shlwapi.dll -> shlwapi.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for shlwapi.dll -
Loading symbols for 77fe0000 secur32.dll -> secur32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for secur32.dll -
Loading symbols for 7c3a0000 msvcp71.dll -> msvcp71.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for msvcp71.dll -
Loading symbols for 7c800000 kernel32.dll -> kernel32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll -
Loading symbols for 7c9c0000 shell32.dll -> shell32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for shell32.dll -
Loading symbols for 7e410000 user32.dll -> user32.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for user32.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: IMAGE_NT_HEADERS32 ***
*** ***
*************************************************************************
*************************************************************************
*** ***
*** ***
*** 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:
Civ4BeyondSword+212c04
00612c04 3902 cmp dword ptr [edx],eax

EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 00612c04 (Civ4BeyondSword+0x00212c04)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 53407000
Attempt to read from address 53407000

PROCESS_NAME: Civ4BeyondSword.exe

ADDITIONAL_DEBUG_TEXT:
Use '!findthebuild' command to search for the target build information.
If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols.

FAULTING_MODULE: 7c900000 ntdll

DEBUG_FLR_IMAGE_TIMESTAMP: 4a0c27e6

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".

EXCEPTION_PARAMETER1: 00000000

EXCEPTION_PARAMETER2: 53407000

READ_ADDRESS: 53407000

FOLLOWUP_IP:
Civ4BeyondSword+212c04
00612c04 3902 cmp dword ptr [edx],eax

FAULTING_THREAD: 00000ac8

BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ_WRONG_SYMBOLS

PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ

DEFAULT_BUCKET_ID: INVALID_POINTER_READ

LAST_CONTROL_TRANSFER: from 00612ddc to 00612c04

STACK_TEXT:
WARNING: Stack unwind information not available. Following frames may be wrong.
0012f828 00612ddc 52fd2018 0012f87c 0012f86c Civ4BeyondSword+0x212c04
0012f8ac 00776360 00bc8198 0196d520 00771f0e Civ4BeyondSword+0x212ddc
0012f9b8 0061ccaf 00000003 ffffffff 003f6f54 Civ4BeyondSword!initCvPythonExtensions+0xac230
0012f9e0 00882bf2 0012fa54 00a2e9b8 00000003 Civ4BeyondSword+0x21ccaf
0012f9f0 0061cb41 4ea4f1c4 7c802446 0000000a Civ4BeyondSword!initCvPythonExtensions+0x1b8ac2
0012fa5c 00456860 0f0f0ebc 0f0f0fbc 01dc9d80 Civ4BeyondSword+0x21cb41
0012fac8 7c91005d 7c34218a 003f0000 00000000 Civ4BeyondSword+0x56860
0012facc 7c34218a 003f0000 00000000 7c34218f ntdll!RtlFreeHeap+0x130
0012fad8 7c34218f 00000000 003f6f54 1f677c90 msvcr71!free+0x39
00000000 00000000 00000000 00000000 00000000 msvcr71!free+0x3e


STACK_COMMAND: ~0s; .ecxr ; kb

SYMBOL_STACK_INDEX: 0

SYMBOL_NAME: Civ4BeyondSword+212c04

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: Civ4BeyondSword

IMAGE_NAME: Civ4BeyondSword.exe

BUCKET_ID: WRONG_SYMBOLS

FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_Civ4BeyondSword.exe!Unknown

WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOn...9_0/4a0c27e6/c0000005/00212c04.htm?Retriage=1

Followup: MachineOwner
---------
 
There is a little bit of setup required for WinDbg to work properly. You have to tell it where to find your code so it can place symbols properly (symbols are what the computer refers to the start of each function as). Unfortunately I cannot remember where I found the information on how to set it up when I managed to do so finally.

In my Symbol File Path, I have:

C:\WINDOWS\Symbols;C:\WINDOWS\Symbols\dll;C:\WINDOWS\Symbols\exe

And in Source File Path I pointed it at the location I compile my source from.

Both of those are found in the File menu of WnDbg. I hope that was all that had been required.
 
There is a little bit of setup required for WinDbg to work properly. You have to tell it where to find your code so it can place symbols properly (symbols are what the computer refers to the start of each function as). Unfortunately I cannot remember where I found the information on how to set it up when I managed to do so finally.

In my Symbol File Path, I have:

C:\WINDOWS\Symbols;C:\WINDOWS\Symbols\dll;C:\WINDOWS\Symbols\exe

And in Source File Path I pointed it at the location I compile my source from.

Both of those are found in the File menu of WnDbg. I hope that was all that had been required.
OK... I can make the first change, but I don't know what to enter for the second. Is this a lost cause? Any suggestions on how I can figure out my problem? I'm about ready to start from scratch...

Thanks for the feedback as always Xienwolf!!
 
WinDbg is useful, so it isn't a lost cause I'd say. I am also pretty sure you do NOT need to set the source path, as I have used it on different sources frequently when helping debug other people's mods. So just do the first change and see if it works. Also make sure your version of windows uses the same filepaths. I am on 32 bit XP SP3.
 
Back
Top Bottom