Skip to content
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

Component added in seperate worlds, as singleton and then as entity causes assert. #778

Closed
nicokruger opened this issue Aug 1, 2022 · 1 comment
Labels
bug Something isn't working
Projects

Comments

@nicokruger
Copy link

Describe the bug
Adding a component in two different worlds, once as a singleton and once on an entity causes an assert, on latest master (after API change)

To Reproduce

#include "flecs.h"

struct Resources
{
  int _dummy = 0;
};

int main()
{
  flecs::world ecs1;
  ecs1.singleton<Resources>().set<Resources>({});

  flecs::world ecs2;
  ecs2.entity().set<Resources>({});

}

Expected behavior
Not sure if this is the exact assert as in my game, but hoping it is related. Specifically, after upgrading to latest master am seeing crashes on my upgrade screen where I instantiate a seperate world to show the user a preview as they select their upgrade.

Additional context
Probably a new issue introduced recently on master.

@nicokruger nicokruger added the bug Something isn't working label Aug 1, 2022
@SanderMertens
Copy link
Owner

Fixed!

@SanderMertens SanderMertens added this to To do in v3 via automation Aug 2, 2022
@SanderMertens SanderMertens moved this from To do to Done in v3 Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
v3
  
Done
Development

No branches or pull requests

2 participants