[bug] Cocoa: Failed to find service port for display

Started by jakethesnake, October 17, 2021, 10:44:49

Previous topic - Next topic

jakethesnake

Not a lwjgl issue, I know. Just wondering if anyone has a workaround for this one. I get it on glfwInit. I suspect Apple are to blame. I don't have this issue, since I work on a real PC, but it's being reported to my by many mac owners.

[LWJGL] GLFW_PLATFORM_ERROR error
Description : Cocoa: Failed to find service port for display
Stacktrace :
org.lwjgl.glfw.GLFW.glfwInit(GLFW.java:830)
snake2d.GraphicsCardGetter.(GraphicsCardGetter.java:22)
snake2d.GraphicContext$Error.(GraphicContext.java:256)
snake2d.GraphicContext.(GraphicContext.java:56)
snake2d.CORE.create(CORE.java:90)
menu.Menu.start(Menu.java:53)
init.Main.main(Main.java:82)
init.MainLaunchLauncher.main(MainLaunchLauncher.java:6)

try {
			GLFWErrorCallback.createPrint(System.err).set();

			if (!glfwInit())
				throw new IllegalStateException("Unable to initialize GLFW");

			glfwDefaultWindowHints();
			glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);

			long window = NULL;
			window = glfwCreateWindow(300, 300, "test", NULL, NULL);
			
			if (window == NULL)
				throw new IllegalStateException("No window returned");

			glfwMakeContextCurrent(window);

			GL.createCapabilities();
			version = glGetString(GL_VENDOR) + ", " + glGetString(GL_RENDERER) + System.lineSeparator()
					+ "openGL max version: " + glGetString(GL_VERSION);
			glfwTerminate();
			glfwSetErrorCallback(null).free();
		}catch(Exception e) {
			e.printStackTrace(System.out);
			error = e.getMessage();
		}

spasi


jakethesnake

Quote from: spasi on October 17, 2021, 18:53:20
Do these users happen to be on M1 Macbooks?

I would very much suspect so. I've googled and get a lot of minecraft hits, and read somewhere that M1 doesn't have support, but I can't confirm this.

jakethesnake

On a similar note, M1 users are getting this:

[LWJGL] GLFW_PLATFORM_ERROR error

on std err.

Everything seems to run fine though.