Crash To Desktop¶
this information is obsolete and needs to be revised!
- We need to know the actual error. The address, the address that was probably trying to be read, etc. Copy and paste from the debugger.
- We need to know if the crash itself was in EVERQUEST, or MACROQUEST. If it was in MacroQuest, the debugger will show you the source line. If not, it will show you some disassembly and an offset in eqgame.exe (most likely).
- a. Inside MacroQuest - The error information from #1 as well as the source line that caused the crash. If you can, copy and paste us the surrounding code block and let us know which source file it was in (e.g. MQ2Utilities.cpp)
- b. Inside EverQuest - The error information #1 including the offset in eqgame.exe, copy and paste a couple lines of the disassembly if you can, AND GET THE FUNCTION CALL STACK. If we get the function call stack, it may be VERY easy to fix the problem. If not, may be very DIFFICULT to fix the problem.
If you cannot get this information, you might as well not report the bug.
Stuff you need to know about debuggers:
- How to attach a debugger to the process, and how to enable trapping of the 0xC0000005 exception (the majority of crash bugs)
- Where to find the debug spew as well as crash information (for info #1) when eqgame.exe crashes
- Where to find the source line (for info #2a only) when eqgame crashes inside macroquest
- Where to find the disassembly (for info #2b only) when eqgame crashes
- Where to find the function call stack (for info #2b only) when eqgame crashes
Visual Studio .Net¶
- Debug menu->Processes option. In the "Available Processes" list select eqgame.exe. Click "Attach". In the "Attach to Process" box that pops up, select only "Native" in the list. Hit OK. The popup closes and the debugger attaches; click "Close" in the processes window. To enable trapping of the 0xC0000005 exception, open Debug->Exceptions (alternatively ctrl+alt+E). Expand "Win32 Exceptions". Select "c0000005 Access violation". Select the two "Break into the debugger" options. Hit OK.
- Debug spew can be found in the "Output window" by hitting ctrl+alt+O, or by going View->Other Windows->Output. The crash information will be displayed there when eqgame crashes.
- VS.NET will automatically point to the source file and put a green arrow by the source line that caused the problem, assuming macroquest was compiled on the computer you are running this on.
- If the disassembly does not show up, you can switch to the disassembly window by hitting alt+8 or by going debug->windows->disassembly
- The function call stack can be found in the toolbar that contains "Program", "Thread" and "Stack Frame". The call stack will be seen in the "stack frame" combo box. Pull it down and take note of the top few if not the entire list.
Visual Studio 6¶
- Build menu->Start Debug->Attach to process... Check the "Show System Processes" button. Select "eqgame" in the list. Hit OK. The c0000005 exception trapping can be enabled by going Debug->Exceptions. Select c0000005 Access violation.
Click "Stop always". Hit "Change". Hit "OK.
- Debug spew can be found in the "Output window" by hitting alt+2, or by going View->Output. The crash information will be displayed there when eqgame crashes.
- VS6 should automatically point to the source file and put a green arrow by the source line that caused the problem, assuming MacroQuest was compiled on the computer you are running this on.
- If the disassembly does not show up, you can switch to the disassembly window by hitting alt+8 or by going View->Debug Windows->Disassembly
- The function call stack can be found in the "Call Stack" window, found by pressing alt+7 or by going View->Debug Windows->Call Stack
- Build MQ2 (nmake or VS are both fine)
- Make sure that the PDB files created have the same date as DLLs
- Download windbg (http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#a) and install it
- Make sure that the PDB files are in the same directory as where you start MQ.
- Start MQ, EQ, and windbg. (wineq or eqw will work too)
- On windbg, press F6 and choose eqgame.exe. Once it has broken in, press F5 to continue. If you don't press F5
quickly enough (a few seconds or so), there is a chance that you will be disconnected. This is because the game is
stopped while you are in the debugger and it is not responding to the server.
- In EQ, take the steps that normally crash.
- When the debugger breaks in, goto to the command window of windbg
- Enter this command: .sympath SRV*c:\winnt\symbols*http://msdl.microsoft.com/download/symbols
- or Enter this command: !symfix
- Enter the command 'r' for registers.
- Enter the command 'kv' for stack backtrace.
- If the crash is in MQ code, you should see the source file open and show the line that caused the problem (if you compiled it on the same machine as you are running on). Alt-3 brings up the local variables. See if there is anything of interest there.
- Post the output from those commands here: http://www.macroquest.org/phpBB2/viewforum.php?f=28.
Visual Studio 2005 Express¶
- Tools->Attach to Process->Select instance of EQ to debug and click 'Attach" Should automatically detect "Native Code". Debug->Exceptions expand the "Win 32 Exceptions" tree and select "c0000005 Access violation" and hit ok.
- When eqgame crashes the debug spew is in the output window usually in the upper right window, but can be foiund by Debug->Windows->Output.
- When EQ crashes VS2005 will popup a box with "break", "ignore", or "continue" to choose from. Select "Break" or all your debug information will be wiped out. It should then open up the source file and place an error next to the line it crashed at.
- Dissasembly can be found at alt+8, or Debug->Windows->Dissasembly.
- Call stack may pop up on its own in lower window as a tab, but if not alt+7 or debug->windows->Call Stack