OpenMEEG error #-1073740791

Dear BST Community,

I am working for the first time with BST on a windows-based virtual machine. Accordingly, as part of the set up, I installed openMEEG through brainstorm as when requested. However, when trying to compute the head model of a participant (this is all being done with the ICBM152 template), I am running into the following error:


** Error: OpenMEEG call: om_assemble -HM
** "C:\Users\psdhami.brainstorm\tmp\openmeeg.geom"
** "C:\Users\psdhami.brainstorm\tmp\openmeeg.cond"
** "C:\Users\psdhami.brainstorm\tmp\openmeeg_hm.mat"
** OpenMEEG error #-1073740791:
** om_assemble version 2.4.1 compiled at Aug 22 2018 19:47:28 using OpenMP
** Executing using 1 threads.
**
** | ------ om_assemble
** | -HM
** | C:\Users\psdhami.brainstorm\tmp\openmeeg.geom
** | C:\Users\psdhami.brainstorm\tmp\openmeeg.cond
** | C:\Users\psdhami.brainstorm\tmp\openmeeg_hm.mat
** | -----------------------
** (DEPRECATED) Please consider updating your geometry file to the new format 1.1 (see data/README.rst): C:\Users\psdhami.brainstorm\tmp\openmeeg.geom
** This geometry is a NESTED geometry.
** Info:: Mesh name/ID : 1
** # vertices : 3242
** # triangles : 6480
** Euler characteristic : 2
** Min Area : 5.35429e-06
** Max Area : 3.38214e-05
** Info:: Mesh name/ID : 2
** # vertices : 3242
** # triangles : 6480
** Euler characteristic : 2
** Min Area : 4.91413e-06
** Max Area : 3.16508e-05
** Info:: Mesh name/ID : 3
** # vertices : 3242
** # triangles : 6480
** Euler characteristic : 2
** Min Area : 7.2922e-06
** Max Area : 4.02235e-05
** Info:: Domain name : Scalp
** Conductivity : 1
** Composed by interfaces : +1 -3
** Interface "1"= { mesh "1" }
** Interface "3"= { mesh "3"(outermost) }
** Info:: Domain name : Skull
** Conductivity : 0.0125
** Composed by interfaces : +2 -1
** Interface "2"= { mesh "2" }
** Interface "1"= { mesh "1" }
** Info:: Domain name : Brain
** Conductivity : 1
** Composed by interfaces : -2
** Interface "2"= { mesh "2" }
** Info:: Domain name : Air
** Conductivity : 0
** Composed by interfaces : +3
** Considered as the outermost domain.
** Interface "3"= { mesh "3"(outermost) }
** OPERATOR S ... (arg :[]
** OPERATOR D ... (arg :[
]
** OPERATOR N ... (arg :[]
** OPERATOR S ... (arg :[
]
** OPERATOR D ... (arg :[]
** OPERATOR D*... (arg :[
]
** OPERATOR N ... (arg :[]
** OPERATOR S ... (arg :[
]
** OPERATOR D ... (arg :[]
** OPERATOR N ... (arg :[
]
** OPERATOR D*... (arg :[]
** OPERATOR N ... (arg :[
[
]
** OPERATOR N ... (arg :[
[********************]
**
** For help with OpenMEEG errors, please refer to the online tutorial:
** https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem#Errors


I saw in previous threads that reloading the protocol and trying different BEM values solved the problem, but I have tried both, and am still encountering this error. Any help with this would be greatly appreciated.

Paul

I tried lowering the BEM values to 1082 vertices for the head, outerskull, and innerskull, but now run into what appears to be the same error number:


** Error: OpenMEEG call: om_minverser
** "C:\Users\psdhami.brainstorm\tmp\openmeeg_hm.mat"
** "C:\Users\psdhami.brainstorm\tmp\openmeeg_hminv.mat"
** OpenMEEG error #-1073740791:
** om_minverser version 2.4.1 compiled at Aug 22 2018 19:48:24 using OpenMP
** Executing using 1 threads.
**
** | ------ om_minverser
** | C:\Users\psdhami.brainstorm\tmp\openmeeg_hm.mat
** | C:\Users\psdhami.brainstorm\tmp\openmeeg_hminv.mat
** | -----------------------
**
** For help with OpenMEEG errors, please refer to the online tutorial:
** https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem#Errors


@pdhami
For both errors, please share data to reproduce the error:

  • Immediately after it crashes in Brainstorm, zip the contents of the folder $HOME/.brainstorm/tmp.
  • Upload the .zip files somewhere
  • Post the download links here

@Alexandre @papadop
These are questions for you.

Yes please, give us the file to reproduce the problem....

On another point of view: In both cases, I cannot make sense of the error codes that are sent. I do not think these codes came from OpenMEEG and from a quick check, they do not seem to come from BrainStorm either ??? Its seems to be some strange shell interaction behind here, and that does some simplify the identification of the error.

Finally, the output of OpenMEEG itself does not mention an error, which seems strange. I suspect it is truncated (but cannot decode the matlab syntax brainstorm uses). If this is indeed the case (that the output is truncated), this also makes the identification of error more complicated... Even if truncation is done to limit the amount of output, the last few lines should be kept as most probably those are the lines which contain the useful error information.

With the files, I will be able to reproduce the error and see whether both the status number and the output are nominal....

Thank you for the assistance.

Please find two zips related to both the errors with the default (1922) and 1082 vertex values.

https://drive.google.com/drive/folders/1QZD3Go11yws8enoTCPeC_9d-y06TP8T0?usp=sharing

I've been using Brainstorm for a while with my personal Mac, and never ran across this error. If this ends up not being related to BST or OpenMEEG, could be it some sort of security/account permissions issue due to this being run on a virtual machine hosted by my institute?

It's what Matlab returns when doing a system call to run an openmeeg executable:
[status, result] = system(openmeeg_call);

Maybe this int value should be cast to something else, instead of being displayed with num2str(status)?

Sorry to bump, but was curious as to if there are any suggestions I can try to help potentially resolve this issue?

@papadop?

Sorry to bump once again Francois, but would you have any suggestions possibly?

We just have a time sensitive project we're hoping to get underway with, but this error is stopping me from proceeding.

Thank you,
Paul

I'm sorry, this is not in my hands...
The only advice I could give would be to try computing the BEM surfaces differently (using the FieldTrip option, or with different number of vertices for the Brainstorm method).

For the actual debugging of OpenMEEG, this is up to the authors of the software: @papadop, @mclerc or @Alexandre

Sorry. For some reason I only see some of the replies in this forum. I missed the one where you provide the zips. I will have a look later tonight and will tell you what I found.

Yes I saw the code.... The only thing I can say up to now is that the error code does not correspond to a code that we return voluntarily (it might be a bug). I was first imagining a poor conversion sequence from integer to unsigned and back to integer, but this does not seem obvious.

With the zip file I will try to reproduce the problem and we will see....

The first look at your zip file shows that the problem arose because the file openmeeg_hm.mat is empty. Thus the error is not in the om_minverser but in the previous stage that generated this file. om_assemble.

Looking at the log file openmeeg_log.txt, it clearly says that two of your meshes are self-intersecting... This is probably the reason for which om_assemble produced and empty file. I consider this as a bug. The warning should be a clear and reported error. I will make a change to improve that, On the other hand, this means that openmeeg is not faulty here and that the tool that you used to produce the meshes did not work properly.

The log also shows some strange output for Interfaces "^H^H" as second parameters. I will have a look on that too. But I do not think it can have a link to the fact that meshes are self-intersecting.

@pdhami As I suggested before, try with different numbers of vertices or with the FieldTrip option.

By the way. I checked what is the error code that was sent by OpenMEEG and it is 134 (on linux). So it is either some windows weirdness. And I'm still unable to relate it to 1073740791 (2^32/4-33)...
Just to be clear: the error code we send in OpenMEEG does not depend on the operating system.

Thank you both with your help with this!

I'm using the exact same pipeline on this windows based virtual machine that I used with my personal Mac. Everything worked fine on my Mac. Could this be an issue with the virtual machine set up? I also ask since I have tried various number of vertices (as well as with FieldTrip), but am still running into the same error. For the time being, I will go through all the number of vertex options more thoroughly.

Thank you,
Paul

Greetings again,

I am still running into the same error, regardless of how many vertices I use (or if I use the FieldTrip method).

As a work around, because I am using the ICBM152 anatomy template, would I be able to simply send myself the openmeeg.mat file from my personal computer, and copy and paste it in the subject folders on the virtual machine?

I am going to attempt it regardless since I am running out of options, but feedback as to whether this is not suggested would be great.

Best,
Paul

This is all with the ICBM152 template from Brainstorm that you are running into these errors?
When using the template, you should not even try to change the number of vertices, but use directly the surfaces available in the template. If this doesn't work and you have errors mentioning self-intersecting surfaces, this seems to indicate you have modified this template.

  • Create a new test subject, with the options "Use default anatomy: No" and "Use default channel file: No"
  • In the anatomy view: right-click on the subject > Use template > MNI > ICBM152
  • In the functional view: right-click on the subject > Create folder > name it the way you want
  • Copy-paste your channel file to this new folder
  • Right-click on the channel file > MRI registration > Edit: Make sure the electrodes and correctly aligned on the head, and click on "Project on head surface" if you have not done this before, or if you are not using one template sensor cap distributed with Brainstorm for the ICBM152 template.
  • Right-click on the channel file > Compute head model > Select OpenMEEG and keep all the default values

I tested on Windows10 with the version of OpenMEEG that is installed by default as a plugin (see in the Plugin menu): no issue with the current ICBM152 template.

Hi Francois,

Apologizes, I meant that I had tried different values for the generation of the BEM surfaces, before running openMEEG. I do not change the vertices of the template (ICBM152)/modify the template in any way.

I am first running CAT12 segmentation on the ICBM152 template to get the Schaefer atlases. I then generated the BEM surfaces, and then tried computing the head model. It is here that I get the error as mentioned above.

I have the exact same pipeline on my personal Mac (just with a different dataset), and all works fine. However, it is on the Windows virtual machine that there comes this error.

Going back to my last post, I did send myself the openMEEG file from my Mac, and copied and pasted it into the subject folders on my virtual machine. All the parameters are the exact same. I did this, reloaded the database, and the compute sources worked fine. Do you think is an okay work around?

Thank you again,
Paul