Jump to content

[Crash] GetNGrid


Guest kero99

Recommended Posts

Hi all, since 5 month ago i have a crash that i never can fix:

http://pastebin.com/wpYSPaVN

I try with clean mangos, insider and GC repo, with or without Mtmaps, with 300 or 3000 player ... but always this crash appear.

Today i upgrade to last mangos 3.3.3a with Insider42 patches and... crash again =(.

Any idea about howto fix o what is the problem??

Best regards

Link to comment
Share on other sites

One of your posts helped me yesterday fix a crash, so i'm making you this present. ^_^

diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index 0f3c99b..1be6033 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -580,6 +580,10 @@ void Map::MessageDistBroadcast(WorldObject *obj, WorldPacket *msg, float dist)

bool Map::loaded(const GridPair &p) const
{
+    // crash guard if x, y coordinates are outside grids
+    if ( (p.x_coord >= MAX_NUMBER_OF_GRIDS) || (p.y_coord >= MAX_NUMBER_OF_GRIDS) )
+        return false;    // consider already loaded, skip
+
    return ( getNGrid(p.x_coord, p.y_coord) && isGridObjectDataLoaded(p.x_coord, p.y_coord) );
}

I know it's not the proper way to fix it. But it should work.

Link to comment
Share on other sites

I think you applyed the patch in the wrong void. "void Map::MessageDistBroadcast(WorldObject *obj, WorldPacket *msg, float dist)" != "bool Map::loaded(const GridPair &p) const"

"void Map::MessageBroadcast(WorldObject *obj, WorldPacket *msg)" allready has a grid check.

Your crash it's at Map.cpp:527 not related to this one in my opinion.

Link to comment
Share on other sites

I think you applyed the patch in the wrong void. "void Map::MessageDistBroadcast(WorldObject *obj, WorldPacket *msg, float dist)" != "bool Map::loaded(const GridPair &p) const"

"void Map::MessageBroadcast(WorldObject *obj, WorldPacket *msg)" allready has a grid check.

Your crash it's at Map.cpp:527 not related to this one in my opinion.

Confirmed same crash, crash is not in Map.cpp:527 (this trace point is #2), the problem come from Map.cpp:586 (#1 Map::loaded)

Some ideas?

Best Regards

Link to comment
Share on other sites

Try this.

bool Map::loaded(const GridPair &p) const
{
   // crash guard if x, y coordinates are outside grids
   if ((p.x_coord >= MAX_NUMBER_OF_GRIDS) || (p.y_coord >= MAX_NUMBER_OF_GRIDS))
   {
       return false;    // consider already loaded, skip
   }
   else
   {
       return ( getNGrid(p.x_coord, p.y_coord) && isGridObjectDataLoaded(p.x_coord, p.y_coord) );
   }
}

Link to comment
Share on other sites

Grid coordinates are never supposed to be "outside" grids in the first place. By checking for it, like this, you're just hiding a crash. You should rather assert it, and attempt to find the source of the problem.

Tranks XTZGZoReX for reply, some ideas where i can put de asserts to find source of problems?, in x and y coords? or better in what other variable?, so much ppl we have this diabolic crash and i want to help to find the source of problem =)

Best regards

P.D: Other same crash but taxi related: http://pastebin.com/9jg19LxZ

Link to comment
Share on other sites

  • 1 year later...

"#3 0x00000000007d062f in Unit::SendThreatRemove (this=0x7fff0a269970," long ago reported crash.

As i remember none one answer in original thread about what must happens with threat (not remember direct fix problem) but remember that from this has been dependent how need fix it. None answer, none time implement wrong way hacks ;)

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use