Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ashley-1.3.1: possible stackoverflow error when processing entity operations #103

Closed
junkdog opened this issue Oct 29, 2014 · 3 comments
Closed
Labels

Comments

@junkdog
Copy link
Contributor

junkdog commented Oct 29, 2014

A StackOverflowError may occur when performing operations on a large-ish number of entities in one go. This wasn't the case during 1.2.0 and earlier. I haven't tested it against the current HEAD yet.

java.lang.StackOverflowError
    at com.badlogic.ashley.core.Engine.processPendingEntityOperations(Engine.java:377)
    at com.badlogic.ashley.core.Engine.removeEntityInternal(Engine.java:303)
    at com.badlogic.ashley.core.Engine.processPendingEntityOperations(Engine.java:383)
    at com.badlogic.ashley.core.Engine.removeEntityInternal(Engine.java:303)
    at com.badlogic.ashley.core.Engine.processPendingEntityOperations(Engine.java:383)
    at com.badlogic.ashley.core.Engine.removeEntityInternal(Engine.java:303)
    at com.badlogic.ashley.core.Engine.processPendingEntityOperations(Engine.java:383)
    at com.badlogic.ashley.core.Engine.removeEntityInternal(Engine.java:303)
    at com.badlogic.ashley.core.Engine.processPendingEntityOperations(Engine.java:383)
    at com.badlogic.ashley.core.Engine.removeEntityInternal(Engine.java:303)
    at com.badlogic.ashley.core.Engine.processPendingEntityOperations(Engine.java:383)
    ...

This is the benchmark that throws the exception - it happens when deleting/creating 4k entities during one processing round (the benchmark in question acts on 1/4 of the total number of entities, it fails when entityCount = 16384 (java 8) and entityCount = 65536 (java 7)).

@dsaltares dsaltares added the bug label Oct 29, 2014
@dsaltares
Copy link
Member

I've seen this at some point but I believe it was fixed... Maybe it's a different issue. I don't believe anything related to this has been fixed post 1.3.1 so I'll look into it as soon as I can.

Thanks for reporting!

@dsaltares
Copy link
Member

Is this a call to removeEntity() or does it come from a removeAllEntities()? If it's the latter, it might be a duplicate of #101. Stacktraces are different but that user is using the headless backend, don't know if it could be a factor.

@junkdog
Copy link
Contributor Author

junkdog commented Oct 29, 2014

I'll look into it as soon as I can.

I have a couple of hours at my disposal now, I could have a go at it now if you wish? I noticed the stack overflow error when I came into the office this morning (was running the benchmarks overnight), so didn't have time to do anything about it then.

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

No branches or pull requests

2 participants