Closed ArturKnopik closed 2 weeks ago
crash in another place
theforgottenserver-x64.exe!Tile::removeThing(Thing * thing=0x0000017250315860, unsigned int count=1) Line 1135 C++
theforgottenserver-x64.exe!Tile::addThing(int __formal=-1, Thing * thing=0x0000017250316790) Line 938 C++
theforgottenserver-x64.exe!Game::internalAddItem(Cylinder * toCylinder=0x00000172471ca040, Item * item=0x0000017250316750, int index=-1, unsigned int flags=0, bool test=false, unsigned int & remainderCount=0) Line 1368 C++
theforgottenserver-x64.exe!Game::internalAddItem(Cylinder * toCylinder=0x00000172471ca040, Item * item=0x0000017250316750, int index=-1, unsigned int flags=0, bool test=false) Line 1297 C++
theforgottenserver-x64.exe!Combat::combatTileEffects(const SpectatorVec & spectators={...}, Creature * caster=0x00000172447949a0, Tile * tile=0x00000172471ca040, const CombatParams & params={...}) Line 595 C++
theforgottenserver-x64.exe!Combat::doCombat(Creature * caster=0x00000172447949a0, const Position & position={...}) Line 742 C++
theforgottenserver-x64.exe!CombatSpell::castSpell(Creature * creature=0x00000172447949a0, Creature * target=0x0000017244794ef0) Line 315 C++
theforgottenserver-x64.exe!Monster::doAttacking(unsigned int interval=1000) Line 818 C++
theforgottenserver-x64.exe!Creature::onAttacking(unsigned int interval=1000) Line 177 C++
> theforgottenserver-x64.exe!Game::checkCreatures(unsigned __int64 index=3) Line 3863 C++
theforgottenserver-x64.exe!Game::checkCreatures::__l2::<lambda_1>::operator()() Line 3853 C++
[External Code]
theforgottenserver-x64.exe!Task::operator()() Line 23 C++
theforgottenserver-x64.exe!Dispatcher::threadMain() Line 39 C++
[External Code]
> theforgottenserver-x64.exe!Monster::addFriend(Creature * creature=0x00000213d8c02480) Line 310 C++
theforgottenserver-x64.exe!Monster::onCreatureFound(Creature * creature=0x00000213d8c02480, bool pushFront=false) Line 410 C++
theforgottenserver-x64.exe!Monster::updateTargetList() Line 376 C++
theforgottenserver-x64.exe!Monster::onCreatureAppear(Creature * creature=0x00000213d8c02480, bool isLogin=true) Line 148 C++
theforgottenserver-x64.exe!Game::placeCreature(Creature * creature=0x00000213d8c02480, const Position & pos={...}, bool extendedPos=false, bool forced=false, MagicEffectClasses magicEffect=CONST_ME_TELEPORT) Line 528 C++
theforgottenserver-x64.exe!Monster::onThinkDefense(unsigned int interval=1000) Line 988 C++
theforgottenserver-x64.exe!Monster::onThink(unsigned int interval=1000) Line 785 C++
theforgottenserver-x64.exe!Game::checkCreatures(unsigned __int64 index=1) Line 3862 C++
theforgottenserver-x64.exe!Game::checkCreatures::__l2::<lambda_1>::operator()() Line 3853 C++
[External Code]
theforgottenserver-x64.exe!Task::operator()() Line 23 C++
theforgottenserver-x64.exe!Dispatcher::threadMain() Line 39 C++
[External Code]
this one fail on
void Monster::addFriend(Creature* creature)
{
assert(creature != this); <<HERE
auto result = friendList.insert(creature);
if (result.second) {
creature->incrementReferenceCounter();
}
}
if (target->getMaster()) {
removeCreature(target);
return true;
}
adding this code there fix issue but im not sure if it's good place for fix...
it's looks like after killing master and summon in same time leaves some trashes(invalid pointer to creature)
Can you check if this pr #4803 resolves these crashes?
Tested for a while (10min) and no crash, before this fix it's take max 3min to get crash.
Tested for a while (10min) and no crash, before this fix it's take max 3min to get crash.
thanks!
By submitting this bug issue, you agree to the following.
Does this bug crash tfs?
yes
Server Version
1.7 (Master)
Operation System
all (listed below)
OS Description
No response
Bug description
Server crash when creature spawns
Possible Pull Requests which are to blame
No response
Steps to reproduce
Actual Behavior
Crash
Expected Behavior
No crash
Backtrace
Additional info
ReturnValue Tile::queryAdd(int32_t, const Thing& thing, uint32_t, uint32_t flags, Creature*) const