Problem to run Brainstorm without matlab

Dear François, dear all,
I try to run brainstorm version without matlab on my computer running on Windows 11 64 bits. I have administrator rights on my computer. I installed Matlab runtime 2020 as required but when I run brainstorm.bat, I get this message:


I tried to uninstall matlab runtime and to reinstall it, I tried to download a more recent version of brainstorm bin but it still doen't work.
Can you help me ?
Many thanks

Hi Etienne,

I suspect the problem is not coming from the installation of the Matlab Runtime, but from the temporary folder in which the Brainstorm compiled package is deployed. As an example, on my computer it is stored in C:\Users\franc\AppData\Local\Temp\Francois\mcrCache9.8. Delete the mcrCache folder and try again.

Before you do that, update Brainstorm to the version I just recompiled this morning (the previous one was a bit old). From the Brainstorm download page, you can try today's version compiled with two different versions of Matlab:

  • 2020a (the default): brainstorm_220418_bin.zip
  • 2022a (maybe more chances to work on Win11, and probably faster): bst_bin_R2022a_220418.zip

If you are still running into the same problem, maybe you'll need to open a new bug report on the Mathworks.

Many thanks François, now it well works ! (with Matlab Runtime 2022a and your version bst_bin_R2022a_220418
However, I can not save my results as a figure. Systematically, brainstorm crashes.
Do you have an idea why figure saving is not working ?
Bye

I tried the following saving options, with 3D and time series figures:

  • Right-click > Snapshot > Save as image
  • Right-click > Snapshot > Open as figure, then File > Save as...
  • Right-click > Figure > Matlab controls, then File > Save as...

Everything worked.

How are you trying to save figures?
Do you get any error message? What behavior do you observe?

I exactly did what you describe, right click on the plot of the time séries but when I do that, I don’t have the scrolling menu, nothing happens and brainstorm is « frozen » and I have to close brainstorm and restart it. Finally, I did screenshots… Do you have an idea why I have this bug ?
Thanks a lot François !

I exactly did what you describe, right click on the plot of the time séries but when I do that, I don’t have the scrolling menu, nothing happens and brainstorm is « frozen » and I have to close brainstorm and restart it.

So it's not the screen capture that doesn't work, it's the right-click on the figure? You can't get access to the popup menu on the time series figure?

Do you get a menu showing up when you click on the "Display options" button at the left of the time-series figures?

What do you get in the terminal window? Please post a screen capture.
Does it do anything if you click on the terminal window and then press the ENTER key on your keyboard?

Can you please test whether this occurs on any other type of figure: MRI viewer, 3D figure with cortex surface, 2D topography, time-frequency, connectivity?

Can you try running Brainstorm from Matlab on the same computer? On a computer with a similar system (Win11+similar software environment)?

Dear François,
Sorry for my late response...
I tried again and now it is working. But it takes a very very very long time (around 5 minutes) before getting access to the pop up menu on the time series figure. I don't know why as I have a computer with Win11 64 bits, 8Go RAM, processor AMD Ryzen 5 5500U with Radeon Graphics 2.10 GHz
Here is the screen capture of my terminal window for info

When I right click a second time on the time series figure, I can get access to the pop up menu immediately and everything seems to work correctly, without time delay.
I also tried with 3D cortex surface, 2D map, I can save them as images.
Overall, it seems that I have to wait for several minutes at the first time that I want to save a figure and afterwrads, everything seems to well work. It's rather curious regarding my PC configuration, isn't it ?

I don't have computer with matlab and therefore, I was not able to test this in Brainstorm running from matlab.
Many thanks François for your help !
Best regards

So it does not matter which figure you try to save?
The first time you right-click on a figure (no matter which type of figure this is), it takes a long time to see anything happening, and then it works completely normally?
Do you get the same thing with the popup menus when you right-click on the Brainstorm database tree? And when you try to open the different drop-down menus in the Record tab (like the list of montages) when you have some recordings open?

Can you confirm that the behavior is exactly the same with the two compiled versions you have tested: 2020a and 2022a?

There is maybe one function call that blocks the execution, until a very long timeout expires.
This can be related with the operating system itself (Win11), interactions with other components of the system, bugs in the Matlab Runtime, etc...

The only way to know in which direction to go to improve this behavior would be to run Brainstorm from Matlab on the same compute, with the profiler on. This would tell us what the blocking function is, and we could explore solutions to resolve the issue (if it comes from our code) or report it as a bug to the Mathworks (if the behavior is not the same from Matlab and from the Runtime). It is not something we can do from the compiled code unfortunately.