Hello Guest

40 Seconds to run glfwInit

  • 3 Replies
  • 971 Views
40 Seconds to run glfwInit
« on: September 29, 2018, 22:14:13 »
Hello, and i have been having a problem with my LWJGL Application.

It takes 40 seconds minimum to launch my application, and 0.74 seconds to load the jars. I have tried different types of JDK and all of them has the same result.
I have been looking trough the internet and trying to see if any of the issues have the same relation, but it seems it does not.

Looked it up, and it seems like glfwInit is taking up 40 seconds.

Code: [Select]
package com.thaun.game;

import static org.lwjgl.glfw.GLFW.*;

public class Main {

    public Main(){
        if(!glfwInit()){
            System.err.println("GLFW Failed to initialize");
        }
        System.out.println("GLFW Initialized");

        long window = glfwCreateWindow(640, 480, "Window", 0,0);
        System.out.println("Window Initialized");

        while(!glfwWindowShouldClose(window)){
            glfwPollEvents();
        }

        glfwTerminate();
        System.out.println("GLFW Terminated");
    }

    public static void main(String[] args){
        new Main();
    }
}

And the logs: https://gist.github.com/ThomasAunvik/a27f0a98a827497ec09713c98c3f88fa
« Last Edit: September 29, 2018, 22:34:38 by Thaun »

Re: 40 Seconds to run glfwInit
« Reply #1 on: September 29, 2018, 22:56:24 »
Well, after i tried rebooting my computer, it all worked again.

What a suprise...

EDIT: Aaand, a few minutes later it came back up to 40 seconds.
« Last Edit: September 29, 2018, 23:01:00 by Thaun »

*

Offline spasi

  • *****
  • 2054
    • WebHotelier
Re: 40 Seconds to run glfwInit
« Reply #2 on: September 30, 2018, 07:01:45 »
Hey Thaun,

Sounds like this issue might be relevant.

Re: 40 Seconds to run glfwInit
« Reply #3 on: September 30, 2018, 18:06:21 »
Problem is that there isnt a good solution.