Prerequisites
Game Version
Bug Description
Playing the game for a while (especially on maps with lots of miscellaneous audio sources, such as Alpine Assault) will eventually lead to an m_refCount assertion failure in the AsciiString class. The issue can be reproduced faster if there is lots of looping audio playing, like ComancheAmbientLoop.
The source of the issue appears to be the val local static variable in GetRegistryLanguage becoming corrupted. As val is only assigned once early on in the program's lifecycle, its value becoming garbage is likely indicative of a memory overflow somewhere else in the program. The fact that the same assertion occurs twice at once might also be a clue (thread safety?).
The issue is observed with 100% certainty in both clean 32-bit Debug and 32-bit Release builds (the game will just silently freeze and close in the release build) as of the latest commit 94fe5e5 at the time of writing. The issue does not seem to occur in the retail version of the game.
Reproduction Steps
- Start a new Skirmish game on Alpine Assault as any USA
- Hit ALT+F to enter instant-build mode
- Build many Comanches (e.g. 150+) and leave them on-screen
- Wait between 1 - 5 in-game minutes
- Observe the eventual assertion error and the audio getting stuck
- For optional fun, ignore the assertion(s), select Restart Game and observe the game's UI textures going haywire
Additional Context
No response
Prerequisites
Game Version
Bug Description
Playing the game for a while (especially on maps with lots of miscellaneous audio sources, such as Alpine Assault) will eventually lead to an
m_refCountassertion failure in theAsciiStringclass. The issue can be reproduced faster if there is lots of looping audio playing, likeComancheAmbientLoop.The source of the issue appears to be the
vallocal static variable inGetRegistryLanguagebecoming corrupted. Asvalis only assigned once early on in the program's lifecycle, its value becoming garbage is likely indicative of a memory overflow somewhere else in the program. The fact that the same assertion occurs twice at once might also be a clue (thread safety?).The issue is observed with 100% certainty in both clean 32-bit Debug and 32-bit Release builds (the game will just silently freeze and close in the release build) as of the latest commit 94fe5e5 at the time of writing. The issue does not seem to occur in the retail version of the game.
Reproduction Steps
Additional Context
No response