-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
Strange valgrind error #1453
Labels
bug
Something isn't working
Comments
Reduced the example to: struct Connected
{
int SomeValue = 0;
};
struct PlayerWorldStates
{
char largeArray[4096];
std::unordered_set<int> Inventory{};
};
int main(int argc, char *argv[]) {
flecs::world GameWorld;
GameWorld.defer_begin();
GameWorld.entity()
.set<Connected>({})
.set<PlayerWorldStates>({});
GameWorld.defer_end();
} Looks like an issue with batching & deferred setting of non-trivial large components. |
SanderMertens
added a commit
that referenced
this issue
Dec 17, 2024
SanderMertens
added a commit
that referenced
this issue
Dec 17, 2024
Fixed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
During testing of my game server I ran valgrind on my tests and the debug binary, both exhibited this valgrind error:
To Reproduce
Steps to reproduce the behavior:
Compile the following code and run it under valgrind (or just replace the test with a main function):
Expected behavior
Valgrind should not find any leaks
Additional context
I suspect there's something going on with namespaces and modules, so I left it in, you can probably reduce it further. There seems to be something in particular about std::array. Playing with the array sizes, or removing them from various structs would cause the leak to disappear. It's all very peculiar and I can't really figure out what magic incantation will or will not cause the leak to exhibit itself with out trying various combinations.
Hopefully your knowledge of flecs internals will help you, because I see nothing wrong!
The text was updated successfully, but these errors were encountered: