You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the game engine I'm working on, using C++20 and std::format, it seems like the Tracy profiler encounters a "Memory free event without a matching allocation" when using std::format(std::locale(""), "{:L}", 10).
For reference, here are the operators we overloaded:
I'm assuming you did a global new and delete override, or even more tricky a global malloc() and free() override. Might be an internal allocation happening in the standard C++ library, which gets executed before Tracy's static initializers ran. These are super hard to fix. Tracy has an option to ignore those errors, however this option is not yet user controllable. You can modify Tracy source code here:
So far our workaround has been to avoid using std::locale("") when tracy memory profiling is enabled. We're definitely looking for a more future-proof solution, so we'll look into that recommendation.
I've update the issue description to include the operators we tried to overload.
Description
On the game engine I'm working on, using C++20 and
std::format
, it seems like the Tracy profiler encounters a "Memory free event without a matching allocation" when usingstd::format(std::locale(""), "{:L}", 10)
.For reference, here are the operators we overloaded:
It works fine when using
std::locale()
, which defaults to theC
locale.Note:
std::locale("")
being the user's locale (from its regional settings). In my case, it'sen_US
Expected Behaviour
Not sure, is it a false positive, or is there something wrong with
std::format
?Environment
MSVC: Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34438 for x86
The text was updated successfully, but these errors were encountered: