diff --git a/source/glest_game/facilities/game_util.cpp b/source/glest_game/facilities/game_util.cpp index cb50c0a45..8f7e9e694 100644 --- a/source/glest_game/facilities/game_util.cpp +++ b/source/glest_game/facilities/game_util.cpp @@ -26,7 +26,7 @@ using namespace Shared::Platform; namespace Glest{ namespace Game{ const string mailString= "contact_game@glest.org"; -const string glestVersionString= "v3.3.5-beta7.6"; +const string glestVersionString= "v3.3.5-beta7.7"; string getCrashDumpFileName(){ return "glest" + glestVersionString + ".dmp"; diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 5f474f55e..3b49a11ea 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -411,6 +411,7 @@ int glestMain(int argc, char** argv){ if(config.getBool("AllowGameDataSynchCheck","false") == true) { vector techDataPaths = config.getPathListForType(ptTechs); preCacheThread.reset(new FileCRCPreCacheThread()); + preCacheThread->setUniqueID(__FILE__); preCacheThread->setTechDataPaths(techDataPaths); preCacheThread->start(); } diff --git a/source/glest_game/main/program.cpp b/source/glest_game/main/program.cpp index c69fc98b4..ab356bbb9 100644 --- a/source/glest_game/main/program.cpp +++ b/source/glest_game/main/program.cpp @@ -404,6 +404,7 @@ void Program::init(WindowGl *window, bool initSound, bool toggleFullScreen){ BaseThread::shutdownAndWait(soundThreadManager); delete soundThreadManager; soundThreadManager = new SimpleTaskThread(&SoundRenderer::getInstance(),0,50); + soundThreadManager->setUniqueID(__FILE__); soundThreadManager->start(); } } diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 8d185b912..63a36927e 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -313,6 +313,7 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu, b chatManager.init(&console, -1,true); publishToMasterserverThread = new SimpleTaskThread(this,0,25); + publishToMasterserverThread->setUniqueID(__FILE__); publishToMasterserverThread->start(); SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__); @@ -324,11 +325,11 @@ MenuStateCustomGame::~MenuStateCustomGame() { MutexSafeWrapper safeMutex(&masterServerThreadAccessor); needToBroadcastServerSettings = false; needToRepublishToMasterserver = false; + safeMutex.ReleaseLock(); //BaseThread::shutdownAndWait(publishToMasterserverThread); delete publishToMasterserverThread; publishToMasterserverThread = NULL; - safeMutex.ReleaseLock(); SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__); } @@ -339,6 +340,8 @@ void MenuStateCustomGame::returnToParentMenu(){ MutexSafeWrapper safeMutex(&masterServerThreadAccessor); needToBroadcastServerSettings = false; needToRepublishToMasterserver = false; + bool returnToMasterServerMenu = parentMenuIsMs; + safeMutex.ReleaseLock(); //BaseThread::shutdownAndWait(publishToMasterserverThread); delete publishToMasterserverThread; @@ -346,9 +349,6 @@ void MenuStateCustomGame::returnToParentMenu(){ SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__); - bool returnToMasterServerMenu = parentMenuIsMs; - safeMutex.ReleaseLock(); - if(returnToMasterServerMenu) { SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__); mainMenu->setState(new MenuStateMasterserver(program, mainMenu)); @@ -385,11 +385,12 @@ void MenuStateCustomGame::mouseClick(int x, int y, MouseButton mouseButton){ MutexSafeWrapper safeMutex(&masterServerThreadAccessor); needToBroadcastServerSettings = false; needToRepublishToMasterserver = false; + safeMutex.ReleaseLock(); + //BaseThread::shutdownAndWait(publishToMasterserverThread); delete publishToMasterserverThread; publishToMasterserverThread = NULL; - safeMutex.ReleaseLock(); SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__); returnToParentMenu(); @@ -440,10 +441,10 @@ void MenuStateCustomGame::mouseClick(int x, int y, MouseButton mouseButton){ needToBroadcastServerSettings = false; needToRepublishToMasterserver = false; + safeMutex.ReleaseLock(); //BaseThread::shutdownAndWait(publishToMasterserverThread); delete publishToMasterserverThread; publishToMasterserverThread = NULL; - safeMutex.ReleaseLock(); SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__); diff --git a/source/glest_game/network/connection_slot.cpp b/source/glest_game/network/connection_slot.cpp index 5690c53d2..2bb9a51eb 100644 --- a/source/glest_game/network/connection_slot.cpp +++ b/source/glest_game/network/connection_slot.cpp @@ -159,6 +159,7 @@ ConnectionSlot::ConnectionSlot(ServerInterface* serverInterface, int playerIndex this->socket = NULL; this->slotThreadWorker = NULL; this->slotThreadWorker = new ConnectionSlotThread(this->serverInterface); + this->slotThreadWorker->setUniqueID(__FILE__); this->slotThreadWorker->start(); this->ready = false; diff --git a/source/shared_lib/sources/platform/common/base_thread.cpp b/source/shared_lib/sources/platform/common/base_thread.cpp index 10302dabb..564d020c4 100644 --- a/source/shared_lib/sources/platform/common/base_thread.cpp +++ b/source/shared_lib/sources/platform/common/base_thread.cpp @@ -68,14 +68,14 @@ bool BaseThread::getQuitStatus() { } bool BaseThread::getRunningStatus() { - SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,uniqueID.c_str()); + //SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,uniqueID.c_str()); bool retval = false; MutexSafeWrapper safeMutex(&mutexRunning); retval = running; safeMutex.ReleaseLock(); - SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] uniqueID [%s] running = %d\n",__FILE__,__FUNCTION__,__LINE__,uniqueID.c_str(),retval); + //SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] uniqueID [%s] running = %d\n",__FILE__,__FUNCTION__,__LINE__,uniqueID.c_str(),retval); return retval; }