Unable to convert large files from SD card: Out of Memory Error

I'm trying to open a large file I recorded on the SD card during an 8 hours of sleep. In order to translate the file I know I have to open the OpenBCI GUI within processing, which works fine. I go through the steps (playback from file -- convert SD for playback), but when I select my file, I fairly quickly get the error pasted below. I went to the processing prefs and changed the "increase maximum available memory" from 256 to 1600, but it makes no difference. I HAVE succeeded in translating and opening a very small test file (maybe 5 minutes of data), so the problem seems to be simply file size. In the folder where the translated versions end up I do see files from my attempts to translate... but they are all 7.6mb. So it is as if the process starts fine, but conks out after a mere 7.6mb. Any idea of how I can fix this, or is the OpenBCI software just not suitable for large, long sleep-data files? (like, 700-800mb)? 

Thanks in advance!

Here's the error

java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
at processing.opengl.PSurfaceJOGL$2.run(PSurfaceJOGL.java:412)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:3664)
at java.lang.StringBuffer.toString(StringBuffer.java:669)
at java.io.BufferedReader.readLine(BufferedReader.java:327)
at java.io.BufferedReader.readLine(BufferedReader.java:389)
at OpenBCI_GUI.convertSDFile(OpenBCI_GUI.java:7396)
at OpenBCI_GUI$ControlPanel.update(OpenBCI_GUI.java:3087)
at OpenBCI_GUI.systemUpdate(OpenBCI_GUI.java:1024)
at OpenBCI_GUI.draw(OpenBCI_GUI.java:485)
at processing.core.PApplet.handleDraw(PApplet.java:2437)
at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:859)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Ben, hi. Can you log this issue here,


  • Hi - done. You can delete it from here if you like. Thanks for your help - I've finally downloaded virtual box and will try to translate the file using the SpiSOP software, which promises to be able to do so. Can any of the other programs do this translation?
  • wjcroftwjcroft Mount Shasta, CA
    The source code section is mentioned in this thread. 


  • Thanks W, I found that too and looked at the code. Unfortunately it's a bit beyond my skillset at the moment... I do think it would be great to have that translator as a separate tool, for those of us who want to use the saved data files in various programs more than using the device live.

    Thanks for looking that up though.  I think I'm going to stick to non-SD recordings for the time being. Maybe I'll pester people on the Processing forums and see if it just something to do with my own settings or something.

    For anybody else who happens to read this with similar problems (odd that it's only me!?), SpiSOP does seem to have an SD format translator (https://www.spisop.org/downloads/). Trouble for me is that it is for Windows. So I'm trying to set up VirtualBox and get the SpiSOP software running, but that has been a bit of a headache too, and it is nice outside. I guess nothing great ever came easy!

    Thanks again.
  • Hi,
    I don't know if you resolved your problem to convert and/or play long EEG recording like sleep recording (8 hours) and manage file up to 800Mo.

    In fact i succeed (after several failed attempts) by increasing the memory allocated in processing 3: you find it in file/preferences.
     I increase the amount of Mo until it works and I can now say that to play a 12hours EEG recording (one channel; 250Hz) you have to set it at : 16 384MB !!!!!

    but it works now !!!! this soft is really great ! (at least on a dell workstation with 16Go RAM !!)

    Xav

Sign In or Register to comment.