v3.3/glfw: CreateWindow can run into GLFW_NO_WINDOW_CONTEXT but doesn't accept it
JoshPattman opened this issue · 3 comments
JoshPattman commented
I have a program that opens and closes a lot of windows. This error popped up and asked to be reported.
panic: ErrorCode(65546): The specified window has no context
goroutine 1 [running, locked to thread]:
github.com/go-gl/glfw/v3.3/glfw.acceptError({0xc000323c28, 0x2, 0x40c425?})
/home/joshpattman/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20221017161538-93cebf72946b/error.go:178 +0x1e5
github.com/go-gl/glfw/v3.3/glfw.CreateWindow(0xb7e800?, 0xc000588a80?, {0xc000756c00?, 0x1?}, 0x0, 0xc0000a46c0)
/home/joshpattman/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20221017161538-93cebf72946b/window.go:350 +0x169
github.com/gopxl/pixel/pixelgl.NewWindow.func1()
/home/joshpattman/go/pkg/mod/github.com/gopxl/pixel@v1.0.0/pixelgl/window.go:164 +0x3d9
github.com/gopxl/pixel/pixelgl.NewWindow.CallErr.func3()
/home/joshpattman/go/pkg/mod/github.com/faiface/mainthread@v0.0.0-20171120011319-8b78f0a41ae3/mainthread.go:74 +0x22
github.com/faiface/mainthread.Run(0xc0006081c0)
/home/joshpattman/go/pkg/mod/github.com/faiface/mainthread@v0.0.0-20171120011319-8b78f0a41ae3/mainthread.go:44 +0xba
github.com/gopxl/pixel/pixelgl.Run(0xc000236090?)
/home/joshpattman/go/pkg/mod/github.com/gopxl/pixel@v1.0.0/pixelgl/run.go:32 +0x45
github.com/JoshPattman/gym.BeginRenderLoop(...)
/home/joshpattman/go/pkg/mod/github.com/!josh!pattman/gym@v0.0.2/rendering.go:15
main.main()
/home/joshpattman/Documents/Coding/Go/ai/rl-cartpole/main.go:24 +0x358
exit status 2
dmitshur commented
Thanks for reporting. This appears to be an upstream bug because glfwCreateWindow
isn't documented to be capable of returning the GLFW_NO_WINDOW_CONTEXT
error code.
Additional information would be helpful:
-
What OS and architecture did this happen on?
-
Does it still happen if you update to the latest
glfw
version,v0.0.0-20231223183121-56fa3ac82ce7
?
dmitshur commented
I think I see the problem at the tip GLFW commit. I filed glfw/glfw#2456 for that.
JoshPattman commented
Ok, thanks :) If it still helps, my OS is PopOS 22.04, with an AMD® Ryzen 7 3700x