diff --git a/AI/BattleAI/BattleAI.cpp b/AI/BattleAI/BattleAI.cpp index 37ba4f270..41a885b89 100644 --- a/AI/BattleAI/BattleAI.cpp +++ b/AI/BattleAI/BattleAI.cpp @@ -166,10 +166,6 @@ void CBattleAI::activeStack(const BattleID & battleID, const CStack * stack ) { throw; } - catch(std::exception &e) - { - logAi->error("Exception occurred in %s %s",__FUNCTION__, e.what()); - } if(result.actionType == EActionType::DEFEND) { diff --git a/client/battle/BattleInterface.cpp b/client/battle/BattleInterface.cpp index d534f0556..29519dc6f 100644 --- a/client/battle/BattleInterface.cpp +++ b/client/battle/BattleInterface.cpp @@ -729,7 +729,7 @@ void BattleInterface::requestAutofightingAIToTakeAction() // FIXME: unsafe // Run task in separate thread to avoid UI lock while AI is making turn (which might take some time) // HOWEVER this thread won't atttempt to lock game state, potentially leading to races - boost::thread aiThread([this, activeStack]() + boost::thread aiThread([battleID = this->battleID, curInt = this->curInt, activeStack]() { setThreadName("autofightingAI"); curInt->autofightingAI->activeStack(battleID, activeStack); diff --git a/lib/modding/IdentifierStorage.cpp b/lib/modding/IdentifierStorage.cpp index 4220687fa..e07af3eba 100644 --- a/lib/modding/IdentifierStorage.cpp +++ b/lib/modding/IdentifierStorage.cpp @@ -202,7 +202,7 @@ void CIdentifierStorage::tryRequestIdentifier(const std::string & type, const Js std::optional CIdentifierStorage::getIdentifier(const std::string & scope, const std::string & type, const std::string & name, bool silent) const { - assert(state != ELoadingState::LOADING); + //assert(state != ELoadingState::LOADING); auto options = ObjectCallback::fromNameAndType(scope, type, name, std::function(), silent); return getIdentifierImpl(options, silent);