Crash Dump File Wiki
If the game or launcher by some reason crashes it will on most occasions produce a 'crash dump file' that contains.
![File File](https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/tess/WindowsLiveWriter/Debugginga.NETcrashwithrulesinDebugDiag_A228/image_6.png)
Contents. Overview Crash dump analysis is the ability to record the state of the system when a crash occurs and then analyze that state at a later time to determine the cause of the failure.
If the game or launcher by some reason crashes it will on most occasions produce a 'crash dump file' that contains valuable information that will help identify the. How to collect Outlook Memory Dump in. A Dump file is a. You can collect a process memory dump using task manager. The crash dump must be.
For instance, the state of the stack may be collected in order to generate a call stack showing the calls leading up to the failure. This may be necessary in a production environment where a JTAG connection cannot be made to the live system to debug it, but where problems may still occur and must be analyzed and fixed. This wiki topic covers how to use Debug Server Scripting and/or CCS to do the post-crash analysis. At this time, it does not cover how to capture the state of the target when a crash occurs. It assumes you already have a way of capturing that state and transfering it to the host. Crash Dump Format In order for DSS or CCS to analyze the crash dump, the data must first be converted to a format that the debugger understands. At this time there is only one available format, however, since it is text-based, it should not be difficult to write a small script that convert datas from any format into this format.
The format consists of header line and then multiple register or memory entries. An example of this file for a 64+ DSP is available in the install at ccsv5 ccsbase scripting examples DebugServerExamples ExampleCrashDump.txt, or at ccsv4 scripting examples DebugServerExamples ExampleCrashDump.txt in earlier CCS releases.
Header The first line of the file is a header indicating the file and target type. 521177 is a unique id which indicates that the file is a crash dump. The target type is determined by taking the first two digits of the processor family expressed as hex and then converted to decimal.
For instance, a 64xx DSP would be 100 (64h = 100d). The first line for a 64xx would therefore be: 521177 100 Register Entry A register entry is an 'R' followed by the name of the register, the format of the register value in hex, and the register value in hex.
The format field is intended to allow values to be entered as decimal or floating point instead of hex, but currently the only format type supported is hex. As such, the format type must always be 0x0000000B. For instance, if the register A5 contained 0x23 at the time of the crash, the entry in the file would be: R A5 0x0000000B 0x00000023 Memory Entry A memory entry is a 'M' followed by the memory page, start address and length. The actual memory contents are then listed per address, in order, on separate lines. All numbers must be in hex format. The length field is the number of addresses for which there is data. Memory contents should be formatted for the smallest addressable data type for that target.
If the target does not use memory pages, the page parameter is zero. For instance, a memory entry for a four byte region, starting at address 0x8000 on a 6000 family DSP would appear as follows: M 0x00000000 0x00008000 0x4 0x00 0x01 0x02 0x03 On a 5500 DSP, which is 16 bit addressable and has paged memory, a four byte region on the data page would appear as follows: M 0x00000001 0x00008000 0x2 0x0000 0x0001 Crash Analysis Configuration In order to use DSS or CCS to analyze a crash dump, one must first define a target configuration on which to load the crash dump. A simulator, or even actual hardware, could be used, but a better choice would be to use the 'Data Snapshot Viewer' configuration. That connection type will only expose the data contained within the crash dump.
By comparison, a simulator or emulation target will already have values in memory and registers making it difficult to know if the data comes from the crash dump or not. Incorrect conclusions should be drawn from an analysis on existing data that's not part of the crash, particularly if higer level features such as the callstack are used where it's less clear where the data came from. A ccxml file to analyze crash dumps from a 64+ DSP already exists in the install here: ccsv5 ccsbase scripting examples DebugServerExamples CrashDumpAnalysis (64+).ccxml or at ccsv4 scripting examples DebugServerExamples CrashDumpAnalysis (64+).ccxml in earlier CCS releases.
A new configuration (for crashes from other target types) can be created in the Target Configuration editor in CCS. From the File menu, select New-Target Configuration file' and give it a name. Select the Advanced tab and then click the 'New' button. Select 'Data Snapshot Viewer' and hit Finish. Click the 'Add.'
Button and then select the Cpus tab. Click on the processor type that matches the target type the crash dump was saved from, and then click Finish. You can now save this configuration file and launch a CCS or DSS session with it as you would a regular configuration. Analyzing in DSS An example DSS script for analyzing crash dumps is already available here: ccsv5 ccsbase scripting examples DebugServerExamples AnalyzeCrashDump.js or at ccsv4 scripting examples DebugServerExamples AnalyzeCrashDump.js in earlier CCS releases. The script is fairly self explanatory.
It launches DSS with a 'Data Snapshot Viewer' configuration, loads a crash dump file by evaluating a GEL function, and loads the symbols associated with the application that was used to produce the crash dump. It then demonstrates that the target can be read via DSS commands as a normal target would be. Specifically, it prints out the call stack and then evaluates some local and global values. The output of the script is the following. CrashDumpAnalysis DSS.PNG You can see from the output that the crash dump contains enough data to unwind the call stack to main, but not beyond main. The error printed out just before the call stack is printed indicates what data is missing in order to unwind the call stack further. Additionally, because it is located on the stack, the local variable amplitudeOfSymbol can be displayed.
However, members of the global struct gModemData cannot be displayed because it's located in an area that was not saved in the crash dump. This script is meant only as an example and is intended to be modified to suite your needs. For instance, it could be changed to iterate through all crash dumps in a given directory, or to print out specific global data structures that exist in your application.
Advanced Stack Analysis in DSS First available in CCS 5.1 is an advanced call stack analysis tool that operates in the presense of data corruption or incomplete data. It will read and analyze an entire memory region for data that appears to correspond to call frames according to the loaded symbols.
All call stacks found will be printed to standard out. The current program counter and frame or stack pointer are not considered when analyzing the memory. Thus, it can also be used to analyze stacks from OS threads if their location is known.
The call stack listings found by the tool represent all of the possible scenarios leading up to the current state that have an end-state consistent with the memory data: When functions return, their return value remains on the stack until overwritten by other operations, so earlier calls that returned prior to the current state will appear as partial call stacks. Or, due to stack corruption, the middle of the stack may be corrupted and thus a correct call stack at the beginning and end of the memory only would appear. If multiple call stacks are found, they are printed in order from deepest to shallowest based on the starting frame, but may still overlap. Because an accurate starting point is unknown, it is possible that the memory aligns with the functions and calling conventions of the loaded symbols but is not really a call frame. Knowledge of the loaded application is required to make sense of the returned data to decide what call stacks are meaningful and what are not. At this time, this function only works on C6000 and ARM targets. Only DWARF debug info is supported, not STABS.
Accuracy is slightly better when TI compilers are used, but they are not required. In CCS 5.1, the example script mentioned in the previous section makes use of this feature after the first analysis is complete. Its output will look like the following. CrashDumpAnalysis DSS2.PNG Note that two call stacks are printed. The second one is the actual stack at the time that the stack image was created. The first one represents earlier calls that were made by the application prior to the stack image being created, but which had not yet been over written with other data by the application. This happens because the sort algorithm makes significantly more calls and thus uses more stack memory than the random shuffle algorithm, which is called second.
Analyzing in CSS Analyzing the crash dump in CCS follows a very similar process to the DSS case described above. First, launch the 'Data Snapshot Viewer' configuration defined in the Crash Analysis Configuration section above. Next, load the symbols associated with the application which generated the crash dump. Finally, load the crash dump itself. This can be done by opening the scripting console (View-Scripting Console) and typing: eval 'GELSystemRestoreState( 'c:/path/to/your/crashdump.txt ')' Note that the quotes and directory separators are escaped, and that there are no spaces between the parenthesizes and the file name (as javascript will interpret the spaces).
The 'Data Snapshot Viewer' target will now appear as if the actual target were being debugged at the time of the crash. The call stack will appear in the debug view, and the expressions, variables, register and memory views can be used to analyze the target state. If the call stack is incomplete, there should be a reason on the last frame, or a message in the console, explaining what data was missing that prevented the call stack from being unwound further. CCS does not have GUI support for the advanced stack analysis feature discussed in the previous section.
Problems If the call stack does not unwind correctly, one of the following issues is the most likely cause:. Not enough data exists in the crash dump to build a call stack.
At a minimum, displaying the call stack requires the PC and SP (or FP) registers, and the data in memory around where SP points to. The advanced stack analysis feature does not require that however. Depending on optimization settings and decisions made by the compiler, other registers may also be required (for instance, the return address may be stored in a register instead of on the stack). The crash dump data is corrupt. If the crash corrupted the contents of the registers or the data on the stack, the call stack will unwind only as far as the data will let it.
If the crash is the result of an invalid branch, the symbolic data will not indicate how to unwind the call stack from the invalid location, and thus the call stack will not be displayed. The advanced stack analysis feature will do a best effort to work around any corruptions. Symbol information is missing or inadequate. Although higher levels of optimization may make the results confusing, they should not prevent the call stack from displaying. However, no or limited symbols will prevent the call stack from being generated.
The ideal setting is to use full symbolic debug (-symdebug:dwarf, -g). The recommended setting to keep optimization high while still generating symbols is to use -optimizewithdebug. Skeletal symbol information cannot be used to unwind the call stack, and STABS symbol information will not produce as accurate a result. Availability The functionality discussed here is available in CCS v4.2.1. The advanced stack analysis feature is available in CCS v5.1.
Crash Dumps With us working hard on Windower v4, we're trying to get to the route of the various bugs that have been carried over from 3.4 and the new bugs created with the new systems. The hardest part of fixing these bugs is finding out why they happen, and exactly what happened. The best way to people to help us with this is through Crash Dumps. In this we'll cover how to download and install WinDbg, how to attach it to your game, and how to create a minidump for us. Dev c for windows 7. Downloading and Installing WinDbg WinDbg is the debugger offered by Microsoft with the.
You only need to install the Debugging Tools for Windows Running WinDbg On Windows XP, Vista and 7 You will find WinDbg (X86) in your start menu under All Programs Debugging Tools for Windows. If you are on Vista or 7 you will then need to run this as an Administrator. To do this right click the shortcut, click 'Run as administrator', and accept the UAC prompt.
On Windows 8 You will find it on your start-screen labeled as WinDbg (X86), when you have found it, right click it, and click the 'Run as administrator' option. You may receive a UAC prompt if its enabled to run as administrator, click yes and it will open. If WinDbg is not running as an administrator, you will get an error when trying to attach to PlayOnline, so it is vital you do it. Attaching WinDbg to POL First, start FFXI through launcher.exe (the usual way to start POL with Windower). Then go back to WinDbg and go to File Attach to a Process. Select pol.exe from the list and hit OK. At this point POL will hang.
This is completely normal. In WinDbg hit F5 to let POL continue, try not to take too long as it can cause you to disconnect. If you see 'BUSY Debuggee is running.' At the bottom of the command window in WinDbg, POL is running.
Whenever you don't see that, or POL hangs, return to WinDbg and hit F5 again. This might happen a few times when POL loads DLLs, it's nothing to be alarmed about, just skip through them. The window will read something like this: (71f0.7068): Access violation - code c0000005 (first chance) First chance exceptions are reported before any exception handling.
This exception may be expected and handled. ERROR: Symbol file could not be found. Defaulted to export symbols for C: Program Files (x86) Windower 3.4 plugins spellcast.dll - spellcast!CreateInstance+0x7f79d: 00000000`1e5c44dd 8908 mov dword ptr eax,ecx ds:002b:0000000=????????
Hitting the Crash When you reach the point where POL or FFXI normally crashes, it will now hang, and you should see something like the following in the command window: (71f0.72a0): C EH exception - code e06d7363 (first chance) (71f0.72a0): C EH exception - code e06d7363 (!!! Second chance!!!). ERROR: Symbol file could not be found.
Defaulted to export symbols for KERNEL32.dll - KERNEL32!RaiseException+0x59: 000f35f c9 leave. WARNING: Unable to verify checksum for Hook.dll. ERROR: Symbol file could not be found. Defaulted to export symbols for Hook.dll -. WARNING: Unable to verify checksum for C: Program Files (x86) PlayOnline SquareEnix FINAL FANTASY XI FFXiMain.dll. ERROR: Symbol file could not be found. Defaulted to export symbols for C: Program Files (x86) PlayOnline SquareEnix FINAL FANTASY XI FFXiMain.dll -.
ERROR: Symbol file could not be found. Defaulted to export symbols for C: Windows SysWOW64 nvd3dum.dll - Once the game has crashed and WinDbg has shown the error popped up, you can now create a dump.
Creating your Crash dump Now that the game has crashed out, you can create the dump. To do this you will want to type a command in the command box, where 'Debuggee is running' used to display. (It should now be a white box instead of saying Debuggee is running if you crashed) The command you want to type is.dump /m C: filename.dmp. That is a period before the word dump ( very important!) Save the file anywhere you choose, and give it a name that has some meaning like 'spellcastcure3crash.dmp'.
Crash Dump File Windows 10
Then, upload the file in some way, so the developers can get ahold of it, use a free hosting site if you need, just don't use MediaFire, it doesn't work for some. Once you have your dump uploaded, create a new issue on the tracker, unless the issue already exists, and drop a link to the file you uploaded.
Crash Dump File Windows 10
Detaching WinDbg Whenever you want to detach WinDbg from POL or FFXI, just go to Debug Detach Debuggee. If POL or FFXI had crashed, it will then crash as usual.
Crash Dump File Windows 7
If it was running normally, it will continue running normally. If POL is running normal and hasn't crashed yet, you will need to go to Debug Break first before Detaching.