Reference to non-existent field 'FIFF_REF_ROLE'

Hi Francois,

I am trying to load neuromag fif files. When I go with right clicking on the subject while I’m in the functional data category, I try to “Import MEG/EEG” and also tried to use "review raw file", when I select the appropriate file, I get this error - Line 197: Reference to non-existent field 'FIFF_REF_ROLE'.

Call stack:

fif_setup_raw.m at 197
in_fopen_fif.m at 148
in_fopen.m at 68
in_data.m at 106
import_data.m at 200
bst_call.m at 28
tree_callbacks.m>@(h,ev)bst_call(@import_data) at 532

I have managed to open the data using fieldtrip and MNE. So the data is fine.

Any suggestions on how to fix this problem?
Thank you!

You probably have an outdated version of the mne-matlab library in your Matlab path, maybe coming from FieldTrip, that interferes with the up-to-date one distributed with Brainstorm.
The Brainstorm function fif_setup_raw.m expects a field FIFF_REF_ROLE defined in fiff_define_constants.m, but this one is missing.

To solve this issue:

  • Edit your Matlab path
  • remove everything that is not directly part of the Matlab installation
  • restart Matlab
  • start Brainstorm without adding anything to your path

To avoid any future conflict like this one: install or configure FieldTrip as a Brainstorm plugin:
https://neuroimage.usc.edu/brainstorm/Tutorials/Plugins