Hello Guest

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

  • 3 Replies
  • 1899 Views
[bug] Cocoa: Failed to find service port for display
« on: October 17, 2021, 10:44:49 »
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)

Code: [Select]
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();
}

*

Offline spasi

  • *****
  • 2229
    • WebHotelier
Re: [bug] Cocoa: Failed to find service port for display
« Reply #1 on: October 17, 2021, 18:53:20 »
Do these users happen to be on M1 Macbooks?

Re: [bug] Cocoa: Failed to find service port for display
« Reply #2 on: October 18, 2021, 06:04:49 »
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.

Re: [bug] Cocoa: Failed to find service port for display
« Reply #3 on: November 04, 2021, 06:38:58 »
On a similar note, M1 users are getting this:

[LWJGL] GLFW_PLATFORM_ERROR error

on std err.

Everything seems to run fine though.