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

Relationship addition breaks if 30 or 31 different component types have been added to the World first #26

Open
LilithSilver opened this issue Oct 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@LilithSilver
Copy link

This is a really finicky one, but I finally got a usable repro. As far as I can tell, the number of entities is irrelevant, and the number of components is irrelevant; it's entirely based on 30-31 different components first existing in the World.

With Sourcegen, those components can be instead simply located in a [Query], either in the attribute or as a parameter to the query method. Then, the construction of the enclosing class triggers the component types to be added to the world.

One aspect to perhaps also test is to see if it breaks if the number of components added is 62 or 63. But I didn't try that.

Here is a test that demonstrates the issue:
RelationshipManyComponents.zip

Two important notes:

  • You need to right click and run each test case individually, like so:
    image
    I don't know why the behavior changes when all the tests are run (they either all succeed or all fail depending on if you're debugging), but that issue should be fixed before this test is added to the suite. I didn't have any luck splitting it up into other methods, either, even with Nunit's [NonParallelizable] on each method.

  • This is ONLY present in Arch 1.2.6.8-alpha (not 1.2.6.7); Arch.Extended isn't updated to require that package version yet. If you're running the test, you need to change the version in Arch.Relationships.csproj to fetch the correct version from Nuget.

Any ideas? I assume it has something to do with an allocation failure on some 33rd bit somewhere...?

@genaray genaray added the bug Something isn't working label Oct 3, 2023
@genaray
Copy link
Owner

genaray commented Oct 3, 2023

Thanks for letting me know and your effort! :)
I will take a look at this once I'm home! ^^

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
Status: Todo
Development

No branches or pull requests

2 participants