Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in start_stream:GENERAL_ERROR from Brainflow when Output to BDF+ (Cyton) and Brainflow streaming is not disabled #1105

Closed
stellarpower opened this issue Jan 16, 2023 · 2 comments
Labels
backend bdf-output Related to saving file as a BDF file brainflow

Comments

@stellarpower
Copy link

Problem

Opening a live session from a Cyton, with Wifi.

The data stream is unable to start when:

  • The output format for the Cyton recording (older functionality) is BDF+, not "OpenBCI" (ASCII/CSV)
  • And the Brainflow streaming to file is enabled (which it is, by default)

Nothing starts in the time series plot, and I get a backtrace to stderr.

On that note - if an exception has been thrown in opening the session/the capture, or some similar error detected, it would probably be good to feed this back to the user with a short message in a modal dialogue, asking them to check the logs using the button.

BDF+, with Brainflow enabled

Console Log Started at Local Time: 2023-01-16_00-51-33
Screen Resolution: 1600 X 900
High-DPI Screen Detected: false
Operating System and Version: Linux - 5.15.0-46-generic
Welcome to the Processing-based OpenBCI GUI!
For more information, please visit: https://docs.openbci.com/Software/OpenBCISoftware/GUIDocs/
OpenBCI_GUI::Setup: GUI v5 Sample Data exists in Documents folder.
Settings: LogFileMaxDuration = 60 minutes
OpenBCI_GUI::Settings: Found and loaded existing GUI-wide Settings from file.
ControlP5 2.3.4 infos, comments, questions at https://github.com/retiutut/controlp5
TopNav: Internet Connection Successful
Local Version: v5.1.0, Latest Version: v5.1.0
GUI is up to date!
BrainFlow Version: fce5573c9456f5216a457fc66171b28a175e8b95
OpenBCI_GUI: AuditoryFeedback: Loading Audio...
OpenBCI_GUI: AuditoryFeedback: Done Loading Audio!
OpenBCI_GUI::Control Panel: Playback history file not found.
OpenBCI_GUI::Setup: Setup is complete!
[ERROR]: OpenBCI_GUI: This application is not being run with Administrator access. This could limit the ability to connect to devices or read/write files.
sourceList: click! 
OpenBCI_GUI: Channel count set to 8
OpenBCI_GUI: Channel count set to 16
[DEFAULT]: Output has been set to BioSemi Data Format (BDF+).
[DEFAULT]: Wifi Devices Refreshing
ControlPanel: User selected Cyton+WiFi 250Hz
wifiList: click! 
[DEFAULT]: Selected WiFi Board: OpenBCI-08E7, WiFi IP Address: 192.168.0.108
[DEFAULT]: Attempting to Start Session...
initButtonPressed: Calling initSystem() after next draw()
OpenBCI_GUI: Start session. Calling initSystem().


=================================================
||             INITIALIZING SYSTEM             ||
=================================================

Sending config string to board: ~6
OpenBCI_GUI: Configuring Cyton Channel Count...
OpenBCI_GUI: Channel count set to 16
"Arial" is not available, so another font will be used. Use PFont.list() to show available fonts.
InitSettings: Saving Default Settings to file!
SessionSettings: 3 active widgets saved!
[SUCCESS]: Session started!
[DEFAULT]: openBCI_GUI: startButton was pressed. Starting data transfer, wait a few seconds.
OpenBCI_GUI: openNewLogFile: opened BDF output file: /home/ben/Documents/OpenBCI_GUI/Recordings/OpenBCI-BDF-2023-01-16_00-52-17.bdf
OpenBCI_GUI: BrainFlow Streamer Location: file:///BrainFlow-RAW_2023-01-16_00-51-34_0.csv:w
Brainflow start streaming
ERROR: Exception when starting stream
brainflow.BrainFlowError: Error in start_stream:GENERAL_ERROR
	at brainflow.BoardShim.start_stream(BoardShim.java:711)
	at OpenBCI_GUI$BoardBrainFlow.startStreaming(OpenBCI_GUI.java:2814)
	at OpenBCI_GUI$BoardCyton.startStreaming(OpenBCI_GUI.java:3619)
	at OpenBCI_GUI.startRunning(OpenBCI_GUI.java:935)
	at OpenBCI_GUI$TopNav.stopButtonWasPressed(OpenBCI_GUI.java:18462)
	at OpenBCI_GUI$TopNav$2.controlEvent(OpenBCI_GUI.java:18301)
	at controlP5.Controller.callListener(Controller.java:1106)
	at controlP5.Controller.setMousePressed(Controller.java:609)
	at controlP5.ControllerGroup.setMousePressed(ControllerGroup.java:553)
	at controlP5.ControlWindow.mouseReleasedEvent(ControlWindow.java:659)
	at controlP5.ControlWindow.mouseEvent(ControlWindow.java:449)
	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at processing.core.PApplet$RegisteredMethods.handle(PApplet.java:1432)
	at processing.core.PApplet.handleMethods(PApplet.java:1634)
	at processing.core.PApplet.handleMouseEvent(PApplet.java:2742)
	at processing.core.PApplet.dequeueEvents(PApplet.java:2645)
	at processing.core.PApplet.handleDraw(PApplet.java:2486)
	at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:866)
	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)
[ERROR]: Failed to start data stream. Please check hardware. See Console Log or BrainFlow Log for more details.
ConsoleLog: Console closed!
OpenBCI_GUI: mousePressed: clicked in CP box
openBCI_GUI: haltSystem: Halting system for reconfiguration of settings...
[DEFAULT]: Data stream is already stopped.
Closed the temp data file. Now opening a new file.
closeFile: Started...
closeFile: Made file
writeHeader: Exception java.lang.NullPointerException
closeFile: Wrote header
writeData: started...
closeFile: Data written. Closing new BDF+ file.
closeFile: wrote data
closeFile: BDF+ temporary file deleted.
[DEFAULT]: BDF+ file has been made.
OpenBCI_GUI::Control Panel: Playback history file not found.
SHUTDOWN HOOK
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[:1, 0x7f6e180012c0, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:1, 0x7f6e18010ab0, refCount 1, unCloseable false]

BDF+, with Brainflow disabled

Console Log Started at Local Time: 2023-01-16_00-47-27
Screen Resolution: 1600 X 900
High-DPI Screen Detected: false
Operating System and Version: Linux - 5.15.0-46-generic
Welcome to the Processing-based OpenBCI GUI!
For more information, please visit: https://docs.openbci.com/Software/OpenBCISoftware/GUIDocs/
OpenBCI_GUI::Setup: GUI v5 Sample Data exists in Documents folder.
Settings: LogFileMaxDuration = 60 minutes
OpenBCI_GUI::Settings: Creating new GUI-wide Settings file.
OpenBCI_GUI::Settings: Successfully saved GUI-wide settings to file!
ControlP5 2.3.4 infos, comments, questions at https://github.com/retiutut/controlp5
TopNav: Internet Connection Successful
Local Version: v5.1.0, Latest Version: v5.1.0
GUI is up to date!
BrainFlow Version: fce5573c9456f5216a457fc66171b28a175e8b95
OpenBCI_GUI: AuditoryFeedback: Loading Audio...
OpenBCI_GUI: AuditoryFeedback: Done Loading Audio!
OpenBCI_GUI::Control Panel: Playback history file not found.
OpenBCI_GUI::Setup: Setup is complete!
[ERROR]: OpenBCI_GUI: This application is not being run with Administrator access. This could limit the ability to connect to devices or read/write files.
sourceList: click! 
OpenBCI_GUI: Channel count set to 8
OpenBCI_GUI: Channel count set to 4
sourceList: click! 
OpenBCI_GUI: Channel count set to 8
[DEFAULT]: Output has been set to BioSemi Data Format (BDF+).
[DEFAULT]: Autogenerated Session Name based on current date & time.
OpenBCI_GUI: Channel count set to 16
[DEFAULT]: Wifi Devices Refreshing
ControlPanel: User selected Cyton+WiFi 250Hz
wifiList: click! 
[DEFAULT]: Selected WiFi Board: OpenBCI-08E7, WiFi IP Address: 192.168.0.108
[DEFAULT]: BrainFlow File Streamer: User selected None file location.
[DEFAULT]: Attempting to Start Session...
initButtonPressed: Calling initSystem() after next draw()
OpenBCI_GUI: Start session. Calling initSystem().


=================================================
||             INITIALIZING SYSTEM             ||
=================================================

Sending config string to board: ~6
OpenBCI_GUI: Configuring Cyton Channel Count...
OpenBCI_GUI: Showing Cyton FTDI Buffer Fix Popup
OpenBCI_GUI::Settings: Successfully saved GUI-wide settings to file!
OpenBCI_GUI: Channel count set to 16
"Arial" is not available, so another font will be used. Use PFont.list() to show available fonts.
InitSettings: Saving Default Settings to file!
SessionSettings: 3 active widgets saved!
[SUCCESS]: Session started!
[DEFAULT]: openBCI_GUI: startButton was pressed. Starting data transfer, wait a few seconds.
OpenBCI_GUI: openNewLogFile: opened BDF output file: /home/ben/Documents/OpenBCI_GUI/Recordings/OpenBCI-BDF-2023-01-16_00-50-27.bdf
OpenBCI_GUI: BrainFlow Streamer Location: null
Brainflow start streaming
[DEFAULT]: Data stream started.
[DEFAULT]: openBCI_GUI: stopButton was pressed. Stopping data transfer, wait a few seconds.
Brainflow stop streaming
[DEFAULT]: Data stream stopped.
ConsoleLog: Copying console log to clipboard!
ConsoleLog: Opening console log as text file!
OpenBCI_GUI: mousePressed: clicked in CP box
openBCI_GUI: haltSystem: Halting system for reconfiguration of settings...
[DEFAULT]: Data stream is already stopped.
Closed the temp data file. Now opening a new file.
closeFile: Started...
closeFile: Made file
writeHeader: Writing 10 Seconds of Data to BDF
closeFile: Wrote header
writeData: started...
closeFile: Data written. Closing new BDF+ file.
closeFile: wrote data
closeFile: BDF+ temporary file deleted.
[DEFAULT]: BDF+ file has been made.
OpenBCI_GUI::Control Panel: Playback history file not found.
SHUTDOWN HOOK
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[:1, 0x7f81200012c0, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:1, 0x7f8120010ab0, refCount 1, unCloseable false]

CSV, with Brianflow enabled

Console Log Started at Local Time: 2023-01-16_00-55-49
Screen Resolution: 1600 X 900
High-DPI Screen Detected: false
Operating System and Version: Linux - 5.15.0-46-generic
Welcome to the Processing-based OpenBCI GUI!
For more information, please visit: https://docs.openbci.com/Software/OpenBCISoftware/GUIDocs/
OpenBCI_GUI::Setup: GUI v5 Sample Data exists in Documents folder.
Settings: LogFileMaxDuration = 60 minutes
OpenBCI_GUI::Settings: Found and loaded existing GUI-wide Settings from file.
ControlP5 2.3.4 infos, comments, questions at https://github.com/retiutut/controlp5
TopNav: Internet Connection Successful
Local Version: v5.1.0, Latest Version: v5.1.0
GUI is up to date!
BrainFlow Version: fce5573c9456f5216a457fc66171b28a175e8b95
OpenBCI_GUI: AuditoryFeedback: Loading Audio...
OpenBCI_GUI: AuditoryFeedback: Done Loading Audio!
OpenBCI_GUI::Control Panel: Playback history file not found.
OpenBCI_GUI::Setup: Setup is complete!
[ERROR]: OpenBCI_GUI: This application is not being run with Administrator access. This could limit the ability to connect to devices or read/write files.
sourceList: click! 
OpenBCI_GUI: Channel count set to 8
[DEFAULT]: Wifi Devices Refreshing
ControlPanel: User selected Cyton+WiFi 250Hz
wifiList: click! 
[DEFAULT]: Selected WiFi Board: OpenBCI-08E7, WiFi IP Address: 192.168.0.108
[DEFAULT]: Attempting to Start Session...
initButtonPressed: Calling initSystem() after next draw()
OpenBCI_GUI: Start session. Calling initSystem().


=================================================
||             INITIALIZING SYSTEM             ||
=================================================

Sending config string to board: ~6
OpenBCI_GUI: Configuring Cyton Channel Count...
OpenBCI_GUI: Channel count set to 8
"Arial" is not available, so another font will be used. Use PFont.list() to show available fonts.
InitSettings: Saving Default Settings to file!
SessionSettings: 3 active widgets saved!
[SUCCESS]: Session started!
SHUTDOWN HOOK
openBCI_GUI: haltSystem: Halting system for reconfiguration of settings...
[DEFAULT]: Data stream is already stopped.
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[:1, 0x7fefa00012c0, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:1, 0x7fefa0010ab0, refCount 1, unCloseable false]

Operating System and Version

Ubuntu 20.04 AMD64

GUI Version

Release 5.1.0

Running standalone app

Standalone

Type of OpenBCI Board

Cyton+Daisy

Are you using a WiFi Shield?

Yes

@retiutut retiutut added wifi-related backend bdf-output Related to saving file as a BDF file brainflow labels Jan 18, 2023
@retiutut
Copy link
Member

Thanks for including enough information to proceed investigating this issue. We have a pretty full lineup for the next version of the GUI that I have started working on, but the fact that this includes WiFi shield unfortunately means this will be lower priority over issues that affect more users.

@stellarpower
Copy link
Author

Thanks - so you're thinking this is tied to hardware? I would've tried MRE with the synthetic board; but unfortunately this doesn't give me the option to save the output data in the same way. I assumed it was in some way to do with trying to output two streams with differing formats at once.

If anyone with a different board could confirm if they can reproduce this, then I guess that would be the next step.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bdf-output Related to saving file as a BDF file brainflow
Projects
None yet
Development

No branches or pull requests

3 participants