jMonkeyEngine / jMonkeyEngine/jmonkeyengine

LWJGL2 (and 3?): Calling stop(true) from within update() freezes

Open
#1,257 1 comment 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.