-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get an error when I try to flap #2
Comments
It's because the Input class with the glfw callback needs to be stored somewhere so it doesn't get garbage collected, you should create a property with type Input in the Main class, instanciate it, and assign it to the callback. That way, the instance of Input will be stored on memory and won't be collected by the gc |
@ochi12 is right. Do something like private Input input = new Input(); And then use it in the glfwSetKeyCallback(window, input); This should fix the problem |
Muchas gracias me sirvió de mucha ayuda!!! |
I'm getting an issue. I had some problems with his tutorial as a lot of things are updated. Could not find uniform variable 'ml_matrix'! Being printed out over and over again. |
Exception in thread "Game" org.lwjgl.system.libffi.ClosureError: Callback failed because the closure instance has been garbage collected.
at org.lwjgl.glfw.GLFW.glfwPollEvents(Native Method)
at com.example.kieran.SpaceHopper2.Main.update(Main.java:113)
at com.example.kieran.SpaceHopper2.Main.run(Main.java:92)
at java.lang.Thread.run(Unknown Source)
The text was updated successfully, but these errors were encountered: