Map issues?

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Map issues?

Post by wassup » Wed Jan 19, 2005 4:35 am

First-chance exception at 0x01fd2590 (MQ2Map.dll) in eqgame.exe: 0xC0000005: Access violation reading location 0x00000118.

Stack:

Code: Select all

>	MQ2Map.dll!GenerateSpawnName(EQData::_SPAWNINFO * pSpawn=0x00000000, char * NameString=0x01ff6168)  Line 1268 + 0x11	C++
 	MQ2Map.dll!MapUpdate()  Line 741 + 0xd	C++
Disassembly:

Code: Select all

01FD258B  sub         edx,eax 
01FD258D  lea         ecx,[ecx] 
01FD2590  mov         cl,byte ptr [eax] <<<<<<<<<<<<<<<<<<<<<
01FD2592  mov         byte ptr [edx+eax],cl 
Code:

in mq2mapapi.cpp:

Code: Select all

case 'N':// cleaned up name 
strcpy(&Name[outpos],pSpawn->Name); <<<<<<<<<<<<<<<<
CleanupName(&Name[outpos],FALSE); 
outpos+=strlen(&Name[outpos]); 
break; 

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 » Wed Jan 19, 2005 4:48 am

I only have about 1000 lines in my mq2mapapi.cpp file. How come yours says 1268?

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Wed Jan 19, 2005 5:02 am

I did do some of those mods from that person with the different shapes around the various pc types etc...

http://macroquest2.com/phpBB2/viewtopic ... sc&start=0

I have been using them for ages with no issues whatsoever though.

I unloaded MQ2FPS since I started using that again today since I have been using 3 characters on the same computer recently. No crash yet.

Will test further with MQ2FPS.

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Wed Jan 19, 2005 10:31 am

Kinda hard for us to fix it if we have no clue what your code looks like. Do you have something like

Code: Select all

if (!pNewSpawn->SpawnID) return;
near the very top of your OnAddSpawn? Most of these errors were caused by "bad" spawns making it into the array.

Some spawns don't have a name, but AFAIK in all of those cases there SHOULD be a null there, and it looks like you're trying to address a zero pointer.

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Wed Jan 19, 2005 11:02 am

This is the code in OnAddSpawn in my MQ2Map:

Code: Select all

PLUGIN_API VOID OnAddSpawn(PSPAWNINFO pNewSpawn) 
{ 
   DebugSpewAlways("MQ2Map::OnAddSpawn(%s)",pNewSpawn->Name); 
   if (Update && pNewSpawn->SpawnID != 0) 
      AddSpawn(pNewSpawn); 
}

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Wed Jan 19, 2005 11:11 am

I don't know what to tell you then, other than adding more if (!pSpawn) return; type checks at random places :/ Nothing should be passing null pointers though.