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

filter_builder() assert fail, when use term().or_() #1169

Closed
hallomorld opened this issue Mar 12, 2024 · 2 comments
Closed

filter_builder() assert fail, when use term().or_() #1169

hallomorld opened this issue Mar 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@hallomorld
Copy link

hallomorld commented Mar 12, 2024

Describe the bug
filter_builder() assert fail, when use
.term().or_()
.term()
This issue is problematic in flecs 3.2.10 or later. The old version works fine.

To Reproduce
Steps to reproduce the behavior:
flecs 3.2.10 or more new
`

  #include <flecs.h>
  
  struct TagA {
  };
  
  struct StructB {
      int i = 0;
  };
  
  int main(int argc, char *argv[]) {
  
      flecs::world w;
      w.component<TagA>();
      w.component<StructB>();
  
      auto filter = w.filter_builder<>()
              .term<TagA>().or_()
              .term<StructB>()
              .build();
  
      filter.each([](flecs::iter &iter, size_t index) {});
  
      w.app().run();
      return 0;
  }

`

Expected behavior
fatal: filter.c: 1391: assert: filter_terms <= term_count INTERNAL_ERROR

@hallomorld hallomorld added the bug Something isn't working label Mar 12, 2024
@SanderMertens
Copy link
Owner

Oh wow, that's a bad one to fly under the radar of the test suite! Taking a look.

@SanderMertens
Copy link
Owner

Fixed!

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
None yet
Development

No branches or pull requests

2 participants