Misleading Error Message

In response to the sticky on DLL loading issues:

Only the Type 1 error message is displayed. It’s taken me a long time to realize this. Look at the source (I did this for the first time today.) LibUtil eats the exception and throws a misleading exception.

public static void loadLibrary(String baseName)
    {
        try
        {
            System.loadLibrary(LibUtils.createLibName(baseName));
        }
        catch (Throwable t)
        {
            System.err.println("Error while loading native library with base name \""+baseName+"\"");
            System.err.println("Operating system name: "+System.getProperty("os.name"));
            System.err.println("Architecture         : "+System.getProperty("os.arch"));
            System.err.println("Architecture bit size: "+System.getProperty("sun.arch.data.model"));
            throw new UnsatisfiedLinkError("Could not load native library");
        }
    }

It would be nice if the original Throwable was added as the cause. If I followed the troubleshooting guide I would have never seen that I really had a Type 2 DLL problem. This makes total sense at this point because the laptop I’m playing on right now doesn’t support CUDA at all. (I will be playing with a laptop that does support it tonight.)

Hello

Thanks for this hint. It’s right, the stack trace of the original throwable should somehow be made available. However, It can not be the “cause” (because UnsatisfiedLinkError does not accept one), but I’ll think about how this could be solved.

bye
Marco