40 Seconds to run glfwInit

Started by Thaun, September 29, 2018, 22:14:13

Previous topic - Next topic

Thaun

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.

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

Thaun

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.

spasi

Hey Thaun,

Sounds like this issue might be relevant.

Thaun

Problem is that there isnt a good solution.