Unable to launch Brainstorm GUI (CentOS)

Hello,

I have been using brainstorm (GUI) on the university cluster for a while now.

The OS details are here -
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.9.2009 (Core)
Release: 7.9.2009
Codename: Core

Today at brainstorm startup it prompted me to update the version, which I have routinely done in the past. After updating it I started getting the errors given below.

With Matlab2018b -
BST> Starting Brainstorm:
BST> =================================
BST> Version: 13-Aug-2022
BST> Compiling main interface files...
BST> Deleting old process reports...
BST> Loading configuration file...
BST> Checking internet connectivity... ok
BST> Initializing user interface...
Undefined variable "IconLoader" or class
"IconLoader.ICON_APP.getImage".

Error in gui_brainstorm>CreateWindow (line 82)
jBstFrame.setIconImage(IconLoader.ICON_APP.getImage());

Error in gui_brainstorm (line 33)
eval(macro_method);

Error in gui_initialize (line 30)
GlobalData.Program.GUI = gui_brainstorm('CreateWindow');

Error in bst_startup (line 360)
gui_initialize();

Error in brainstorm (line 116)
bst_startup(BrainstormHomeDir, 1, BrainstormDbDir);


With Matlab2020b -
BST> Starting Brainstorm:
BST> =================================
BST> Version: 13-Aug-2022
BST> Compiling main interface files...
BST> Deleting old process reports...
BST> Loading configuration file...
BST> Checking internet connectivity... ok
BST> Initializing user interface...
Unable to resolve the name IconLoader.ICON_APP.getImage.

Error in gui_brainstorm>CreateWindow (line 82)
jBstFrame.setIconImage(IconLoader.ICON_APP.getImage());

Error in gui_brainstorm (line 33)
eval(macro_method);

Error in gui_initialize (line 30)
GlobalData.Program.GUI = gui_brainstorm('CreateWindow');

Error in bst_startup (line 360)
gui_initialize();

Error in brainstorm (line 116)
bst_startup(BrainstormHomeDir, 1, BrainstormDbDir);


I then downloaded the most recent version from the website and replaced the older files (as this worked for some other user on the forum). And I still have the same problem.

Any suggestions on how I might be able to solve this?

Thanks!

Hi @Proxima,

It seems that there was a problem updating the brainstorm.jar file.

  1. Close Brainstorm and Matlab
  2. Go to the location when Brainstorm is installed, as in the folder java manually delete the brainstorm.jar file.
  3. Start MATLAB and try to Start Brainstorm again, it will automatically download the missing .jar file

Hi @Raymundo.Cassani,

Thanks for the quick reply.

I deleted the brainstorm.jar file and started brainstorm but now I am getting a new error message.

Here it is -
BST> Downloading brainstorm.jar...
Error using bst_webread (line 79)
No data could be read from:
https://github.com/brainstorm-tools/bst-java/raw/master/brainstorm/dist/brainstorm.jar

Error in brainstorm (line 91)
bst_webread('https://github.com/brainstorm-tools/bst-java/raw/master/brainstorm/dist/brainstorm.jar',
BstJar);

Any other suggestions?

I manually downloaded the file and moved it to the java directory.
Restarted BST. It took a very long time and I had to specify brainstorm_db folder again but it seems to have worked. :slight_smile:

I am reloading the dataset, seems to be very slow for some reason today but I'll leave it as is for now.

Thanks @Raymundo.Cassani!

This worked for me, thank you.

MacOS Monterey 12.3 on M1 MBP
Matlab R2021b

@Proxima @AmirVala
Were you updating using github instead of the Brainstorm automatic updates?

@Raymundo.Cassani
A git pull would indeed not update the brainstorm.jar, causing this problem at each modification of the java package. Do you know any git or github feature that could automatically delete the brainstorm.jar file when pulling new updates? or at least display a warning that the file should be deleted manually?

Indeed, we can use a post-merge git hook.

We just need to define how to distribute it (see ancient link). I'd go with creating a gist with the hook's code, and document the instructions on how to enable it. I'll prepare the hook and keep you updated

@Francois I updated brainstorm within matlab, appearing to break the relevant GUI process.

The fix was to remove the .jar file, then update brainstorm within Matlab.

Hopefully this happened because the previous update you did was before June 22nd.
We added a new mechanism to force updating brainstorm.jar after restarting Matlab.

If you ever face this error again, please let us know, it would mean that we have another problem to deal with in the updates.

Hi @Francois,

I tried updating BST using the auto-update function. The update was downloaded successfully and matlab closed as expected. But when I launched BST again, this is the error that I got -

Error using bst_webread (line 79)
No data could be read from:
https://github.com/brainstorm-tools/bst-java/raw/master/brainstorm/dist/brainstorm.jar
Error in brainstorm (line 91)
bst_webread('https://github.com/brainstorm-tools/bst-java/raw/master/brainstorm/dist/brainstorm.jar',
BstJar);

Then I just manually moved the brainstorm.jar file to the java folder and then it worked fine.

Error using bst_webread (line 79)
No data could be read from:
https://github.com/brainstorm-tools/bst-java/raw/master/brainstorm/dist/brainstorm.jar
Error in brainstorm (line 91)
bst_webread('https://github.com/brainstorm-tools/bst-java/raw/master/brainstorm/dist/brainstorm.jar',
BstJar);

This is error can be due to:

  • A problem of configuration from Matlab to get data through HTTP. But if you could update Brainstorm from Brainstorm, it is probably not the case.
  • A problem of access rights on your hard drive: Maybe the folder brainstorm3/java was created with access rights that do not allow Matlab to create a new file there.
  • A temporary problem of connection to GitHub

Then I just manually moved the brainstorm.jar file to the java folder and then it worked fine.

You downloaded the file manually and moved it to brainstorm3/java?

Yes. It works.