lwjglgamedev / lwjglbook-leg

Source code of the chapters of the book 3D Game Development with LWJGL 3
https://ahbejarano.gitbook.io/lwjglgamedev/
Apache License 2.0
560 stars 202 forks source link

Crashing on Chapter 2 unexpectedly? #40

Closed EllisBarnes00 closed 7 years ago

EllisBarnes00 commented 7 years ago

I am fairly new to using LWJGL, and I keep getting this error. From what I can tell from reading under the THREAD section in the log, it seems to crash on Thread.run()

Here is the log file IntelliJ spits out at me: hs_err_pid18639.log

httpdigest commented 7 years ago

This is not the code from Chapter 1. You modified it apparently to run on its own thread. See the answer to your issue posted on the lwjgl3 repo: https://github.com/LWJGL/lwjgl3/issues/332

EllisBarnes00 commented 7 years ago
this.windowHandle = glfwCreateWindow(this.width, this.height, this.title, 1, 0);

Changing the above line of code to:

this.windowHandle = glfwCreateWindow(this.width, this.height, this.title, 0, 0);

fixes the issue. @sriharshachilakapati should get all the credit over on https://github.com/LWJGL/lwjgl3/issues/332