Hello!

You know that popular crash that occurs due to faulty grid system introduced in cb19764d39. I tried several times to revert the commit but its simple too much conflicts - so thats probably the wrong way.

But I gathered some new useful info: it seems to be crashing when grid is either unloading or reloading (not sure), but you can increase the life of your server by increasing the Instance.UnloadDelay and possibly GridCleanUpDelay, it can affect your server performance and memory, though.

The crash is now reproducible easily. Just decrease the limits and see the crash... (there's hardcoded limit in world.cpp so you'll need to comment it out in order to lower the limit so you can reproduce the crash faster).

I'll do invest my best efforts to fix this annoying issue and you can help me too. We can do this together! This crash isn't an obvious one, so if you can some time and reproduce the crash and post here another backtraces or possibly try to find te bug yourself I'd be very grateful to you.

I'm don't know right now where the memory error is, but I got this backtrace so far: It's surely related to unloading/reloading a grid and adding an object to it and something before it gone wrong like it could not be properly deleted etc.

0xDA728C: Transport::SetDelayedAddModelToMap() (in /home/oregon/bin/oregon-core)
0xDA18AB: GameObject::AddToWorld() (GameObject.cpp:132)
0xDF229C: void AddObjectHelper<GameObject>(CoordPair<512u>&, GridRefManager<GameObject>&, unsigned int&, Map*, GameObject*) (ObjectGridLoader.cpp:91)
0xDF1AB8: void LoadHelper<GameObject>(std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> > const&, CoordPair<512u>&, GridRefManager<GameObject>&, unsigned int&, Map*) (ObjectGridLoader.cpp:112)
0xDF1437: ObjectGridLoader::Visit(GridRefManager<GameObject>&) (ObjectGridLoader.cpp:152)
0xDF24AC: void VisitorHelper<ObjectGridLoader, GameObject>(ObjectGridLoader&, ContainerMapList<GameObject>&) (TypeContainerVisitor.h:46)
0xDF246C: void VisitorHelper<ObjectGridLoader, GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > >(ObjectGridLoader&, ContainerMapList<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >&) (TypeContainerVisitor.h:52)
0xDF243F: void VisitorHelper<ObjectGridLoader, TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >(ObjectGridLoader&, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >&) (TypeContainerVisitor.h:59)
0xDF23FF: TypeContainerVisitor<ObjectGridLoader, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > > >::Visit(TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >&) (TypeContainerVisitor.h:70)
0xDF23CC: void Grid<Player, TypeList<Player, TypeList<Creature, TypeList<Corpse, TypeList<DynamicObject, TypeNull> > > >, TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >::Visit<ObjectGridLoader>(TypeContainerVisitor<ObjectGridLoader, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > > >&) (Grid.h:90)
0xDF1C50: void NGrid<8u, Player, TypeList<Player, TypeList<Creature, TypeList<Corpse, TypeList<DynamicObject, TypeNull> > > >, TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >::VisitGrid<ObjectGridLoader, TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >(unsigned int, unsigned int, TypeContainerVisitor<ObjectGridLoader, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > > >&) (NGrid.h:134)
0xDF1638: ObjectGridLoader::LoadN() (ObjectGridLoader.cpp:185)
Address 0x216586c0 is 64 bytes inside an unallocated block of size 240 in arena "client"
"A little hard-work never killed anyone important." - Abe

2 day uptime with GirdUnload = 0, but avg mem load about 3gb

yes memory does increase, but even without gridunload = 0 i have such crashes, but not that often, you can reduce it.. but still..

I don't really know hat happened but I can no longer reproduce this on latest rev. It's werid though since no big changes were made. Could you guys confirm this?

"A little hard-work never killed anyone important." - Abe

After the commit cb19764d39, it have another problem, that is the visible problem . when the team member run away ,but i see him next to me ? 

Expect solutions. thanks !

finally got one again > https://gist.github.com/dikkedeur/f6299 … 37ea9568ff

dont ask me how to reproduce, i dont know tongue

Is there any progress

well its a lucky shot to get the crashes nowadays.. so its hard to reproduce, if you know how to reproduce it now and get a good crashdump then please post it.

9 (edited by Vagabonden 2016-08-26 10:05:38)

Hello,

Is this still a problem?

But what would be best ? Instance.UnloadDelay with 3600000 or just put it to 0 if you have enough memory ?

If memory is no problem just set it to 0. (restart your server periodicaly for memory recycle)

BTW:
i suggest anyone to do scheduled restart on servers, not only for this reason, it makes a lot less problems if you do it.

for example for low populated server any week maybe at night (4 or 5) and on high populated server each day.

a short restart with ingame announce its ok for the most players (if there are anyone online at 04.00) and it takes normaly not even a minute to restart

desteny wrote:

If memory is no problem just set it to 0. (restart your server periodicaly for memory recycle)

BTW:
i suggest anyone to do scheduled restart on servers, not only for this reason, it makes a lot less problems if you do it.

for example for low populated server any week maybe at night (4 or 5) and on high populated server each day.

a short restart with ingame announce its ok for the most players (if there are anyone online at 04.00) and it takes normaly not even a minute to restart


Thanks, but dont i need to change the world.cpp? or ?

Yeah, im doing restart at 04:00 GMT 0 everyday.


But thanks for the fast replay, i think this should be a post that is pinned. Saved me alot in both ways.

you can do it by modifying the code world.cpp and / or other related files, but you can handle this as well in your operating system (win or unix) you need to make a script or task for this.

but as far as i know somebody has already posted here on forum the code for a restarter in cpp.
it the best way to handle it in OC directly