CTD on switching toons

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Blind Aviator
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sun Nov 06, 2005 8:07 pm

CTD on switching toons

Post by Blind Aviator » Sun Nov 06, 2005 9:27 pm

I can reproduce this CTD everytime...

If I log into any toon (doesn't matter which one) and then log back to char select and back into a different toon everything is fine...

If I log into any toon, play a DoD Monster Mission, finish mission, log out to char select and select a different toon it will CTD every time without fail...

Following is the info as best as I can ascertain it from the CTD debugging instructions...

Crash was in MQ2Main (I believe DLL)

CALL STACK

----> MQ2MAIN! 02e354e0()
MQ2MAIN! 02e312c5()
MQ2MAIN! 02e1bcaa()
65726974()

DISASSEMBLY

02E354CE mov ecx,dword ptr ds:[2E64E98h]
02E354D4 mov dword ptr [ebp-0Ch],ecx
02E354D7 mov eax,ecx
02E354D9 mov edx,esi
02E354DB dec esi
02E354DC test edx,edx
02E354DE je 02E354E8
---> 02E354E0 cmp byte ptr [eax],0
02E354E3 je 02E354E8
02E354E5 inc eax
02E354E6 jmp 02E354D9
02E354E8 sub eax,ecx
02E354EA jmp 02E35697
02E354EF mov dword ptr [ebp-8],8
02E354F6 mov dword ptr [ebp-34h],7
02E354FD test byte ptr [ebp-4],80h
02E35501 mov dword ptr [ebp-10h],10h
Is that all the information that is needed?? If not please let me know as I can reproduce it everytime without fail (so far).

Blind Aviator

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Sun Nov 06, 2005 9:55 pm

Are you running a macro when you switch? If so, /endmacro before camping and see if the problem still occurs
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

Blind Aviator
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sun Nov 06, 2005 8:07 pm

Post by Blind Aviator » Sun Nov 06, 2005 10:02 pm

On very few of the CTD's am I running anything but what is standard with MQ2 in macros...

On a few instances of the CTD I was running the Krust macro (on the reported CTD I was not running that macro)...

Will give it a try anyway here in a bit to see if it makes a difference..

Blind Aviator

Blind Aviator
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sun Nov 06, 2005 8:07 pm

Post by Blind Aviator » Sat Nov 12, 2005 1:31 am

Still crashing on toon switches... Had no Macros loaded during or before crash....

Simply started MQ2, EQ, ran a MM in Nektulos and tried to switch toons...

Blind Aviator

Blind Aviator
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sun Nov 06, 2005 8:07 pm

Post by Blind Aviator » Sat Nov 12, 2005 2:14 am

And again it crashes on toon switch with no macros running...

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Post by SwiftyMUSE » Sat Nov 12, 2005 12:09 pm

Try this "patch" to see if it helps. I've been testing this a couple days and while it might not be a complete fix i've had a lot less CTD switching toons.

Code: Select all

--- D:\MQ2-1101\MQ2Main\MQ2Globals.cpp	Tue Nov 01 16:01:42 2005
+++ D:\MQ2\MQ2Main\MQ2Globals.cpp	Wed Nov 09 21:19:33 2005
@@ -164,6 +164,7 @@
 PDEFINE pDefines = NULL;
 CHAR gLastFindSlot[MAX_STRING]={0};
 PFILTER gpFilters = NULL;
+CHAR gszCharName[MAX_STRING]={0};
 
 BOOL g_bInDXMouse = FALSE;
 PMOUSESPOOF gMouseData = NULL;
 
--- D:\MQ2-1101\MQ2Main\MQ2Globals.h	Tue Nov 01 16:01:42 2005
+++ D:\MQ2\MQ2Main\MQ2Globals.h	Wed Nov 09 21:22:41 2005
@@ -163,6 +162,7 @@
 //EQLIB_VAR CHAR gLastError[MAX_STRING];
 //EQLIB_VAR HWND ghWnd;
 EQLIB_VAR PFILTER gpFilters;
+EQLIB_VAR CHAR gszCharName[MAX_STRING];
 
 EQLIB_VAR map<string,unsigned long> ItemSlotMap;
 
--- D:\MQ2-1101\MQ2Main\MQ2Pulse.cpp	Fri Oct 28 21:11:50 2005
+++ D:\MQ2\MQ2Main\MQ2Pulse.cpp	Wed Nov 09 22:25:58 2005
@@ -177,15 +177,16 @@
     } 
     LastEndurance = GetCharInfo2()->Endurance;
 
-    if (gbDoAutoRun && pChar && pChar->pCharInfo) {
+    if (gbDoAutoRun) {
         gbDoAutoRun = FALSE;
         CHAR szServerAndName[MAX_STRING] = {0};
         CHAR szAutoRun[MAX_STRING] = {0};
         PCHAR pAutoRun = szAutoRun;
-        sprintf(szServerAndName,"%s.%s",EQADDR_SERVERNAME,pChar->pCharInfo->Name);
         GetPrivateProfileString("AutoRun",szServerAndName,"",szAutoRun,MAX_STRING,gszINIFilename);
         while (pAutoRun[0]==' ' || pAutoRun[0]=='\t') pAutoRun++;
         if (szAutoRun[0]!=0) DoCommand(pChar,pAutoRun);
+		DebugSpew("OnPulse() - gszCharName:%s", gszCharName);
+        sprintf(szServerAndName,"%s.%s",EQADDR_SERVERNAME,gszCharName);
            GetPrivateProfileString("AutoRun",szServerAndName,"",szAutoRun,MAX_STRING,gszINIFilename);
         while (pAutoRun[0]==' ' || pAutoRun[0]=='\t') pAutoRun++;
         if (szAutoRun[0]!=0) DoCommand(pChar,pAutoRun);
     }
 
     if ((gFaceAngle != 10000.0f) || (gLookAngle != 10000.0f)) {

--- D:\MQ2-1101\MQ2Main\MQ2PluginHandler.cpp	Thu May 26 03:47:14 2005
+++ D:\MQ2\MQ2Main\MQ2PluginHandler.cpp	Wed Nov 09 22:25:58 2005
@@ -410,6 +410,8 @@
 			CHAR szBuffer[MAX_STRING]={0};
 			if (PCHARINFO pCharInfo=GetCharInfo())
 			{
+				sprintf(gszCharName,"%s",pCharInfo->Name);
+				PluginDebug("gszCharName:%s",gszCharName);
 				sprintf(szBuffer,"%s_%s",EQADDR_SERVERNAME,pCharInfo->Name);
 				LoadCfgFile(szBuffer,false);
 			}