HOWTO: Report crash bugs (do it this way or go away)

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

HOWTO: Report crash bugs (do it this way or go away)

Post by Lax » Mon Mar 15, 2004 3:12 pm

This information is now in our wiki under Crash To Desktop:
http://www.macroquest2.com/wiki/index.p ... To_Desktop

Recently a lot of crash bugs have been reported simply by saying "i crashed when i unloaded" or "i crashed after zoning" or "i crashed and have no idea why". Not incredibly easy to track that kind of thing down.

Please do not try to determine what is or is not relevant. We decide what is relevant, and we tell you right here, with instructions on how to get it. If you do not wish to give us what is relevant (e.g. listed below) then dont report the bug.

First and foremost, to be of help you MUST attach a debugger. Here's the..

information we need

1. 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.
2. 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).
2a) 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)
2b) 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. Instead, ask how to get the information. ***

Debuggers
Stuff you need to know about debuggers is:
a) How to attach a debugger to the process, and how to enable trapping of the 0xC0000005 exception (the majority of crash bugs)
b) Where to find the debug spew as well as crash information (for #1) when eqgame crashes
c) Where to find the source line (for #2a) when eqgame crashes inside macroquest
d) Where to find the disassembly (for #2b) when eqgame crashes
e) Where to find the function call stack (for #2b) when eqgame crashes

I'll start off with the Visual Studio .NET debugger since that's what I use, and others can reply and/or update this post with information for other debuggers.

Visual Studio .NET
a) 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.
b) 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.
c) 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.
d) If the disassembly does not show up, you can switch to the disassembly window by hitting alt+8 or by going debug->windows->disassembly
e) 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 (and for you retarded monkeys, VISUAL C++ 6.0 IS IN THIS CATEGORY)
a) 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.
b) 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.
c) 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.
d) 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
e) 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
Last edited by Lax on Thu Feb 17, 2005 12:38 pm, edited 1 time in total.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Using WINDBG

Post by dont_know_at_all » Thu Jun 10, 2004 10:37 pm

1. Build MQ2 (nmake or VS are both fine)
2. Make sure that the PDB files created have the same date as DLLs
3. Download windbg (http://www.microsoft.com/whdc/devtools/ ... x86.mspx#a) and install it
4. Make sure that the PDB files are in the same directory as where you start MQ.
5. Start MQ, EQ, and windbg. (wineq or eqw will work too)
6. On windbg, press F6 and choose eqgame.exe. Once it has broken in, press F5 to continue.
7. In EQ, take the steps that normally crash.
8. When the debugger breaks in, goto to the command window of windbg
8a. Enter this command: .sympath SRV*c:\winnt\symbols*http://msdl.microsoft.com/download/symbols
8b. Enter this command: !reload
9. Enter the command 'r' for registers.
10. Enter the command 'kv' for stack backtrace.
11. Post the output from those commands to a new thread.