CTD at character select

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

CTD at character select

Post by ieatacid » Sat May 08, 2004 8:16 pm

No problems if I load MQ after I enter the world. Debugged in VS .net

Calll stack:

Code: Select all

>	MQ2Main.dll!_HideDoCommand()  + 0x32c	C++

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

Post by Lax » Sat May 08, 2004 8:41 pm

yay 1% of the info we ask for!

well, I'll see what i can do with that.... I dont think thats going to point me in the right direction though

let me know if you would a) like to get the rest of the information we need and/or b) would like to ask HOW to finish getting the information. ...
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
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Sat May 08, 2004 9:11 pm

Ok, here's more:

Code: Select all

[MQ2]Adding WndNotification target 'ChatWindow'
First-chance exception at 0x02312530 in eqgame.exe: 0xC0000005: Access violation reading location 0x000001ec.

Code: Select all

01393481  cmp         dword ptr [esi+48h],ebx 
01393484  je          _HideDoCommand+331h (13934A1h) 
01393486  mov         edi,dword ptr [ebp+8] 
01393489  lea         ecx,[esp+1018h] 
01393490  push        ecx  
01393491  push        edi  
01393492  call        _ParseMacroParameter (13BAB00h) 
01393497  push        eax  
01393498  push        edi  
01393499  call        dword ptr [esi+40h] 
0139349C  add         esp,10h                           <-------------------
0139349F  jmp         _HideDoCommand+343h (13934B3h) 
013934A1  mov         eax,dword ptr [ebp+8] 
013934A4  lea         edx,[esp+1018h] 
013934AB  push        edx  
013934AC  push        eax  
013934AD  call        dword ptr [esi+40h] 
013934B0  add         esp,8 
013934B3  xor         eax,eax 
013934B5  jmp         _HideDoCommand+350h (13934C0h) 
013934B7  lea         esp,[esp] 
013934BE  mov         edi,edi 
013934C0  mov         cl,byte ptr [esp+eax+818h] 
013934C7  mov         byte ptr _szLastCommand (140D5C8h)[eax],cl 
013934CD  inc         eax  
013934CE  cmp         cl,bl 
013934D0  jne         _HideDoCommand+350h (13934C0h) 

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Sun May 09, 2004 2:26 pm

Ok, I think I've narrowed it down to OnZoned executing a /timed command from my plugin at char select. If I comment that out it's fine, but as soon I type in "/timed 50 /mycommand" in MQ2ChatWnd at char select it crashes. Other /timed commands work fine, such as "/timed 20 /echo test". So it's probably my coding and not yours :wink:

Anyway, I'll try it like that for a bit (with my /timed thing commented out) and see what happens. So far so good though.

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

Post by Lax » Sun May 09, 2004 2:59 pm

ok, then the problem is that your command:
a) Is set to not require being in-game, and
b) Does not check if it is in-game, and
c) Crashes because it expects you to be in-game.

Review the parameters of AddCommand for your plugin. Most people use it like so:

AddCommand("/mycommand",commandfunction);

There are 3 more parameters, but they use defaults.
EQLIB_API VOID AddCommand(PCHAR Command, fEQCommand Function, BOOL EQ=0, BOOL Parse=1, BOOL InGame=0);

If you require your command to be used in-game:
AddCommand("/mycommand",commandfunction,0,1,1);
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
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Sun May 09, 2004 3:33 pm

Thanks, that did the trick :)