Processing GUI, "unknown functions", libraries path

edited August 2016 in OpenBCI_GUI
Can you help?

I'm trying to compile the openbci processing gui software as described in the start-up documentation. I am running processing 2.1.1 for windows 7 with 64 bit processor. I get compilation errors when trying to run the software. For example setvisible in controlpanel is labelled as an unknown function so I replaced it with show and hide, further errors occur within menulist. Obviously I'm using the wrong processing software what version should I be using?

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Maland, hi.  It sounds like you might not have all the libraries in place.

    (For one thing, the current version is 2.2.1)

    Did you download the two libraries and install in the Processing\libraries location?  You'll get unknown functions if you have not satisfied all the external references.

    William

  • Hey guys,

    I have the same problem.I downloaded both gwoptics and controlp5. I have them in the Processing/libraries folder as well as the sketch folder. The error message reads as:

    'The function setVisible does not exist'

    and it references:

            systemMode != 10){
                dataSourceBox.draw();
                drawStopInstructions = false;
                cp5.setVisible(true);
                if(eegDataSource == 0){

          etc....
  • Hi @array,

    Did you use the ControlP5 library that came with the OpenBCI_Processing repository?  If you used the one from the original author, it doesn't work.  You have to use the one in the OpenBCI_Processing repo.

    Copy it over to the Processing/libraries folder as before, restart Processing, and see if that works.

    If you are using the one from the OpenBCI_Processing repo, post back here and we'll see if we can track down the problem.

    Chip

  • edited November 2014

    Yes I have an identical directory set up i.e. processing directory with the libraries directory containing controlP5 and gwoptics (taken from the OpenBCI git hub) and the same libraries placed in the OpenBCI directory.

    Now I get a different problem when running the open BCI sketch, this time a window is drawn (presumably the live application)

    the window freezes and processing outputs a load of Java error messages.

    Here is where I ask a silly question. Do I need live data to run this sketch? At the moment I'm still waiting for the arrival of the hardware! Will the program except test data from a file?

    Out of interest here are some of the Java errors, (I would copy the errors as they are but I don't know how to copy and paste them out of the errors window).

    Java.lang.nullpointerexception

    then errors about missing fonts

    then

    Java.lang.runtimeexception: Java.lang.nullpointerexception

    Malcolm.


     


  • Hi Malcom,

    You do not need an OpenBCI board to run the GUI...once it successfully launches, you have the option to choose "Playback" of prerecorded data.

    As for the nullpointer exceptions, one sees those a lot when variables haven't been (or can't be) created for one reason or another.  Are you running on Mac or PC?  Which version of Processing are you using?

    Chip
  • edited November 2014
    Hey chipaudette

    I tried using the GitHub repository, but I get the same error. Perhaps I have my directories set up incorrectly? That's the only thing I can think of. The directions say:

    1. Download Processing
    2. Download GWOptics and ControlP5 Libraries
    3. Unzip the libraries and put them in the /Processing/libraries/ folder.
    4. Download the OpenBCI_Processing Github Repository: git clone https://github.com/OpenBCI/OpenBCI_Processing.git









    However, it never mentions where
    /Processing/libraries folder should go. Should it go in
    /OpenBCI_Processing-master or /processing2.2.1? Or somewhere else? 

    Perhaps this has nothing to do with it.

  • edited November 2014
    Ah, excellent question.

    The Processing libraries (ControlP5 and gwoptics) must be placed in the one spot where Processing will look.  Processing has a standard place where it looks for libraries.  That's where you have to put these two libraries.

    Confusingly, this standard location is not related to where you've installed Processing nor is it related to where you have placed the OpenBCI files.  You have to manually move the libraries to this one special location on your computer. 

    On a Windows computer, Processing looks for libraries in "My Documents" under "Processing\libraries\".  Or, to give the full path on my own computer, I placed the two libraries so that it looks like this:

    C:\Users\Chip\Documents\Processing\libraries\controlP5\
    C:\Users\Chip\Documents\Processing\libraries\gwoptics\

    I'm not sure what it would look like on a Mac.  To find out, I went to Processing's own reference pages and found this page:


    It says that, on a Mac, you'd manually put these two libraries in ~/Documents/Processing.

    Hopefully this helps!

    Chip

  • Thank you, Chip!

    That's all that needed to be done! Everything seems to be working fine, GUI-wise. That may have been a very simple error, but I am not a maker nor programmer, so thank you very much! I'll test the hardware now to confirm whether or not everything is in working order.
  • Chip,

    I am using processing 2.2.1 running on Windows 7 64bit. I've placed the controlp5 gwoptics under my documents\processing\libraries. When I ran Openbci_gui it said it coundn't find the libraries so I placed them in the Openbci directory as well. Now it returns with the error

    could not run the sketch (target  VM failed to initialise)

    getting desperate,

    Malcolm




  • edited November 2014
    It's disturbing that it said that it couldn't find the libraries, even when you've placed them in the right place.  When you went to copy the libraries over, did there already exist the directory "My Documents\Processing\Libraries\" or did you have to create it?  If you've ever run Processing before, that directory should have existed...if not, something is definitely weird.

    And your error "could not run the sketch (target  VM failed to initialize)" is also very weird.  It sounds like a problem with Processing itself, or with the Java engine running underneath Processing.

    In Processing, can you run any Processing sketch at all?  Try some of the examples that come with Processing.  They're under Processing's "File" Menu, under "Examples".  There are TONS of example programs there...too many, in fact.  I like the interactive ones, so close up the tree and then look just for Topics->Drawing and try any of those.  Once running, they're built to respond to your mouse and to your clicking, so play around with them to make sure that they seem to function.

    If they do NOT work, you've got a problem with Processing or with Java.  If they do work, we'll have to keep digging.

    Chip

  • CHIP,

    PANIC OVER ITS WORKING. PROCESSING SEEMS TO LIKE THE LIBRARIES AND THE SKETCHBOOK UNDER MY DOCUMENTS. WHERE YOU PUT THE PROCESSING FILES DOESN'T SEEM TO MATTER. I'VE INSTALLED THEM ON C:\PROCESSING AND CREATED A PROCESSING\LIBRARIES UNDER MY DOCUMENTS. MAYBE I SHOULD HAVE PUT EVERYTHING IN MY DOCUMENTS? ANYWAY I'LL LEAVE IT FOR NOW - QUIT WHILE I'M AHEAD!

    THANKS FOR YOUR HELP.

    MALCOLM




  • biomurphbiomurph Brooklyn, NY
    Processing looks for libraries in the path
    documents/processing/libraries
    and it looks for your sketches in the path
    documents/processing

    could that be the problem?
  • Chip,
    I believe the path you gave is only partially correct, when I downloaded processing it came in as a zip file, when I extract this zip, there is no folder called libraries, which made me explore (it is lib instead at the root in case you were curious).

    I figured the correct path for processing to find these libraries is inside the mode>java as shown below

    C:\PlayTime\OpenBCI\processing-2.0.3\modes\java\libraries\<your libraries here>

    Also a pointer, please do not download the 64 bit processing as the "ser" module is incompatible with that.
    A pointer for good programming: please do not use obscure fonts inside the code unless you plan to package and ship them, Now my GUI is stuck at :
    Stable Library
    =========================================
    Native lib Version = RXTX-2.1-7
    Java lib Version   = RXTX-2.1-7
    Problem createFont(Raleway-SemiBold.otf)
    java.awt.FontFormatException: Unsupported sfnt C:\Users\Dhruv\AppData\Local\Temp\+~JF1606733624524682047.tmp

    I installed the required fonts and the error still won't go away
    I am using Windows8.1 64bit with a 32 bit processing 2.0.3 (in case you are wondering how to get the old version, just hack the download link: here it is for convenience http://download.processing.org/processing-2.0.3-windows32.zip)

    I'll update when I get it working
    Regards
    Dhruv
  • Hi Dhruv,

    Regarding the "libraries" path in "My Documents", it gets created by Processing the first time that you run Processing.  It is not created when you unzip the downloadable ZIP file, so that's probably why you didn't see it.

    As for the fonts, that's a good recommendation.  I'm no longer the primary developer of the GUI, but I'll be sure to point our your comment to Conor.

    Also, as I mentioned on the other thread, consider using Processing V2.2.1 as an upgrade past the old V2.0.3....V2.2.1 seems to work fine for me on my 64-bit Win7 PC.

    Chip
  • Hi Chip,
    Thanks again for following up and pointing me to the My Documents part of the application, I would have never looked there :) 
    Regarding the fonts, I did a search on *.otf and found that those fonts were actually a part of the git, I just have to ensure they get picked up now.
    Cheers,
    Dhruv

  • Dhruv

    i had similar problem w/ both arduino and processing 2.2.1 -32 bit windows 7. changed name from libraries to libraries.old ...its now "found" in sketchbook as libraries.old. tho libraries is still in the folder it is not found.
  • edited October 2015
    Hi,
    I'm having the
    "Could not run the sketch (Target VM failed to initialize).
    For more information, read revisions.txt and Help ? Troubleshooting."
    problem.

    Here's what I've done on Win XP SP3 32b:
    1.Downloaded Processing 2.2.1 and unzipped it into C:\Program Files
    2.Ran it once. It created Processing under C:\...\My Documents
    3.Downloaded OpenBCI_Processing-master.zip and unzipped it
    4.Copied OpenBCI_GUI to C:\...\My Documents\Processing
    5.Copied controlP5 and gwoptics from OpenBCI_Processing-master\libraries to C:\...\My Documents\Processing\libraries
    6.Double clicked OpenBCI_GUI.pde in C:\...\My Documents\Processing\OpenBCI_GUI. Processing opened and loaded the sketch
    7.Clicked the Run button
    =====>>>>>>
    Got the error message above
    =====>>>>>>

    Repeated all this twice with removal of all software in between.

    Please help!

    PS Processing examples run fine
  • On another machine with Win 7.1 64b I got a bit further:
    After installation, ran the sketch and got a black window with the cursor changing to a hand in the top left corner.
    There're also some messages in the console.

    Please help!
  • This problem with the Win7 machine is solved - the issue was old graphic drivers. With their update to recent ones (6/15) proper functioning was  restored.

    The Win XP machine probably also has too old drivers, but unfortunately newer drivers for recent OpenGL are unavailable. Need to think how to circumvent this. Any ideas are most welcome.
Sign In or Register to comment.