Player logout and summon disappear.
Crash
Latest build of TFS 1.3
Related to #2173 but it is crashing for another reason.
Backtrace:
http://pastebin.com/z6nM8Jsp
I can't reproduce
@Kamenuvol That is weird, it happens all the times and I tested like 10 times.
Downloaded the executable from https://ci.appveyor.com/project/kornholi/forgottenserver/build/1.0.389/job/m46qdj81k943f1f9/artifacts
And using the latest data pack (with the summon spell modifications.)
Was unable to reproduce, tested with fire elemental and monk using utevo res
@Mkalo Which Windows are you using?
I can reproduce. Compiling in a docker VM.
Backtrace:
http://pastebin.com/z6nM8Jsp
@Kamenuvol Tested in windows 7 and ubuntu 16.04, it crashes in both.
I can confirm this issue.

Using Windows Seven 64 bits.
I really don't understand why it's happening for you and not for me using same .exe file from appveyor. What is causing that? Now I want to solve the mystery 馃
Can't reproduce too.
Reproduced on latest Ubuntu with the exact same backtrace as given.
@Kamenuvol @ranisalt Did you guys download exactly from https://ci.appveyor.com/project/kornholi/forgottenserver/build/1.0.389/job/m46qdj81k943f1f9/artifacts ?
You know that the latest build in the list https://ci.appveyor.com/project/kornholi/forgottenserver also shows pull requests and you might just have downloaded my fixed version of the pull request. At least that's what happened with @Vulcanx.
I don't have Windows, but @dspeichert says he has reproduced on Ubuntu too.
Unless I'm reading @Mkalo's GDB dump incorrectly, the segmentation fault is happening at the line summon->setAttackedCreature(nullptr); in:
for (Creature* summon : summons) {
summon->setAttackedCreature(nullptr);
summon->setMaster(nullptr);
}
which implies summon is a nullptr. Which means the summon isn't being removed. Upon making sure the summon is actually removed when necessary (#2191), it wouldn't hurt to do a nullptr check:
for (Creature* summon : summons) {
if (!summon) {
continue;
}
summon->setAttackedCreature(nullptr);
summon->setMaster(nullptr);
}
Please, try to print the summon list size on the destructor before this loop.
@jo3bingham summon is never nullptr, delete doesn't make every pointer to that object a nullptr.
@Mkalo A segmentation fault happens when trying to access an invalid memory address, which implies that summon is invalid in some way (usually a nullptr).
A wild crash has appeared:
http://pastebin.com/M89EkwYu
My Fix in #2190 has the same problem tho. Fixed.
This happens for another reason poitned out by an user in otland in here

Both crashes were gone when I reverted https://github.com/otland/forgottenserver/commit/5ba1ef3926695237a8da3d969bd99e779a0ae7f1

Most helpful comment
Backtrace:
http://pastebin.com/z6nM8Jsp