Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InstanceMap::Update crash #22770

Closed
ghost opened this issue Nov 6, 2018 · 30 comments
Closed

InstanceMap::Update crash #22770

ghost opened this issue Nov 6, 2018 · 30 comments

Comments

@ghost
Copy link

ghost commented Nov 6, 2018

Description: Crashed By Object

    Crash(formattedMessage.c_str());
    in GetMap ASSERTION FAILED:
    m_currMap
    obj = 0x7fff356bf000
    updater = {i_timeDiff = 100}
    world_object_update = {i_visitor = @0x7fff4d3fd600}
    grid_object_update = {i_visitor = @0x7fff4d3fd600}

https://gist.github.com/Hir0shi/c62dd95d2df07771dee28aa33f862842

Branch: 3.3.5

TC rev: d8fee3c
Operating system: debian

@jackpoz
Copy link
Member

jackpoz commented Nov 10, 2018

as the crashlog contains very few informations, this issue requires to rework what kind of informations we log when triggering an assert. I plan on opening a PR about it.

@jackpoz
Copy link
Member

jackpoz commented Nov 10, 2018

Btw @hir0shi it seems you have an old crashreport.gdb script, please get the new version at https://github.com/TrinityCore/TrinityCore/blob/3.3.5/contrib/debugger/crashreport.gdb

@sirikfoll
Copy link
Contributor

This crash seems to be the same as #21403
I have tried to investigate this, and so far I'm thinking thats something related to multithreading, because it makes no sense, in one line everything is ok, and on the next, whatever function call will cause a crash..
Also, afaik, it only happens in Naxxramas.

@jackpoz
Copy link
Member

jackpoz commented Nov 10, 2018

it's more likely it's Naxxramas script being buggy then multithreading. Do you have any crashlog about it ?

@sirikfoll
Copy link
Contributor

https://gist.github.com/sirikfoll/e9b2c695754629ddb353e73bb111d9df (It'd not clean, i had some things here and there to try and get more info)
I know It's in Naxxramas because I had added a variable to catch mapId, seen by "debugMapID = 533" in the log.
Also know it can crash in anything you put under WorldObject::GetGridActivationRange, or even before that call, i had added some logs just above here, and it crashed as well

CellArea area = Cell::CalculateCellArea(obj->GetPositionX(), obj->GetPositionY(), obj->GetGridActivationRange());

@Aokromes
Copy link
Member

ofc no, there is no mob with that value on clean tdb 3.3.5a.

@ghost
Copy link

ghost commented Nov 11, 2018

TrinityCore rev. be47254 2018-11-09 20:51:20 +0100 (3.3.5 branch) (Win64, RelWithDebInfo, Static)

SELECT * FROM `creature_template` WHERE `BaseAttackTime` = 0;

Result: 0 row(s)

I suspect there is more custom content in Hir0shi's source and DB than we know.

@jackpoz
Copy link
Member

jackpoz commented Nov 11, 2018

if the issue happens in Naxxramas it would be really helpful if someone could run the instance in debug mode and post the crashlog (or even with Address Sanitizer)

@ghost
Copy link
Author

ghost commented Nov 12, 2018

@jackpoz

full tested instance naxxramas and crash for , boss = Thaddius

https://gist.github.com/Hir0shi/e7eca1dddfe5f7815f0a168552546a27

@jackpoz
Copy link
Member

jackpoz commented Dec 1, 2018

anyone was able to repro the issue in Debug to get a detailed crashlog ? maybe even with Address Sanitizer ?

@TheWinchesters
Copy link
Contributor

I have had people doing Naxxramas and no crashs so far

@ghost
Copy link
Author

ghost commented Dec 27, 2018

Player cheat on, going for the last boss , objects It activates and server will to crashed.

@Faq
Copy link
Contributor

Faq commented Dec 27, 2018

@hir0shi where is new crashlog?

@ghost
Copy link
Author

ghost commented Dec 28, 2018

@ghost
Copy link

ghost commented Dec 29, 2018

That is the crash log from 2018-11-12 (12. November).
You commented as if you had a new crash, so Faq wanted to see the new crash log.

Player cheat on, going for the last boss , objects It activates and server will to crashed.

@jackpoz
Copy link
Member

jackpoz commented Jan 4, 2019

anyone was able to repro the issue in Debug to get a detailed crashlog ?

anyone ?

@jackpoz
Copy link
Member

jackpoz commented Jan 19, 2019

still waiting for a crash log in Debug

@TheWinchesters
Copy link
Contributor

@jackpoz I will recompile in debug mode and I'll give it a try.
If I understand correctyl, Thaddius is the target to test.

@jackpoz
Copy link
Member

jackpoz commented Jan 19, 2019

even clear How To Reproduce steps would be nice, once we have those we can repro it in Debug and get a nice crash report

@TheWinchesters
Copy link
Contributor

I am sorry, I can not try anything with Thaddius because he disappears after killing Feugen & Stalagg, even If I kill all the other bosses in the right order.
What am I missing?

@jackpoz
Copy link
Member

jackpoz commented Jan 20, 2019

Thaddius script looks like a huge hack with setActive() calls (and of course no comments about why those are needed)

@jackpoz
Copy link
Member

jackpoz commented Jan 20, 2019

There are some leftovers from 184c45c too (starting 200 things and not finishing any...), maybe it's the cause of the issue. Thaddius reset for me also

@opiums9
Copy link

opiums9 commented Jan 23, 2019

@ghost
Copy link

ghost commented Jan 23, 2019

@opiums9 : Even if your logs are fine (debug logs with BACKTRACE), I noticed they are based on ElunaTrinityWotlk source and therefore may contain non-TC material.

I also took a brief look at https://github.com/ElunaLuaEngine/ElunaTrinityWotlk and noticed that https://github.com/ElunaLuaEngine/ElunaTrinityWotlk/blob/master/README.md does not contain any references to the ElunaLuaEngine/ElunaTrinityWotlk source, only pointers to TC, as well as no issue tracker on ElunaLuaEngine/ElunaTrinityWotlk (we can blame @Rochet2 for this) :-P

(They could be disregarded by TC members, even if I would hope there could be something at all useful in them.)

@jackpoz
Copy link
Member

jackpoz commented Apr 25, 2019

was anyone able to reproduce the issue with TC build in debug mode ?

@jackpoz jackpoz changed the title Crash Server By Object InstanceMap::Update crash Apr 25, 2019
@jackpoz
Copy link
Member

jackpoz commented Apr 25, 2019

same issue as #21403 most likely

@sirikfoll
Copy link
Contributor

Although I can't reproduce this crash, I'm pretty sure the problem here is that you can't call
DespawnOrUnsummon before setActive(false);
Just swapping the order of those calls in Thadius script is working for me

@jackpoz
Copy link
Member

jackpoz commented Apr 26, 2019

Please meet the Thaddius crash:
image

@jackpoz
Copy link
Member

jackpoz commented Apr 26, 2019

strangely enough the crashing object doesn't have any of the typical VC++ magic numbers, maybe the memory was reused already before it crashed

image

There are only 2 objects in the setActive() list, the crashing one and a "Living Poison" TempSummon https://wotlk.evowow.com/npc=16027

@jackpoz
Copy link
Member

jackpoz commented Apr 27, 2019

Fixed in 1c833f2

@jackpoz jackpoz closed this as completed Apr 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants