Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Problems with running on macos #11

Open
infirms opened this issue Jan 13, 2021 · 2 comments
Open

Problems with running on macos #11

infirms opened this issue Jan 13, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@infirms
Copy link
Collaborator

infirms commented Jan 13, 2021

Tested on: Mac Os Big Sur ( last version )
The compilation process is successful. haven't encountered problems with it.

The main problem is that starting the progressia.jar nothing happens at all, not even a crash. Java terminal appears on main bar on the desktop, but you can't even close terminal itself or interact with it.

All my actions:

  1. Clone Progressia GitHub repository.
  2. Install Adopt JDK ( 11 LTS).
  3. Build Progressia with gradlew.
  4. Attempt to launch progressia.jar
@nullkat nullkat added bug Something isn't working help wanted Extra attention is needed labels Jan 13, 2021
@Red-Teapot
Copy link

Red-Teapot commented Jan 2, 2022

So, I did some testing. However, it was done on QEMU running MacOS 11.6 on non-Apple hardware.

When launching Progressia on Java 1.8, I got a segfault. Haven't managed to get it working at all.

When launching the game on Java 17, I got the same behavior as described by the OP: dead silence.

Apparently, you have to do rendering on the main thread in Mac OS, and to achieve that, a couple things are required:

  1. Launch the game with -XstartOnFirstThread JVM flag.
  2. Do rendering on the main Java thread. As of writing this comment, it is done in a separate thread in Progressia.

This is briefly mentioned in the LWJGL guide and on LWJGL GitHub.

Based on that, I managed to get a white window showing by modifying the GraphicsBackend class:

private static void startRenderThread() {
    renderThread = new RenderThread();
    renderThread.run();
    //renderThread.start();
}

This is not a correct fix but to me it indicates we're on the right track. I tried to refactor the startup code so it would render the game on the main thread but couldn't get it to work yet.

@OLEGSHA
Copy link
Owner

OLEGSHA commented Jan 2, 2022

Thanks for such an informative contribution! We're still waiting on more tests on Apple hardware, if anyone's interested.

Just as a reminder for my future self, here's the LWJGL javadoc for glfwCreateWindow which lists part of this and some other compat issues: GLFW.glfwCreateWindow(int,int,java.lang.CharSequence,long,long).

@OLEGSHA OLEGSHA removed the help wanted Extra attention is needed label Jan 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants