jMonkeyEngine / jmonkeyengine

A complete 3-D game development suite written in Java.
http://jmonkeyengine.org
BSD 3-Clause "New" or "Revised" License
3.78k stars 1.12k forks source link

Create Javadoc hint for Application#start() not returning on lwjgl3 #1275

Closed MeFisto94 closed 1 year ago

MeFisto94 commented 4 years ago

So, since we probably won't be able to fix this problem, at least not relatively short timed, it might be worth to add some knowledge to the wiki (@mitm001) and/or the javadoc for the start() methods.

Specifically on lwjgl2 one can choose: Return immediately or return after the context has been created. On lwjgl3, start() will return when the application has requested to quit (e.g. stop() has been called).

Another problem, I think, is that calling app.stop(true) will deadlock the application on lwjgl3, as it waits for context disposal, but this disposal happens after the update loop, which is locked due to passing true there.

That being said, lwjgl2 has the same problem there, I think.

Edit: The second part is a duplicate of #1257

Ali-RS commented 1 year ago

Specifically on lwjgl2 one can choose: Return immediately or return after the context has been created. On lwjgl3, start() will return when the application has requested to quit (e.g. stop() has been called).

Note, this has been fixed for a while now. Only on Linux and Windows. https://github.com/jMonkeyEngine/jmonkeyengine/pull/1690/files

stephengold commented 1 year ago

In my opinion, the actual fix was here:

https://github.com/jMonkeyEngine/jmonkeyengine/commit/40bb6483601c0aa26ae4f0d77bc965914a24528b

Ali-RS commented 1 year ago

I will update that Javadoc and mention that is only happening on mac os.