Skip to content

fix(debug): Fix Release logging in tools #1397

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

Merged
merged 1 commit into from
Aug 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Core/Tools/ImagePacker/Source/WinMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ Int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, Int nCmdShow )
{

// start the log
DEBUG_INIT(DEBUG_FLAGS_DEFAULT);
// initialize the memory manager early
initMemoryManager();

// save application instance
Expand Down Expand Up @@ -114,9 +113,7 @@ Int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
delete TheImagePacker;
TheImagePacker = NULL;

// close the log
shutdownMemoryManager();
DEBUG_SHUTDOWN();

// all done
return 0;
Expand Down
5 changes: 1 addition & 4 deletions Core/Tools/MapCacheBuilder/Source/WinMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ Int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, Int nCmdShow )
{

// start the log
DEBUG_INIT(DEBUG_FLAGS_DEFAULT);
// initialize the memory manager early
initMemoryManager();

try
Expand Down Expand Up @@ -325,9 +324,7 @@ Int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
DEBUG_CRASH(("Munkee munkee!"));
}

// close the log
shutdownMemoryManager();
DEBUG_SHUTDOWN();

// all done
return 0;
Expand Down
5 changes: 1 addition & 4 deletions Generals/Code/Tools/GUIEdit/Source/WinMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ Int APIENTRY WinMain(HINSTANCE hInstance,
}
::SetCurrentDirectory(buffer);

// start the log
DEBUG_INIT(DEBUG_FLAGS_DEFAULT);
// initialize the memory manager early
initMemoryManager();

// register a class for our window with the OS
Expand Down Expand Up @@ -275,9 +274,7 @@ Int APIENTRY WinMain(HINSTANCE hInstance,
delete TheEditor;
TheEditor = NULL;

// close the log
shutdownMemoryManager();
DEBUG_SHUTDOWN();

return msg.wParam;

Expand Down
7 changes: 3 additions & 4 deletions Generals/Code/Tools/WorldBuilder/src/WorldBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ BOOL CWorldBuilderApp::InitInstance()
// initialization
_set_se_translator( DumpExceptionInfo ); // Hook that allows stack trace.

// start the log
DEBUG_INIT(DEBUG_FLAGS_DEFAULT);
// initialize the memory manager early
initMemoryManager();

DEBUG_LOG(("starting Worldbuilder."));
#ifdef RTS_DEBUG
DEBUG_LOG(("RTS_DEBUG defined."));
#endif
initMemoryManager();
#ifdef MEMORYPOOL_CHECKPOINTING
gFirstCP = TheMemoryPoolFactory->debugSetCheckpoint();
#endif
Expand Down Expand Up @@ -644,7 +644,6 @@ int CWorldBuilderApp::ExitInstance()
TheMemoryPoolFactory->debugMemoryReport(REPORT_FACTORYINFO | REPORT_CP_LEAKS | REPORT_CP_STACKTRACE, gFirstCP, lastCP);
#endif
shutdownMemoryManager();
DEBUG_SHUTDOWN();

return CWinApp::ExitInstance();
}
Expand Down
5 changes: 1 addition & 4 deletions GeneralsMD/Code/Tools/GUIEdit/Source/WinMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ Int APIENTRY WinMain(HINSTANCE hInstance,
}
::SetCurrentDirectory(buffer);

// start the log
DEBUG_INIT(DEBUG_FLAGS_DEFAULT);
// initialize the memory manager early
initMemoryManager();

// register a class for our window with the OS
Expand Down Expand Up @@ -275,9 +274,7 @@ Int APIENTRY WinMain(HINSTANCE hInstance,
delete TheEditor;
TheEditor = NULL;

// close the log
shutdownMemoryManager();
DEBUG_SHUTDOWN();

return msg.wParam;

Expand Down
6 changes: 2 additions & 4 deletions GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ BOOL CWorldBuilderApp::InitInstance()
// initialization
_set_se_translator( DumpExceptionInfo ); // Hook that allows stack trace.

// start the log
DEBUG_INIT(DEBUG_FLAGS_DEFAULT);
// initialize the memory manager early
initMemoryManager();

#ifdef DEBUG_LOGGING
// Turn on console output jba [3/20/2003]
Expand All @@ -293,7 +293,6 @@ BOOL CWorldBuilderApp::InitInstance()
#ifdef RTS_DEBUG
DEBUG_LOG(("RTS_DEBUG defined."));
#endif
initMemoryManager();
#ifdef MEMORYPOOL_CHECKPOINTING
gFirstCP = TheMemoryPoolFactory->debugSetCheckpoint();
#endif
Expand Down Expand Up @@ -667,7 +666,6 @@ int CWorldBuilderApp::ExitInstance()
TheMemoryPoolFactory->debugMemoryReport(REPORT_POOLINFO | REPORT_POOL_OVERFLOW | REPORT_SIMPLE_LEAKS, 0, 0);
#endif
shutdownMemoryManager();
DEBUG_SHUTDOWN();

return CWinApp::ExitInstance();
}
Expand Down
Loading