Brainstorm standalone does not start on latest MacOS

I use Mac OS. After running the brainstorm3.command, i see the java icon open. However there is no GUI.
When I right-click on the java icon and select Show All windows, I see the following (screenshot).
It was working few weeks ago for me. Maybe the latest OS update broke something?

I am using the latest Brainstorm binary. Using Macbook Pro M1 running Ventura 13.0.1

So I tried to run it via Parallels on windows 11 virtual machine and was opening, however my brainstorm_db subjects are stored using Mac OS path format and unable to be read by the Windows counterpart.

Using Macbook Pro M1 running Ventura 13.0.1

I don't have the possibility to test this OS.
Does anybody have the possibility to test this?
@Sylvain @Raymundo.Cassani @Marc.Lalancette @tmedani @John_Mosher @edelaire ?

Maybe the latest OS update broke something?

This is possible. MacOS allows itself a lot of behavior changes between versions.
(the Apple company is extremely skilled at planned obsolescence)

After running the brainstorm3.command, i see the java icon open. However there is no GUI.

Have you tried to run brainstorm3.command manually from a terminal, as we recommend doing it on Linux?
https://neuroimage.usc.edu/brainstorm/Installation#Start_Brainstorm

I tried to run it via Parallels on windows 11 virtual machine and was opening, however my brainstorm_db subjects are stored using Mac OS path format and unable to be read by the Windows counterpart.

If you can access your MacOS files from your Windows virtual machine, you should be able to use your existing database, but it requires to unload the protocol and reload it from Windows, to have all the references in your database updated correctly for the Windows paths.

Have you tried to run brainstorm3.command manually from a terminal, as we recommend doing it on Linux?

Yes, same result.

here is the log from the terminal

I forgot to mention that only the brainstorm splash screen shows, and then after it disappears, the main GUI does not show.

If you can access your MacOS files from your Windows virtual machine, you should be able to use your existing database, but it requires to unload the protocol and reload it from Windows, to have all the references in your database updated correctly for the Windows paths.

I can access my MacOS files from Windows VM. When Brainstorm opened on Windows, it asked me to point it to brainstrom_db, which I did. It is located in my documents folder on Mac. Then it loaded the Protocol and it can show Subject1 and Subject2 which I created on Mac. However the "Link to Raw files" show a MacOS format "/Users/user/brainstorm_db/xxxxxx" which cannot be opened by Brainstorm on Windows . How can I have brainstorm use windows path format?

It does not finish parsing all the processes, it is normal that the main Brainstorm doesn't show.
If you press ENTER after waiting for a while, does it do anything?

There is something to fix here, which is not related with a modification of the window manager's behavior in this new MacOS version.

However the "Link to Raw files" show a MacOS format "/Users/user/brainstorm_db/xxxxxx" which cannot be opened by Brainstorm on Windows . How can I have brainstorm use windows path format?

Indeed, the links are a problem: You need to fix them one by one...
Brainstorm should prompt for selecting the new location of the file when double-clicking on the "Link to raw file".

I will improve this, by referencing without their path the continuous files saved in the database as .bst files. This way, using the menu File > Export protocol > Copy raw files to database would make the database fully portable.

Pressing ENTER does not do anything.
After the splash disappears, no brainstorm GUI shows.

In MacOS, when you right click on the app icon in the dock, then "Show all windows", it should show all instances of that app. In the case of Brainstorm, it only shows "silhouette" of the instances as per screenshot below. The silhouette is just because my mouse is hovering over that instance. In this case "Brainstorm" itself and "License" as seen in screenshot. The normal behavior is it should show all the instances of GUIs side by side for the selected app.
This tells me that the instances are "open" but not drawn on the screen.

I have this issue happening to me with another app called Citrix Workspace which i use to access hospital related electronic health record like Epic. Sometimes the Citrix launches, but the GUI of Epic is not drawn on the screen. This also is noticeable after the last MacOS update. The way I work around that is to plug and unplug an external monitor. I have not been able to test plugging/unplugging external monitor since I am out of town.

The following is the expected behavior when I click on "Show all windows" of an app. In this case I clicked it for Excel icon in the dock, and have two Excel sheets, so the MacOS will display them side-by-side.
When I do that with Brainstorm, i expect to see the GUIs of any Brainstorm related process.

I don't have the possibility to test this OS.
Does anybody have the possibility to test this?
@Sylvain @Raymundo.Cassani @Marc.Lalancette @tmedani @John_Mosher @edelaire ?

I am to be able to reproduce the issue. But i won't have time to do more test before next week. I have no issue when running Brainstorm via Matlab though.

Edouard

Dear community:
I have a problem opening brainstorm standalone version. I have tried both up-to-date and 2020a version with MCR v98 2020a. None pass the step of reading process folder. See below.

andraderenew@Renes-MacBook-Air ~ % /Users/andraderenew/Downloads/toolboxes/brainstorm3\ 2020a/bin/R2020a/brainstorm3.command ; exit;

BST> Starting Brainstorm:

BST> =================================

Warning: the font "Times" is not available, so "Lucida Bright" has been substituted, but may have unexpected appearance or behavor. Re-enable the "Times" font to remove this warning.

Warning: the font "Times" is not available, so "Lucida Bright" has been substituted, but may have unexpected appearance or behavor. Re-enable the "Times" font to remove this warning.

BST> Version: 16-Jun-2022

BST> Compiling main interface files...

BST> Deleting old process reports...

BST> Loading configuration file...

BST> Initializing user interface...

BST> Starting OpenGL engine... hardware

BST> Plugin brain2mesh: /Users/andraderenew/Library/Application Support/.mcrCache9.8/bst_ja1/Users/franc/.brainstorm/plugins/brain2mesh

BST> Plugin iso2mesh: /Users/andraderenew/Library/Application Support/.mcrCache9.8/bst_ja1/Users/franc/.brainstorm/plugins/iso2mesh

BST> Plugin brainentropy: /Users/andraderenew/Library/Application Support/.mcrCache9.8/bst_ja1/Users/franc/.brainstorm/plugins/brainentropy

BST> Plugin blackrock: /Users/andraderenew/Library/Application Support/.mcrCache9.8/bst_ja1/Users/franc/.brainstorm/plugins/blackrock

BST> Plugin neuroelectrics: /Users/andraderenew/Library/Application Support/.mcrCache9.8/bst_ja1/Users/franc/.brainstorm/plugins/neuroelectrics

BST> Plugin libsvm: /Users/andraderenew/Library/Application Support/.mcrCache9.8/bst_ja1/Users/franc/.brainstorm/plugins/libsvm

BST> Plugin derivelfp: /Users/andraderenew/Library/Application Support/.mcrCache9.8/bst_ja1/Users/franc/.brainstorm/plugins/derivelfp

BST> Plugin nirstorm: /Users/andraderenew/Library/Application Support/.mcrCache9.8/bst_ja1/Users/franc/.brainstorm/plugins/nirstorm

BST> Plugin mcxlab-cl: /Users/andraderenew/Library/Application Support/.mcrCache9.8/bst_ja1/Users/franc/.brainstorm/plugins/mcxlab-cl

BST> Plugin mia: /Users/andraderenew/Library/Application Support/.mcrCache9.8/bst_ja1/Users/franc/.brainstorm/plugins/mia

BST> Plugin spm12: /Users/andraderenew/Library/Application Support/.mcrCache9.8/bst_ja1/Users/franc/.brainstorm/spmtrip

BST> Reading process folder...

Thanks for all the help in advance.

Best,
Rene Andrade.

I moved your bug report here, as it seem to be related.
The compiled version of Brainstorm does not start on the latest MacOS.

1 Like

This tells me that the instances are "open" but not drawn on the screen.

The problem is not that the Brainstorm GUI is invisible, the startup process stops before the Java frame with the database explorer is made visible. The outline of this "Brainstorm" window that you see is not the main Brainstorm window, it is here only to keep the compiled application alive, and it is really meant to be invisible.
The startup hangs probably during the parsing of the process folder. Somewhere between line 453 and line 567 in bst_startup.m, while the Brainstorm main window is made visible only at line 567.

A few things that you can try, if not already done:

  1. Update the compiled version from the website. I updated it yesterday, it should show "27-Nov-2022" in the terminal window.
  2. After it hangs for more than 2 min: press the ENTER key a few times
  3. From the bottom of the download page: get the version of Brainstorm compiled with Matlab 2022b (bst_bin_R2022b_220616.zip), this requires that you install the Matlab Runtime 2022b => Maybe there are Matlab bugs in 2020a that have been fixed in Matlab 2022b.
  4. Try running the older version of the 2020a compiled package (bst_bin_R2020a_220616.zip) => Maybe we added recently some processes that do not work in this context

@aalshammaa @andraderenew
Please test each of these 4 steps, and post your reports here, that would help us in our bug hunt.

@edelaire
Hopefully you will be able to help us, since you are able to reproduce the error.
I think the first thing to try would be to recompile Brainstorm without the plugins: brainstorm compile noplugs.
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting#How_to_compile_Brainstorm

While we work on fixing the native execution of Brainstorm on the latest MacOS, working with the Parallels desktop/Windows is probably an option. You just need to fix the access to the raw links if you need them.

I tested this again, and realized that all the raw files that have been saved inside the brainstorm_db folder as .bst files are already portable across operating systems.
You need to run once the menu File > Export protocol > Copy raw files to database in order to make hard copies of all the your file links into the database, and then the database should work completely on any OS.

But if you can't start Brainstorm on the MacOS side in the first place, this doesn't help.
However, you should be able to fix the links one by one, by double-clicking on them and pointing again at the correct path. The run the menu Copy raw files to database, so that the database does not need any additional modification when you're back to working directly from MacOS.
Note that this makes a new hard copy of the data, and may increase significantly the size of the database. Do it only if necessary.

so up to this point what can I do to help? I can do testing if guided. I will try 2022 version compiled.

Thank you for explanation! Makes sense now

Step 1, 2, and 4 did not work.
For step 3, after installing Matlab Runtime 2022b, it works! Now Brainstorm loads fine. Thanks for the suggestions

Here is the terminal output:

BST> Starting Brainstorm:
BST> =================================
BST> Version: 16-Jun-2022
BST> Compiling main interface files...
BST> Deleting old process reports...
BST> Loading configuration file...
BST> Initializing user interface...
BST> Starting OpenGL engine... hardware
BST> Plugin brain2mesh: /Users/abdullah/Library/Application Support/.mcrCache9.13/bst_ja0/Users/franc/.brainstorm/plugins/brain2mesh
BST> Plugin iso2mesh: /Users/abdullah/Library/Application Support/.mcrCache9.13/bst_ja0/Users/franc/.brainstorm/plugins/iso2mesh
BST> Plugin brainentropy: /Users/abdullah/Library/Application Support/.mcrCache9.13/bst_ja0/Users/franc/.brainstorm/plugins/brainentropy
BST> Plugin blackrock: /Users/abdullah/Library/Application Support/.mcrCache9.13/bst_ja0/Users/franc/.brainstorm/plugins/blackrock
BST> Plugin neuroelectrics: /Users/abdullah/Library/Application Support/.mcrCache9.13/bst_ja0/Users/franc/.brainstorm/plugins/neuroelectrics
BST> Plugin libsvm: /Users/abdullah/Library/Application Support/.mcrCache9.13/bst_ja0/Users/franc/.brainstorm/plugins/libsvm
BST> Plugin derivelfp: /Users/abdullah/Library/Application Support/.mcrCache9.13/bst_ja0/Users/franc/.brainstorm/plugins/derivelfp
BST> Plugin nirstorm: /Users/abdullah/Library/Application Support/.mcrCache9.13/bst_ja0/Users/franc/.brainstorm/plugins/nirstorm
BST> Plugin mcxlab-cl: /Users/abdullah/Library/Application Support/.mcrCache9.13/bst_ja0/Users/franc/.brainstorm/plugins/mcxlab-cl
BST> Plugin mia: /Users/abdullah/Library/Application Support/.mcrCache9.13/bst_ja0/Users/franc/.brainstorm/plugins/mia
BST> Plugin spm12: /Users/abdullah/Library/Application Support/.mcrCache9.13/bst_ja0/Users/franc/.brainstorm/spmtrip
BST> Reading process folder...
BST> License accepted.
BST> Loading current protocol...
BST> =================================

For step 3, after installing Matlab Runtime 2022b, it works! Now Brainstorm loads fine. Thanks for the suggestions

This is some great news!
Unfortunately, it's not a major surprise that newer versions of MacOS require the latest versions of the Matlab Runtime... The life span of compiled software on MacOS is usually very short compared with Windows.
I adjusted the Installation instructions to this new information: https://neuroimage.usc.edu/brainstorm/Installation#Requirements

I recompiled the latest version of Brainstorm on Matlab 2022b.
Please try downloading the latest package available on the Download page:
bst_bin_R2022b_221130.zip

I also recompiled the 2020a version with some fixes.
Please let me know how it goes.

2 Likes

Hi, I'm unable to launch Brainstorm under Ventura (Intel). I get this message with no options to define any path : 'Now, select the installation folder of the Runtime 9.13'
So what ?

Well after a while I've been able to select the Matlab folder. Crossing fingers to restart Brainstorm...

I get this message now

... Matlab M-code Stack Trace ...

com.mathworks.toolbox.javabuilder.MWException: An error occurred while initializing the component.

The installed MATLAB Runtime is not compatible with the application. Reinstall the MATLAB Runtime or the application using the application installer generated using deploytool.

Hi @Tguyfr,

  • Which version of Brainstorm standalone did you download?
  • Which version of Matlab Runtime did you install?

Best,
Raymundo

I installed the latest version of Brainstorm and the Matlab 2022b package. Either it's java, or a path installation issue.

I won't be able to replicate the setup until tomorrow.

Meanwhile, you could try some of suggested trouble-shooting steps:
https://neuroimage.usc.edu/brainstorm/Installation#Start_Brainstorm

I testes this setup with out trouble:

  • Brainstorm version: brainstorm_230428_bin.zip
  • Matlab Runtime 2022b (version number 913)
  • OS Ventura 13.2.1 with CPU Intel i3-8180B

It is not likely Java is the culprit. The Matlab Runtime uses its own version of the Java environement (at MATLABROOT/MATLAB Runtime/R2022b/sys/java/jre/maci64/jre).

Try to run brainstorm in the terminal with the following command from the brainstorm3/bin/R2022b directory:
./brainstorm3.command /Applications/MATLAB/MATLAB_Runtime/R2022b

It there is an error, copy and paste the entire error messsage

Thanks for taking time to help Raymundo, I really appreciate. Here is the message I get from my Terminal

... Matlab M-code Stack Trace ...

com.mathworks.toolbox.javabuilder.MWException: An error occurred while initializing the component.

The installed MATLAB Runtime is not compatible with the application. Reinstall the MATLAB Runtime or the application using the application installer generated using deploytool.

at com.mathworks.toolbox.javabuilder.internal.MWMCR.mclInitializeComponentInstance(Native Method)

at com.mathworks.toolbox.javabuilder.internal.MWMCR.access$700(MWMCR.java:33)

at com.mathworks.toolbox.javabuilder.internal.MWMCR$6.mclInitializeComponentInstance(MWMCR.java:903)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.mathworks.toolbox.javabuilder.internal.MWMCR$2.invoke(MWMCR.java:785)

at com.sun.proxy.$Proxy0.mclInitializeComponentInstance(Unknown Source)

at com.mathworks.toolbox.javabuilder.internal.MWMCR.newInstance(MWMCR.java:646)

at bst_javabuilder_2022b.Bst_javabuilder_2022bMCRFactory.newInstance(Bst_javabuilder_2022bMCRFactory.java:50)

at bst_javabuilder_2022b.Bst_javabuilder_2022bMCRFactory.newInstance(Bst_javabuilder_2022bMCRFactory.java:66)

at bst_javabuilder_2022b.Run.(Run.java:63)

at org.brainstorm.RunCompiled.main(RunCompiled.java:17)