can't run sketches anymore: Library

edited February 2016 in Using Processing

hello all,

1st I had missing gleugen...dll

now I have

Can't load library: C:\Users\XXXX\soft\processing\processing-3.0.1\natives\windows-amd64\nativewindow_awt.dll

I don't even have a folder C:\Users\XXXX\soft\processing\processing-3.0.1\natives let alone the stuff in the path coming then

also, the last \ is a double \

to cure it, I deleted processing and re-installed it - no use

all used to work fine....

What can I do?

Win 10, processing 3 (latest)

Answers

  • edited February 2016
    Warning: Caught Exception while retrieving executable temp base directory:
    java.io.IOException: Could not determine a temporary executable directory
        at com.jogamp.common.util.IOUtil.getTempDir(IOUtil.java:1287)
        at com.jogamp.common.util.cache.TempFileCache.<clinit>(TempFileCache.java:81)
        at com.jogamp.common.util.cache.TempJarCache.initSingleton(TempJarCache.java:88)
        at com.jogamp.common.os.Platform$1.run(Platform.java:309)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:287)
        at com.jogamp.nativewindow.NativeWindowFactory$2.run(NativeWindowFactory.java:183)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.nativewindow.NativeWindowFactory.<clinit>(NativeWindowFactory.java:180)
        at com.jogamp.newt.NewtFactory$1.run(NewtFactory.java:68)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.newt.NewtFactory.<clinit>(NewtFactory.java:65)
        at processing.opengl.PSurfaceJOGL.initIcons(PSurfaceJOGL.java:510)
        at processing.opengl.PSurfaceJOGL.initFrame(PSurfaceJOGL.java:129)
        at processing.core.PApplet.initSurface(PApplet.java:10379)
        at processing.core.PApplet.runSketch(PApplet.java:10266)
        at processing.core.PApplet.main(PApplet.java:10001)
    java.lang.UnsatisfiedLinkError: Can't load library: C:\Users\XXXX\soft\processing\processing-3.0.1\natives\windows-amd64\\nativewindow_awt.dll
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
        at java.lang.Runtime.load0(Runtime.java:809)
        at java.lang.System.load(System.java:1086)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:624)
        at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:63)
        at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:106)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:487)
        at jogamp.nativewindow.NWJNILibLoader.access$000(NWJNILibLoader.java:39)
        at jogamp.nativewindow.NWJNILibLoader$1.run(NWJNILibLoader.java:49)
        at jogamp.nativewindow.NWJNILibLoader$1.run(NWJNILibLoader.java:41)
        at java.security.AccessController.doPrivileged(Native Method)
        at jogamp.nativewindow.NWJNILibLoader.loadNativeWindow(NWJNILibLoader.java:41)
        at jogamp.nativewindow.jawt.JAWTUtil.<clinit>(JAWTUtil.java:336)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at com.jogamp.nativewindow.NativeWindowFactory$3.run(NativeWindowFactory.java:344)
        at com.jogamp.nativewindow.NativeWindowFactory$3.run(NativeWindowFactory.java:340)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.nativewindow.NativeWindowFactory.initSingleton(NativeWindowFactory.java:340)
        at com.jogamp.newt.NewtFactory$1.run(NewtFactory.java:68)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.newt.NewtFactory.<clinit>(NewtFactory.java:65)
        at processing.opengl.PSurfaceJOGL.initIcons(PSurfaceJOGL.java:510)
        at processing.opengl.PSurfaceJOGL.initFrame(PSurfaceJOGL.java:129)
        at processing.core.PApplet.initSurface(PApplet.java:10379)
        at processing.core.PApplet.runSketch(PApplet.java:10266)
        at processing.core.PApplet.main(PApplet.java:10001)
    A library relies on native code that's not available.
    Or only works properly when the sketch is run as a 32-bit application.
    
  • in the processing distro there are a bunch of jar files containing all the various library files for jogamp.

    when processing starts up, the relevant jar file is unzipped into a temporary directory and THAT is used by processing.

    but it looks like in your case it can't find anywhere to safely unzip the jar file. iirc it tries a few places and it needs correct permissions.

    (i'm on linux so i can't provide details. but see https://forum.processing.org/two/discussion/comment/60216/#Comment_60216 onwards )

    some people have had success removing the processing directory in their roaming profile (which i think is where their temp directory is, and which would explain why a reinstall didn't help)

  • (i've been tagging things like this with 'wontstart' so maybe look in the other threads for answers. i think there are a couple of different things going on with this and they are getting confused but it might help)

  • doesn't work yet

    which folders do I have to clean up?

    thanks

  • the troubleshooting faq also says to try

    .\processing.exe --l4j-debug

    to give a bit more visibility

  • edited February 2016
    • There has been lotsa "won't start" bug reports in Win10!
    • Seems like Windows 10 blocks some folders which Processing needs to access in order to run.
    • The interesting thing is that Processing isn't "officially" installed in the OS, b/c it's merely a ".zip" file that we can decompress & throw anywhere.
    • Notable exception is the MacOS version. Which got an actual installation. But it generates their own nasty bugs too due to it!
    • A workaround is trying to pinpoint the exact folder Processing needs and alter its permission. 8-|
  • So which folders does it need and how can I alter the permission

  • edited February 2016

    You're asking Linux users here 8)

    I don't think I've ever even touched a windows 10 computer.

  • Since I'm using my mom's laptop now, I'm on Win7 right now.
    However, I dunno exactly which folders Processing needs to access in order to run.
    Only Windows 10 is blocking them, whatever they are! >:)

  • well it used to work till this morning.

    so win 10 is not the issue.

    moreover the error in the thread koogs posted is different from mine

    it's either a temp file that can not be deleted or so....

    I re-installed processing, re installed java, killed java, updated my graphics card, killed all temp files

    no use ....

  • Answer ✓

    was looking up the error in processing github and found three issues:

    https://github.com/processing/processing/search?q=Caught+Exception+while+retrieving+executable+temp+base+directory&amp;type=Issues&amp;utf8=✓

    the first one points at the third one. the third blames avira antivirus...

  • Indeed, I use avira

    Thank you SO much

    I would never have found that....

  • and jogamp getTempDir source is here:

    http://grepcode.com/file/repo1.maven.org/maven2/org.jogamp.gluegen/gluegen/2.1.4/com/jogamp/common/util/IOUtil.java#IOUtil.getTempDir(boolean)

    // "java.io.tmpdir";
    final String java_io_tmpdir = PropertyAccess.getProperty(java_io_tmpdir_propkey, false);
    final String user_temp; // only if diff than java_io_tmpdir
    {
        String _user_temp = System.getenv("TMPDIR");
        if( !isStringSet(_user_temp) ) {
            _user_temp = System.getenv("TEMP");
        }
    ...
    

    seems convoluted...

  • interesting!

    I will try....

    If it runs....

    It seems btw. that 3D sketches don't run, a 2D sketch ran yesterday....

  • edited February 2016

    Ah, an anti-virus! For better or for worse, i don't use any anti-virus in this Win 7 laptop. :\">
    But I had to use 1 for my bro's Win 8.1 PC though. 8-X

  • step 1:

    the script for detecting the temp dir delivers cannot find anything named PropertyAccess:

    import java.io.*;
    import java.*;
    
    import java.lang.*;
    
    //import java.lang;
    
    // import property.*;
    
    
    
    // "java.io.tmpdir";
    final String java_io_tmpdir = PropertyAccess.getProperty(java_io_tmpdir_propkey, false);
    final String user_temp; // only if diff than java_io_tmpdir
    {
      String _user_temp = System.getenv("TMPDIR");
      if ( !isStringSet(_user_temp) ) {
        _user_temp = System.getenv("TEMP");
      }
    }
    
    
    // ...
    
  • SOLVED.

    it indeed was avira virus scanner

    (which is a little weird since processing used to run all the time and avira was on all the time but nvm)

    I had to add an exception via avirus' realtime scanner | configuration [not system scanner]

    the exception I had to add was c:\user\XXXX\Appdata\Local [not roaming btw]

    (which is still a little scaring to give such a broad exception to a virus sanner but here you go)

    @koogs thank you so much!!! My hero.

  • I believe the most specific folder would be: "%TMP%". *-:)
    Which would correspond to "C:\Users\XXXX\AppData\Local\Temp\" in your system. ;)

  • indeed.

    changed that!

    Did you notice btw that this temp folder is flooded with processing sketches??

    processing doesn't seem to have ANY measures to delete files on shut-down...

  • edited February 2016

    Since I had Win98SE, I've been using CCleaner to get rid of craps every OS reset:
    https://en.Wikipedia.org/wiki/CCleaner

    BtW, I've configured it to delete %TMP% files once they're 48 hours old! ;)

Sign In or Register to comment.