-
Notifications
You must be signed in to change notification settings - Fork 145
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
Issue Deleting Entities During System Update and Using Listeners in 1.2 #64
Comments
I believe this could be related to issue #44. Can you please try the same but using the nightly builds or source rather than the 1.2.0 release? I suspect this is now fixed. Thanks! |
If you made changes after the release, then it probably is fixed. I'll test it later this week when I get chance to get the most recent source. Thanks, Dana |
I just tested this with 1.2.1-SNAPSHOT. Right now this test results in a never ending loop as soon as the first remove is executed. The only output is "system has: 10 entities." Tested on 9-18-2014. Thanks Dana |
Will add a unit test and take a look at this over the weekend. Thanks. |
Just added a test (as you can see in the issue updates) but it's passing just fine. I made the test from your code. Can you please check it and make sure it's testing what you wanted? |
Hi, My test still fails with the infinite loop issue. One thing I noticed that is different with your test is that it does not test the PooledEngine. I think this issue is specific with the PooledEngine, and deletion of entities during the update. Thanks, Dana |
Actually, the test IS using Engine engine = new PooledEngine(); |
In your test - I noticed earlier that you were creating the entity with new Entity() instead of using engine.createEntity(). That probably caused the reset() method and freeing of the Entity in the Poolable code to also be skipped. Thanks, Dana |
Alright, got it now, I believe it's now fixed. Could you please pull from master and test? Thanks. |
Great! I'll test it tomorrow. Thanks |
Hi, I confirmed the test was fixed. But now I am getting a different issue. Will debug it further to determine if it is an issue with Ashley or my game code. Thanks, Dana |
Awesome, I will close this issue, you can open a new one if you discover a new bug :-). |
The issue was in my code. The latest Ashley snapshot version appears to be working great. Thanks, |
Hi,
I have an unusual issue discovered in Ashley 1.2. I discovered it while trying to incorporate the new Family option for the Listeners. I started getting NullPointerExceptions when the Entity entered the entityRemoved() method of the Listener. I later determined that a component was always missing if the Entity was deleted during the update. I am not sure if this is a bug - but it does appear to be inconsistent -since the component is present when deleted outside of the System update.
Here is an example of the issue:
output:
system has: 10 entities.
there is no position component while removing, is this a bug?
there is no position component while removing, is this a bug?
there is no position component while removing, is this a bug?
position component detected while removing
position component detected while removing
position component detected while removing
position component detected while removing
position component detected while removing
position component detected while removing
position component detected while removing
Thanks,
Dana
The text was updated successfully, but these errors were encountered: