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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using two groups at the same time #35

Open
jptrzy opened this issue Aug 5, 2023 · 0 comments
Open

Using two groups at the same time #35

jptrzy opened this issue Aug 5, 2023 · 0 comments

Comments

@jptrzy
Copy link

jptrzy commented Aug 5, 2023

I don't get it, why doesn't it work 馃

Code:

...
{
    var group = world.group(.{ Position, Orbiting }, .{}, .{});
    var group_iter = group.iterator(struct { pos: *Position, orb: *Orbiting });

    while (group_iter.next()) |e| {
        ...
    }
}

{
    var group = world.group(.{ Position, Renderer }, .{}, .{});
    var group_iter = group.iterator(struct { pos: *Position, ren: *Renderer });

    while (group_iter.next()) |e| {
        ...
    }
}
...

Error Logs:

thread 258336 panic: reached unreachable code
/nix/store/ypzkr8d6sff2vcdjadcbblqdwjf1ia72-zig-0.12.0-dev.1+a327d8b99/lib/std/debug.zig:343:14: 0x342e6c in assert (z-space)
    if (!ok) unreachable; // assertion failure
             ^
/home/jp3/.local/src/z-space/libs/zig-ecs/src/ecs/registry.zig:530:33: 0x344d73 in group__anon_6485 (z-space)
                std.debug.assert(check);
                                ^
/home/jp3/.local/src/z-space/src/main.zig:74:36: 0x3424b4 in main (z-space)
            var group = world.group(.{ Position, Renderer }, .{}, .{});
                                   ^
/nix/store/ypzkr8d6sff2vcdjadcbblqdwjf1ia72-zig-0.12.0-dev.1+a327d8b99/lib/std/start.zig:564:22: 0x341dc9 in main (z-space)
            root.main();
                     ^
???:?:?: 0x7ffff7d1facd in ??? (libc.so.6)
Unwind information for `libc.so.6:0x7ffff7d1facd` was not available, trace may be incomplete

PS. Did you thought about adding better error messages - it would have been really helpful 馃槃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant