CTD: right click on map

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Falco72
a hill giant
a hill giant
Posts: 215
Joined: Fri Sep 26, 2003 3:24 am

Post by Falco72 » Mon Mar 08, 2004 4:00 am

Downloaded last zip, unziped in a new directory, compiled it with VC6++ (SP5) standard ed., without any errors. Started MQ2 and Everquest, started debug of VC, entered in the game and soon as I zone (from Bazaar to SH) I had a CTD. This is the record from debug:

Code: Select all

[MQ2][MQ2]MQ2Map::OnRemoveSpawn(Nodelete)
[MQ2]MQ2Map::OnRemoveSpawn - Spawn not found in list
[MQ2]PluginsSetGameState(7)
[MQ2]mq2chatwnd->SetGameState(7)
[MQ2]PluginsSetGameState(253)
[MQ2]mq2chatwnd->SetGameState(253)
[MQ2]PluginsSetGameState(5)
[MQ2]mq2chatwnd->SetGameState(5)
First-chance exception in eqgame.exe (EQGFX_DX8.DLL): 0xC0000005: Access Violation.
First-chance exception in eqgame.exe: 0xC0000005: Access Violation.
The thread 0x1090 has exited with code 0 (0x0).
The thread 0x108C has exited with code 0 (0x0).
The thread 0x1088 has exited with code 0 (0x0).
The thread 0x1054 has exited with code 0 (0x0).
The thread 0x1094 has exited with code 0 (0x0).
The thread 0xFE8 has exited with code 0 (0x0).
The thread 0x100C has exited with code 0 (0x0).
The thread 0x1060 has exited with code 0 (0x0).
The thread 0x1064 has exited with code 0 (0x0).
The thread 0x1080 has exited with code 0 (0x0).
The thread 0x1074 has exited with code 0 (0x0).
The thread 0x1070 has exited with code 0 (0x0).
Error seems to be in OnRemoveSpawn (as suggest by LAX). Now I will try to compile again with the Lax suggested change and see if the problem will go away.

Falco72
a hill giant
a hill giant
Posts: 215
Joined: Fri Sep 26, 2003 3:24 am

Post by Falco72 » Mon Mar 08, 2004 4:12 am

Again, unziped last realease in a new directory, made the change as suggested by LAX
Open MQ2Spawns.cpp and make the following changes:
Code:

VOID InitializeMQ2Spawns()
{
DebugSpew("Initializing Spawn-related Hooks");
//EasyClassDetour(EQPlayer__EQPlayer,EQPlayerHook,EQPlayer_Detour,VOID,(class EQPlayer *,unsigned char,unsigned int,unsigned char,char *),EQPlayer_Trampoline);
//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;
}
Compiled with VC6++ (SP5) standard ed., without errors. Started MQ2, started Everquest, started VC debug, entered in game and soon I zone (from bazaar to SH) I CTD, debug info are:

Code: Select all

[MQ2]mq2chatwnd->SetGameState(7)
[MQ2]PluginsSetGameState(253)
[MQ2]mq2chatwnd->SetGameState(253)
[MQ2]PluginsSetGameState(5)
[MQ2]mq2chatwnd->SetGameState(5)
[MQ2]CChatHook::Detour(You have entered Shadow Haven.)
[MQ2]PluginsAddGroundItem(IT66_ACTORDEF) 1312.0,28.0,-54.0
[MQ2]MQ2Map::OnAddGroundItem(0)
[MQ2]MQ2Map::OnAddSpawn(Forge)
[MQ2]PluginsAddGroundItem(IT66_ACTORDEF) 1461.0,-332.0,-32.0
[MQ2]MQ2Map::OnAddGroundItem(1)
[MQ2]MQ2Map::OnAddSpawn(Forge)
[MQ2]PluginsAddGroundItem(IT66_ACTORDEF) 145.0,123.0,-27.0
[MQ2]MQ2Map::OnAddGroundItem(2)
[MQ2]MQ2Map::OnAddSpawn(Forge)
[MQ2]PluginsAddGroundItem(IT70_ACTORDEF) 308.0,-17.0,5.0
[MQ2]MQ2Map::OnAddGroundItem(3)
[MQ2]MQ2Map::OnAddSpawn(Brew Barrel)
[MQ2]PluginsAddGroundItem(IT70_ACTORDEF) 398.0,74.0,5.0
[MQ2]MQ2Map::OnAddGroundItem(4)
[MQ2]MQ2Map::OnAddSpawn(Brew Barrel)
[MQ2]PluginsAddGroundItem(IT70_ACTORDEF) 1424.0,416.0,-54.0
[MQ2]MQ2Map::OnAddGroundItem(5)
[MQ2]MQ2Map::OnAddSpawn(Brew Barrel)
[MQ2]PluginsAddGroundItem(IT74_ACTORDEF) 1367.0,-401.0,-51.0
[MQ2]MQ2Map::OnAddGroundItem(6)
[MQ2]MQ2Map::OnAddSpawn(Pottery Wheel)
[MQ2]PluginsAddGroundItem(IT73_ACTORDEF) 1409.0,-387.0,-51.0
[MQ2]MQ2Map::OnAddGroundItem(7)
[MQ2]MQ2Map::OnAddSpawn(Kiln)
[MQ2]PluginsAddGroundItem(IT69_ACTORDEF) 1626.0,-349.0,-57.0
[MQ2]MQ2Map::OnAddGroundItem(8)
[MQ2]MQ2Map::OnAddSpawn(Oven)
[MQ2]PluginsAddGroundItem(IT69_ACTORDEF) 1088.0,269.0,-55.0
[MQ2]MQ2Map::OnAddGroundItem(9)
[MQ2]MQ2Map::OnAddSpawn(Oven)
[MQ2]PluginsAddGroundItem(IT128_ACTORDEF) 60.0,124.0,-25.0
[MQ2]MQ2Map::OnAddGroundItem(10)
[MQ2]MQ2Map::OnAddSpawn(Loom)
[MQ2]PluginsAddGroundItem(IT128_ACTORDEF) 1413.0,265.0,-55.0
[MQ2]MQ2Map::OnAddGroundItem(11)
[MQ2]MQ2Map::OnAddSpawn(Loom)
[MQ2]PluginsAddGroundItem(IT69_ACTORDEF) 249.0,-461.0,-22.0
[MQ2]MQ2Map::OnAddGroundItem(12)
[MQ2]MQ2Map::OnAddSpawn(Oven)
[MQ2]PluginsAddGroundItem(IT70_ACTORDEF) 1424.0,416.0,-54.0
[MQ2]MQ2Map::OnAddGroundItem(13)
[MQ2]MQ2Map::OnAddSpawn(Brew Barrel)
First-chance exception in eqgame.exe (EQGFX_DX8.DLL): 0xC0000005: Access Violation.
First-chance exception in eqgame.exe: 0xC0000005: Access Violation.
The thread 0x1858 has exited with code 0 (0x0).
The thread 0x1854 has exited with code 0 (0x0).
The thread 0x1850 has exited with code 0 (0x0).
The thread 0x181C has exited with code 0 (0x0).
The thread 0x1848 has exited with code 0 (0x0).
The thread 0x18D0 has exited with code 0 (0x0).
The thread 0x1760 has exited with code 0 (0x0).
The thread 0x1824 has exited with code 0 (0x0).
The thread 0x1828 has exited with code 0 (0x0).
The thread 0x1844 has exited with code 0 (0x0).
The thread 0x1838 has exited with code 0 (0x0).
The thread 0x1834 has exited with code 0 (0x0).
I have no more ideas, sorry.

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 » Mon Mar 08, 2004 11:32 am

If you can get the address of the crash as well as the stack information that would greatly help.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Falco72
a hill giant
a hill giant
Posts: 215
Joined: Fri Sep 26, 2003 3:24 am

Post by Falco72 » Mon Mar 08, 2004 12:36 pm

I will look for it as soon as I come back from work. BUT, where may I find that informations on the debug?

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 » Mon Mar 08, 2004 1:07 pm

I gave all the help i can possibly give earlier in the thread
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Falco72
a hill giant
a hill giant
Posts: 215
Joined: Fri Sep 26, 2003 3:24 am

Post by Falco72 » Mon Mar 08, 2004 1:36 pm

Yes, now I saw it. I feel really stupid :oops:.

gnome001
a ghoul
a ghoul
Posts: 109
Joined: Fri Jan 24, 2003 1:01 am

Post by gnome001 » Mon Mar 08, 2004 1:42 pm

Code: Select all

[MQ2]CChatHook::Detour(**** says out of character, 'wtb black saphire pst')
First-chance exception in eqgame.exe (NTDLL.DLL): 0xC0000005: Access Violation.
First-chance exception in eqgame.exe: 0xC0000005: Access Violation.
The thread 0x4EC has exited with code 0 (0x0).
The thread 0x1F0 has exited with code 0 (0x0).
The thread 0x77C has exited with code 0 (0x0).
The thread 0x18C has exited with code 0 (0x0).
The thread 0x180 has exited with code 0 (0x0).
The thread 0x4E8 has exited with code 0 (0x0).
The thread 0x214 has exited with code 0 (0x0).
The thread 0x208 has exited with code 0 (0x0).
The thread 0x564 has exited with code 0 (0x0).
The thread 0x3CC has exited with code 0 (0x0).
The thread 0x5E8 has exited with code 0 (0x0).
[MQ2]MQ2EQBugFix Module Unloaded
[MQ2]MQ2FPS Module Unloaded
[MQ2]MQ2ChatWnd Module Unloaded
[MQ2]MQ2ItemDisplay Module Unloaded
[MQ2]MQ2Map Module Unloaded
[MQ2]MQ2Labels Module Unloaded
The thread 0x5A0 has exited with code 0 (0x0).
The program 'C:\Program Files\EverQuest\eqgame.exe' has exited with code 0 (0x0).
trying to test a bit more.. crashed while just standing in pok.. thats the last stuff that came up in debug spew.

"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.

i can't find this in 6.0.. i can find "call stack" under the view -> debug windows but it tells me that call stack is unavailable while child is running.. i have no clue what this means, and then i can't pull up this window after i crash... and if it is up before i crash it closes on crash..

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

Post by dont_know_at_all » Mon Mar 08, 2004 2:01 pm

1. Build MQ2 using nmake. (VS will work if you have the right options turned on.)
2. Make sure that the PDB files created have the same date as DLLs
3. Download windbg (http://www.microsoft.com/whdc/ddk/debug ... fault.mspx) 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. (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
9. Enter the command 'r' for registers.
10. Enter the command 'kv' for stack backtrace.
11. Post the output from those commands to this thread.

gnome001
a ghoul
a ghoul
Posts: 109
Joined: Fri Jan 24, 2003 1:01 am

Post by gnome001 » Mon Mar 08, 2004 2:36 pm

no clue how to compile with nmake using 6.0.. will the rest of this work if compiled the way i typically do? (double click the dsw file)
[MQ2]PluginsSetGameState(7)
[MQ2]mq2chatwnd->SetGameState(7)
HEAP[eqgame.exe]: Heap missing last entry in committed range near 6a938a0
(214.580): Break instruction exception - code 80000003 (first chance)
eax=06a938a0 ebx=063f0000 ecx=77f75713 edx=0012d5a7 esi=06a938c8 edi=03b60880
eip=77f75554 esp=0012d7b0 ebp=0012d7d0 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202
ntdll!DbgBreakPoint:
77f75554 cc int 3
0:000> g
HEAP[eqgame.exe]: Heap missing last entry in committed range near 6a938a0
(214.580): Break instruction exception - code 80000003 (first chance)
eax=06a938a0 ebx=063f0000 ecx=77f75713 edx=0012d5a7 esi=06a938c8 edi=03b60880
eip=77f75554 esp=0012d7b0 ebp=0012d7d0 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202
ntdll!DbgBreakPoint:
77f75554 cc int 3
0:000> r
eax=06a938a0 ebx=063f0000 ecx=77f75713 edx=0012d5a7 esi=06a938c8 edi=03b60880
eip=77f75554 esp=0012d7b0 ebp=0012d7d0 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202
ntdll!DbgBreakPoint:
77f75554 cc int 3
0:000> kv
ChildEBP RetAddr Args to Child
WARNING: Stack unwind information not available. Following frames may be wrong.
0012d7d0 77f574b2 00ff0000 07514000 0012d7fc ntdll!DbgBreakPoint
0012d808 77f580d6 06ff0000 00001230 00000008 ntdll!LdrGetDllHandle+0x39e
*** WARNING: Unable to verify checksum for C:\Program Files\eq2\eqgame.exe
*** ERROR: Module load completed but symbols could not be loaded for C:\Program Files\eq2\eqgame.exe
0012da0c 005a60da 00ff0000 00000000 00001224 ntdll!RtlAllocateHeap+0x5a2
0012da48 005a60fc 00001224 005a4c76 00001224 eqgame+0x1a60da
0012da80 0043e922 268925f4 0012ddb4 00000000 eqgame+0x1a60fc
0012deb8 0044d2a9 0815d698 006d12b8 07630008 eqgame+0x3e922
0012ded0 00412f25 081c22b0 205577a0 07630008 eqgame+0x4d2a9
0012dfe0 00496f59 42e86e09 000000fd 00000000 eqgame+0x12f25
0012e074 004aae46 00000001 03140048 00000000 eqgame+0x96f59
0012e108 005f0049 0012e144 00240000 77f93a50 eqgame+0xaae46
00000056 00000000 00000000 00000000 00000000 eqgame+0x1f0049
this is what i got compiling typically and running windbg as you say. ( i left in everything it gave after listing all the [MQ2]MQ2Map::OnAddSpawn(a_feral_cave_kodiak07) stuff that spammed many many lines when i zoned into GD from thurg. you can see where i hit r in the command window and kv . )

p00n
a ghoul
a ghoul
Posts: 90
Joined: Sun Feb 22, 2004 11:09 am
Location: USA

Post by p00n » Mon Mar 08, 2004 7:19 pm

Code: Select all

(34c.31c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000002 ebx=20852338 ecx=2fc39178 edx=ffd5000f esi=0013de50 edi=208520a8
eip=00f630f6 esp=0013dd50 ebp=00000002 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202
*** WARNING: Unable to verify checksum for C:\Program Files\Sony\EverQuest\EQGfx_DX8.DLL
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Program Files\Sony\EverQuest\EQGfx_DX8.DLL - 
EQGfx_DX8!t3dRemoveObjectFromTouchedRegions+0x2056:
00f630f6 8b0482           mov     eax,[edx+eax*4]   ds:0023:ffd50017=????????
0:000> r

Code: Select all

eax=00000002 ebx=20852338 ecx=2fc39178 edx=ffd5000f esi=0013de50 edi=208520a8
eip=00f630f6 esp=0013dd50 ebp=00000002 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202
EQGfx_DX8!t3dRemoveObjectFromTouchedRegions+0x2056:
00f630f6 ??               ???
[/color]
0:000> kv

Code: Select all

ChildEBP RetAddr  Args to Child              
WARNING: Stack unwind information not available. Following frames may be wrong.
0013dd4c 00000000 00000000 00000000 00000000 EQGfx_DX8!t3dRemoveObjectFromTouchedRegions+0x2056
[/color]

I'm sure something aint right - going back for a retry

p00n
a ghoul
a ghoul
Posts: 90
Joined: Sun Feb 22, 2004 11:09 am
Location: USA

Post by p00n » Mon Mar 08, 2004 7:30 pm

This time I CTD without zoning, I tried to scroll out on the map:



0:000> r

Code: Select all

eax=000c0152 ebx=00000000 ecx=7ffde000 edx=0006911c esi=0339c770 edi=00000005
eip=77f5b2ab esp=0013de40 ebp=0013de50 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202
ntdll!RtlEnterCriticalSection+0xb:
77f5b2ab 837a1400      cmp dword ptr [edx+0x14],0x0 ds:0023:00069130=????????

0:000> kv

Code: Select all

ChildEBP RetAddr  Args to Child              
WARNING: Stack unwind information not available. Following frames may be wrong.
0013de50 0052dd3b 000c0152 0343c820 0013de6c ntdll!RtlEnterCriticalSection+0xb
0013de60 0052f2bc 0343c260 0013deb8 004b3209 eqgame+0x12dd3b
0013de6c 004b3209 0343c260 0013de7c 00000001 eqgame+0x12f2bc
0013deb8 0000000a 00000020 0000003c 0339c770 eqgame+0xb3209

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 » Mon Mar 08, 2004 7:53 pm

Just to satisfy that it isnt in the spawns api at all, try commenting out these lines

Code: Select all

[color=red]//[/color]EasyClassDetour(EQItemList__EQItemList,EQItemListHook,EQItemList_Detour,DWORD,(VOID),EQItemList_Trampoline);
[color=red]//[/color]EasyClassDetour(EQItemList__dEQItemList,EQItemListHook,dEQItemList_Detour,VOID,(VOID),dEQItemList_Trampoline);
right under the ones for EQPlayer__EQPlayer etc.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

p00n
a ghoul
a ghoul
Posts: 90
Joined: Sun Feb 22, 2004 11:09 am
Location: USA

Post by p00n » Mon Mar 08, 2004 7:55 pm

This time I CTD'd as soon as my cursor touched the map:

0:011> r

Code: Select all

eax=ff007fff ebx=02cb0f70 ecx=ff007fff edx=ff007fff esi=02cb0f70 edi=00000013
eip=0052cd96 esp=0322faa4 ebp=0322ff70 iopl=0         nv up ei ng nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00010286
eqgame+0x12cd96:
0052cd96 837a4800      cmp dword ptr [edx+0x48],0x0 ds:0023:ff008047=????????


0:011> kv

Code: Select all

ChildEBP RetAddr  Args to Child              
WARNING: Stack unwind information not available. Following frames may be wrong.
0322ff70 005350a7 035a2ed0 035a2f60 0322ffb4 eqgame+0x12cd96
0322ff80 005aa624 035a2f60 00000013 003f0a18 eqgame+0x1350a7
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINNT\system32\kernel32.dll - 
0322ffb4 77e7d33b 02cb0f70 00000013 003f0a18 eqgame+0x1aa624
0322ffec 00000000 005aa5b5 02cb0f70 00000000 kernel32!RegisterWaitForInputIdle+0x43

p00n
a ghoul
a ghoul
Posts: 90
Joined: Sun Feb 22, 2004 11:09 am
Location: USA

Post by p00n » Mon Mar 08, 2004 7:56 pm

post after Lax's did not do as he requested. Am trying that now...

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 » Mon Mar 08, 2004 8:12 pm

If you CTD as soon as your cursor touches the map then comment out this line in MQ2Map, in InitializePlugin

Code: Select all

[color=red]//[/color]EasyClassDetour(CMapViewWnd__CMapViewWnd,CMyMapViewWnd,Constructor_Detour,DWORD,(CXWnd*),Constructor_Trampoline);
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0