Page 1 of 4

CTD: right click on map

Posted: Sat Mar 06, 2004 2:56 pm
by gameboy
Downloaded March 6 zip file. It compiled just fine. But when I bring up the map and try right clicking on an npc I get an instant CTD.

How can I go about in debuging this?

Posted: Sat Mar 06, 2004 3:02 pm
by p00n
I am CTD'ing almost everytime I zone. Without MQ2 running, I can zone unhindered. No extraneous plugins or programs running.

Posted: Sat Mar 06, 2004 3:06 pm
by Falco72
Same problem here, CTD on zoning.

Posted: Sat Mar 06, 2004 3:34 pm
by gameboy
I can zone ok.

It only crashes on right click of map if I startup macroquest first, then EQ.

If I startup EQ, then mq2 when I'm already in a zone, right clicking does not crash, but then it doesnt select the target either :-(

Posted: Sat Mar 06, 2004 8:03 pm
by Leezard
Same. Right clicking doesnt target spawn and when i zone in crashes. I tried replacing the MQ2Map.dll files with older version, still a crash.

Posted: Sat Mar 06, 2004 8:35 pm
by Lax
#1 - Make sure eqgame.ini is up to date! If it is not you will DEFINITELY crash.

#2 - After you are POSITIVE eqgame.ini is up to date here is how you can help debug:

Start EverQuest whichever method you please, through EQW or without. You should have MacroQuest 2 loaded and running beforehand. Then, attach the Visual Studio debugger to the process (do this in Visual Studio, and yes Visual C is a part of this so if you have only Visual C don't come saying you dont have Visual Studio like someone did before...) by going Debug->Processes and double click on eqgame.exe in the window that comes up. In the "Attach to process" dialog box it asks the "program types" and lists stuff like "Script" and "Common Language Runtime".. select only "Native" in the list. Hit OK. Then Close the "Processes" window. Then, go make it crash.

When it crashes, an error will be shown in the Output window in Visual Studio. Copy and paste the entire error message to us. Then, one of two things. The crash could have occurred either in MacroQuest (including plugins in this), or in EverQuest. If it occurred in MacroQuest and MQ2 was compiled on your computer, it will bring to the front the line in the source code that caused the crash. Copy and paste the line of code (or the few lines around it including it as long as you show clearly which one it crashed on). If it occured in EverQuest then find the "stack frame" combo box that should be in your set of toolbars right under the File/Edit/View/etc. Pull down the combo box. This shows what functions are waiting to finish completing (the bottom function called the next one up in the list, and so on up to the top one on the list). Let us know at least the top 3 in the list.

Posted: Sat Mar 06, 2004 9:30 pm
by gameboy
Yup, eqgame.ini fixed it. I just took the .cpp and .h files from the zip file. I didnt even think that the offsets would have changed.

Thanks!

Posted: Sat Mar 06, 2004 9:50 pm
by p00n
Let me preface this by saying I am *not* a programmer, coder, scripter, and am only barely computer literate. The cheeks of mine ass have been clenched in preperation for the insults I expect to be hurled at my n00b self. :roll: Having said that:



Ok - followed the above directions, zoned and crashed. The first thing to pop in VS was an Error Box that stated:

"Unhandled exception in eqgame.exe: 0xC0000005:Access Violation."

The middle line here was the one denoted in VS:

004CE294 mov esi,ecx
004CE296 mov eax,dword ptr [esi]
004CE298 test eax,eax


Then the list of items generated by the "Call Stack" button were:

EQGAME! 004ce296()
EQGAME! 00408a69()
EQGAME! 005a7a5c()
EQGAME! 005a7ac0()
EQGAME! 004c6368()
ffffffff()
EQGAME! 00736104()

Posted: Sat Mar 06, 2004 10:44 pm
by Lax
p00n did you make sure your eqgame.ini is up to date?

Posted: Sat Mar 06, 2004 11:12 pm
by Leezard
Is one in CVS most recent one lax?

Posted: Sun Mar 07, 2004 12:27 am
by Leezard
Ok, I DLed CVS version of Eqgame.ini and recompiled, its still crashing every single time i zone. I tried the debug thing, but no processes are coming up, prolly something to do with my security settings.

Posted: Sun Mar 07, 2004 2:57 am
by p00n
If, as I assume, the eqini is generated from the latest zip, then yes, I am positive that I had the eqini from the latest zip

Posted: Sun Mar 07, 2004 11:30 am
by Lax
Ok, next question. Are you guys compiling with Visual Studio 6 or .NET?

Unfortunately the debug info doesn't give us much to work with, but it APPEARS this is related to the OnRemoveSpawn API.

Open MQ2Spawns.cpp and make the following changes:

Code: Select all

VOID InitializeMQ2Spawns()
{
	DebugSpew("Initializing Spawn-related Hooks");
	[color=red]//[/color]EasyClassDetour(EQPlayer__EQPlayer,EQPlayerHook,EQPlayer_Detour,VOID,(class EQPlayer *,unsigned char,unsigned int,unsigned char,char *),EQPlayer_Trampoline);
	[color=red]//[/color]EasyClassDetour(EQPlayer__dEQPlayer,EQPlayerHook,dEQPlayer_Detour,VOID,(VOID),dEQPlayer_Trampoline);

	EasyClassDetour(EQItemList__EQItemList,EQItemListHook,EQItemList_Detour,DWORD,(VOID),EQItemList_Trampoline);
	EasyClassDetour(EQItemList__dEQItemList,EQItemListHook,dEQItemList_Detour,VOID,(VOID),dEQItemList_Trampoline);

	InitializeCriticalSection(&csPendingGrounds);
	ProcessPending=true;
}
If you compile and the crashing stops, then my suspicions are correct. Try it and let me know.

Posted: Sun Mar 07, 2004 1:20 pm
by p00n
I am using Visual Studio 6. Made the above changes, logged into EQ (with MQ2 running), and CTD on first zone. For the record, As I was trying several things yesterday, zoning wasn't the sole reason that I was CTD. In one instance, I was standing adjacent to the Nexus stone toying with the map features...and BAM!...CTD. I could, btw, target by right clicking.

Keep telling me things to help figure out the problem, and I'll keep trying them. Thankfully Elric and htw gave me a copy of the pre-3-6 zip.

Posted: Sun Mar 07, 2004 1:27 pm
by Lax
Each time you're testing the crash issues you should attach the debugger and see if it's the same place each time, etc.

It may also help to look at the debug spew in the output window at the time of the crash. CTRL+ALT+O in visual studio will open this. Everything that gets "spewed" will be shown. Grab the last 5 lines or so of debug spew and paste it here -- NOTE: CENSOR ALL PLAYER NAMES AND CHAT .. for your own protection :)