Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Sep 30, 2025

Merge with Rebase

This change fixes asserts in AsciiStringToQuotedPrintable (and UnicodeStringToQuotedPrintable). Seen during map cache generation. I think user facing this did not cause bugs.

 	ucrtbased.dll!548c4586()	Unknown
 	[Frames below may be incorrect and/or missing, no symbols loaded for ucrtbased.dll]	
 	ucrtbased.dll!548cb672()	Unknown
 	ucrtbased.dll!548cb581()	Unknown
 	ucrtbased.dll!548cb933()	Unknown
>	generalszh.exe!AsciiStringToQuotedPrintable(AsciiString original) Line 98	C++
 	generalszh.exe!MapCache::writeCacheINI(bool userDir) Line 397	C++
 	generalszh.exe!MapCache::updateCache() Line 457	C++
 	generalszh.exe!isValidMap(AsciiString mapName, bool isMultiplayer) Line 1001	C++
 	generalszh.exe!SkirmishPreferences::getPreferredMap() Line 296	C++
 	generalszh.exe!SkirmishGameOptionsMenuInit(WindowLayout * layout, void * userData) Line 1374	C++
 	generalszh.exe!WindowLayout::runInit(void * userData) Line 117	C++
 	generalszh.exe!Shell::doPop(bool impendingPush) Line 717	C++
 	generalszh.exe!Shell::shutdownComplete(WindowLayout * screen, bool impendingPush) Line 765	C++
 	generalszh.exe!ScoreScreenShutdown(WindowLayout * layout, void * userData) Line 404	C++
 	generalszh.exe!WindowLayout::runShutdown(void * userData) Line 119	C++
 	generalszh.exe!Shell::pop() Line 419	C++
 	generalszh.exe!ScoreScreenSystem(GameWindow * window, unsigned int msg, unsigned int mData1, unsigned int mData2) Line 546	C++
 	generalszh.exe!GameWindowManager::winSendSystemMsg(GameWindow * window, unsigned int msg, unsigned int mData1, unsigned int mData2) Line 705	C++
 	generalszh.exe!GadgetPushButtonInput(GameWindow * window, unsigned int msg, unsigned int mData1, unsigned int mData2) Line 218	C++
 	generalszh.exe!GameWindowManager::winSendInputMsg(GameWindow * window, unsigned int msg, unsigned int mData1, unsigned int mData2) Line 724	C++
 	generalszh.exe!GameWindowManager::winProcessMouseEvent(GameWindowMessage msg, ICoord2D * mousePos, void * data) Line 919	C++
 	generalszh.exe!WindowTranslator::translateGameMessage(const GameMessage * msg) Line 242	C++
 	generalszh.exe!MessageStream::propagateMessages() Line 1112	C++
 	generalszh.exe!GameEngine::update() Line 1014	C++
 	generalszh.exe!Win32GameEngine::update() Line 90	C++
 	generalszh.exe!GameEngine::execute() Line 1096	C++
 	generalszh.exe!GameMain() Line 52	C++
 	generalszh.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 903	C++
 	generalszh.exe!invoke_main() Line 107	C++
 	generalszh.exe!__scrt_common_main_seh() Line 288	C++
 	generalszh.exe!__scrt_common_main() Line 331	C++
 	generalszh.exe!WinMainCRTStartup(void * __formal) Line 17	C++
 	kernel32.dll!7781fcc9()	Unknown
 	ntdll.dll!77bb82ae()	Unknown
 	ntdll.dll!77bb827e()	Unknown

The second commit refactors the code a bit.

TODO

  • Add pull id to commits
  • Replicate in Generals

@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour Fix Is fixing something, but is not user facing labels Sep 30, 2025
Copy link

@Skyaero42 Skyaero42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@xezon xezon force-pushed the xezon/fix-mapcache-assert branch from ae2c4b6 to 26e6366 Compare October 8, 2025 17:01
@xezon
Copy link
Author

xezon commented Oct 8, 2025

Replicated in Generals without conflicts

@xezon xezon merged commit 6d10c91 into TheSuperHackers:main Oct 8, 2025
18 checks passed
xezon added a commit that referenced this pull request Oct 8, 2025
@xezon xezon deleted the xezon/fix-mapcache-assert branch October 8, 2025 17:29
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix Is fixing something, but is not user facing Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash after upgrading to C++20 in MSVC32 when loading maps with unusual characters in mapchache.ini

2 participants