Giter Club home page Giter Club logo

Comments (4)

Ramh5 avatar Ramh5 commented on August 26, 2024 1

Great many thanks for this tool.

from debug.

httpdigest avatar httpdigest commented on August 26, 2024

The exception means what it is saying: You are calling glfwInit in a thread other than the main thread. By definition, the main thread is the thread which initially calls your public static void main(String[] args) method. Somewhere in your code you are instantiating a new Thread and give it the name GAME_LOOP_THREAD.
While calling GLFW methods (such as glfwInit and glfwCreateWindow) in threads other than the main thread may work on Windows, it will definitely fail on Mac OS. The debug agent makes sure a program will work on all OS'es. And calling glfwInit will not work on Mac OS.
See the documentation of the GLFW functions, such as glfwInit (https://www.glfw.org/docs/latest/group__init.html#ga317aac130a235ab08c6db0834907d85e ) and look under the section "Thread safety".

from debug.

Ramh5 avatar Ramh5 commented on August 26, 2024

Thanks for the quick reply, we can close this question since I understand it is more a feature than a bug. As I knew what the GLFWInit documentation required it to run on the main thread, the code I got from a tutorial book is written like and is working on windows so I thought it was fine. I was more intrigued by the fact that it didn't work with the debug too activated. Now would it be desirable or even possible to have this debug tool only give you a warning that the code might not work on MacOS instead of crashing it?

Cheers.

from debug.

httpdigest avatar httpdigest commented on August 26, 2024

Now would it be desirable or even possible to have this debug tool only give you a warning that the code might not work on MacOS instead of crashing it?

Yes, there is the nothrow Option. Please see the README.md of this project.

from debug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.