04-Sep-2020 version crashes MATLAB R2019a on Ubuntu

Hi,

I was attempting to fix a bug with source reconstruction for MEG data and I decided to update Brainstorm to the latest version (previously, I was using the August release). When I type "brainstorm", Brainstorm initializes and goes through all the stages:

BST> Starting Brainstorm:
BST> =================================
BST> Version: 04-Sep-2020
BST> Compiling main interface files...
BST> Emptying temporary directory...
BST> Deleting old process reports...
BST> Loading configuration file...
BST> Checking internet connectivity... ok
BST> Initializing user interface...
BST> Starting OpenGL engine... software
BST> Reading plugins folder...

Immediately after that, I get a "MATLAB has encountered a problem and needs to close". I tried redownloading both the brainstorm_200908.zip file and the bst_bin_R2019a_191115.zip to no avail. I'm on Ubuntu 19.04 and MATLAB 2019a. Crash dump file here: https://pastebin.pl/view/e3fb2e5e

Thanks in advance :slight_smile:

Please post the MATLAB crash dump when you execute Matlab (not the one from the compiled version, which is not very helpful because it doesn't indicate which part of the Matlab code causes this crash).

If you want to try a compiled version, use the 2020a version, either the one from the current version of Brainstorm (in the bin folder of the main .zip file), or the earlier "bst_bin_R2020a_200616.zip" also available from the download page.

For this version, you need to download the 2020a Matlab Runtime. Follow the instructions "without Matlab" on the installation page:
https://neuroimage.usc.edu/brainstorm/Installation

Also: make sure you didn't update your graphics driver or something else on your system between the two versions of Brainstorm (the old August one that worked, and the new September one that crashed).

Graphics drivers are a recurrent cause of Matlab problems on Ubuntu.

Another possible problem is that we introduced a new process with python commands.

The MATLAB parser could return a warning in some versions of Matlab:

Warning: Python commands require a supported version of CPython. See Getting Started with Python. 
> In panel_process_select>ParseProcessFolder (line 2603)
  In panel_process_select (line 30)
  In bst_startup (line 396)
  In brainstorm (line 205) 

In the past, I've seen the code parser crashing on Linux when there were things it didn't like in the code. One thing you could try is to move the file brainstorm3/toolbox/process/functions/process_fooof.m away from the brainstorm3 folder, then restart Matlab and Brainstorm.

Let me know if it solves the problem. In that case, I would need to move all the py. calls outside of the process function...

@Luc FYI

1 Like

Actually, I strongly suspect this being the main problem...

I have moved all the python calls (py.module...) from the process function process_fooof.m to a file process_fooof_py.m, which is ignored when parsing the process folder, avoiding the crashes/freezes at the Brainstorm startup on Linux. Now it should only crash when trying to run the python implementation of FOOOF.
https://github.com/brainstorm-tools/brainstorm3/commit/0b5a29f4915edd683642792f1ff1a010df273480

Please update Brainstorm and confirm it works on your computer.

Hi Francois,

Thank you so much for the quick help! I downloaded the latest version from Github and it seems to have fixed the problem.

Good!
For updating Brainstorm to the latest version, the recommended solution is to use the menu Update > Update Brainstorm.

1 Like