jMonkeyEngine / jMonkeyEngine/jmonkeyengine
LWJGL2 (and 3?): Calling stop(true) from within update() freezes
Open
@MeFisto94 is already working on this.
Since Jan 12, 2020.
bug
Easy first fix
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 14
Description
So, this is simple:
When calling stop(true), the context changes an AtomicBoolean and waits on a lock.
This AtomicBoolean is then read by the update loop after rendering, which tears down the context.
Now when calling stop(true) from inside the update loop, we're blocking the update loop and thus freeze everything. Since calling stop from the update loop is the most common thing, we might want to document this, as we can't properly change that fact or detect the callstack.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.