Tracy 0.13.1 + Fixed major memory issue#122
Open
RulHolos wants to merge 1 commit intoLegacy-LuaSTG-Engine:masterfrom
Open
Tracy 0.13.1 + Fixed major memory issue#122RulHolos wants to merge 1 commit intoLegacy-LuaSTG-Engine:masterfrom
RulHolos wants to merge 1 commit intoLegacy-LuaSTG-Engine:masterfrom
Conversation
- Fixed a major memory leak issue that leads to crashes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracy, by defaults, keeps the data of the traces it has since the engine's startup, so it can display them a long time after the engine started and still have all the infos. However, this introduced a major issue where, when calling tracy zones and other functions a lot of time, would lead to major increase in memory usage and memory leaks, eventually leading to a crash.
Even without enabling tracy link, the calls to the macro were still present in the code, leading to the same issue in debug and release versions of LuaSTG-Sub. This is a minor issue in normal gameplay, but when starting to play with worlds and other more intensive functions, it becomes a major issue. With testing a intensive game, we went up to more 5Gb+ memory usage.
Enabling the
TRACY_ON_DEMANDcompile definition intracy.cmakefixes the issue.I also took the opportunity to upgrade to tracy 0.13.1 which is more stable.