Page 1 of 1
CTD at character select
Posted: Sat May 08, 2004 8:16 pm
by ieatacid
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++
Posted: Sat May 08, 2004 8:41 pm
by Lax
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. ...
Posted: Sat May 08, 2004 9:11 pm
by ieatacid
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)
Posted: Sun May 09, 2004 2:26 pm
by ieatacid
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
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.
Posted: Sun May 09, 2004 2:59 pm
by Lax
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);
Posted: Sun May 09, 2004 3:33 pm
by ieatacid
Thanks, that did the trick :)