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 on exit with MineClone 2 in "Host Server" mode #14313
Comments
Hence |
Proposed fix: diff --git a/src/server/clientiface.cpp b/src/server/clientiface.cpp
index 22e3e42d0..17363c91d 100644
--- a/src/server/clientiface.cpp
+++ b/src/server/clientiface.cpp
@@ -133,7 +133,7 @@ void RemoteClient::GetNextBlocks (
return;
PlayerSAO *sao = player->getPlayerSAO();
- if (!sao)
+ if (!sao || sao->isGone())
return;
// Won't send anything if already sending
diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp
index e0cf99378..113f6cb5d 100644
--- a/src/serverenvironment.cpp
+++ b/src/serverenvironment.cpp
@@ -1417,6 +1417,8 @@ void ServerEnvironment::step(float dtime)
PlayerSAO *playersao = player->getPlayerSAO();
assert(playersao);
+ if (playersao->isGone())
+ continue;
players.push_back(playersao);
}
@@ -1644,8 +1646,10 @@ void ServerEnvironment::step(float dtime)
continue;
PlayerSAO *sao = player->getPlayerSAO();
- if (sao && player->inventory.checkModified())
- m_server->SendInventory(sao, true);
+ if (sao && !sao->isGone()) {
+ if (player->inventory.checkModified())
+ m_server->SendInventory(sao, true);
+ }
}
// Send outdated detached inventories There might be more places that need this check. |
How |
FWIW and unrelated. MC2 hangs upon shutdown in singleplayer mode too. That is new. If I get some time tomorrow I'll track it down. Update: Stuck here:
I have multiple emerge threads. |
Steps to reproduce
Result
The text was updated successfully, but these errors were encountered: