gopxl / pixel

A hand-crafted 2D game library in Go.
MIT License
225 stars 9 forks source link

I think this should be an issue for this repo? #83

Closed JoshPattman closed 8 months ago

JoshPattman commented 8 months ago

I have a program that opens and closes a lot of windows. This error popped up and asked to be reported.


GLFW: Please report this bug in the Go package immediately.
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```
dusk125 commented 8 months ago

This actually looks like an error from the glfw package, I would open this issue there.