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

[Crash] getParent() probably on collect reward #994

Closed
2 of 5 tasks
Zapotoczny opened this issue Apr 15, 2023 · 9 comments · Fixed by #997 or #1602
Closed
2 of 5 tasks

[Crash] getParent() probably on collect reward #994

Zapotoczny opened this issue Apr 15, 2023 · 9 comments · Fixed by #997 or #1602
Labels
Priority: High Represent a high impact in key areas of the base/user experience Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@Zapotoczny
Copy link

Zapotoczny commented Apr 15, 2023

Priority

High

Area

  • Datapack
  • Source
  • Map
  • Other

What happened?

It happens very rarely and I can't reproduce it

crash_14.log

Thread 2 (Thread 0x7ffff79ac700 (LWP 1032388)):
#0 0x00005555557e6d07 in Reward::getParent() const ()
No symbol table info available.
#1 0x00005555557f2750 in Item::getHoldingPlayer() const ()
No symbol table info available.
#2 0x000055555572243e in Player::checkLootContainers(Item const*) ()
No symbol table info available.
#3 0x00005555557e92c7 in .LTHUNK63.lto_priv.0 ()
No symbol table info available.
#4 0x00005555559d9d5c in std::map<unsigned long, Reward*, std::less, std::allocator<std::pair<unsigned long const, Reward*> > >::size_type std::__detail::__erase_nodes_if<std::map<unsigned long, Reward*, std::less, std::allocator<std::pair<unsigned long const, Reward*> > >, Player::removeEmptyRewards()::{lambda(auto:1 const&)#1}>(std::map<unsigned long, Reward*, std::less, std::allocator<std::pair<unsigned long const, Reward*> > >&, Player::removeEmptyRewards()::{lambda(auto:1 const&)#1}) [clone .isra.0] ()
No symbol table info available.
#5 0x00005555559cd515 in Actions::useItem(Player*, Position const&, unsigned char, Item*, bool) [clone .isra.0] ()
No symbol table info available.
#6 0x00005555557a3948 in Dispatcher::threadMain() ()
No symbol table info available.
#7 0x00007ffff7d096b4 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#8 0x00007ffff7fa6609 in start_thread (arg=) at pthread_create.c:477
ret =
pd =
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737347503872, 2277491176794939673, 140737488346366, 140737488346367, 140737488346368, 140737347436416, -2277509574247128807, -2277508747833056999}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
#9 0x00007ffff7b41133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

What OS are you seeing the problem on?

Linux

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Zapotoczny Zapotoczny added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Apr 15, 2023
@github-actions github-actions bot added Priority: High Represent a high impact in key areas of the base/user experience Status: Pending Test This PR or Issue requires more testing labels Apr 15, 2023
@Zapotoczny
Copy link
Author

@ElimarCosta It looked like I was crashing on the line you added in this commit #885

crash_16.log

@ElimarCosta
Copy link
Contributor

Do you have any clue on what can cause this? Any special event that occurred that day like boss invasion or something else that you remember? Please, if possible try to add some logs around those methods call like the position of the reward chest, player's name, bosses killed by that player and any other information that you believe it is needed.

@Zapotoczny
Copy link
Author

Zapotoczny commented Apr 17, 2023

Do you have any clue on what can cause this? Any special event that occurred that day like boss invasion or something else that you remember? Please, if possible try to add some logs around those methods call like the position of the reward chest, player's name, bosses killed by that player and any other information that you believe it is needed.

This happens when a lot of players kill one boss at once, and when the player goes to collect the reward for the chest reward, it's a crash. But not every player, I don't know what it depends on
But 90% it has something to do with the fact that a lot of people kill one boss
When a player causes the game to crash and the server restarts, they can then reopen normally

@ElimarCosta
Copy link
Contributor

Could you test this change? pr #997

@ElimarCosta
Copy link
Contributor

Forget it, that code doesn't make sense but it won't change anything on your case.

@ElimarCosta
Copy link
Contributor

Please, test this change on pr #997 and keep me informed!

@Zapotoczny
Copy link
Author

Please, test this change on pr #997 and keep me informed!

Works fine so far, seems to be a fix.

@ElimarCosta
Copy link
Contributor

Any updates on this subject? @Zapotoczny

@Zapotoczny
Copy link
Author

Any updates on this subject? @Zapotoczny

I haven't had a problem since then so I think it's been fixed

@murilo09 murilo09 removed the Status: Pending Test This PR or Issue requires more testing label May 4, 2023
dudantas added a commit that referenced this issue Sep 15, 2023
The crash occurred in very difficult scenarios, when the object's parent had been removed (for example, due to the decay of the boss's original body), which caused the reward container to lose the parent, but still remain in memory. From now on, we will set a new parent (the reward chest and the tile).

Fixes #994
Fixes #1147
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Represent a high impact in key areas of the base/user experience Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
3 participants