Open MEEG error #139 when running the headmodel computation


I have the attached error when I am trying to run headmodel computation (I am using Matlab 16...also tried with 17 and 18).

Please kindly advise what I can try.

Claire IMG_0122


did you recompute the full head model? (not using a previously computed matrix)

if so can you share the head model file (BEM surfaces) so we can replicate?


@Alexandre: I removed the possibility to re-use the HM and HMINV a year ago, because of all the trouble this optimization was causing. Now everything is recomputed at each openmeeg execution.

@Alexandre: Do you want 1) the BEM surfaces in Brainstorm format or 2) the version prepared for OpenMEEG (saved in a temp folder) ?

@jhan24: Depending on Alexandre’s answer, please do the following:

  1. Export a Brainstorm subject:
  • Right-click on the subject > File > Duplicate subject
  • Delete all the files that are not needed to reproduce the error
  • Right-click on the subject > File > Export subject
  • Upload the zip file somewhere (eg dropbox, google drive…) and post here the link to download it.
  1. Export openmeeg tmp folder:
  • Immediately after running the OpenMEEG and getting this error, zip the folder $HOME/.brainstorm/tmp (eg. /home/username/.brainstorm/tmp)
  • Upload the zip file somewhere (eg dropbox, google drive…) and post here the link to download it.

I would like the openmeeg tmp folder.


Here are the things you requested:

Please note that now the error I have is 134...

Thank you!

If the error message is not the same, please post the new error message you get.
You can copy-paste the full error message from the Matlab command window.

If you are working on a Mac, please refer to this thread:

@jhan24 you should now be able to update brainstorm and get an updated version (2.4.1) of OpenMEEG that should work out of the box.


To update Brainstorm manually, use the menu Update > Update Brainstorm.
The next time you use OpenMEEG to compute a forward model, the newest version (2.4.1) should be downloaded and installed automatically.