Philips-EGI MFF import error

hi
I keep getting the error when importing MEG/EEG data.I reinstalled brainstorm multiple times but it still doesn't work.The error is as follows:


Error in mff_importsignal.m
** Error: Line 50: Wrong use javaObject
** Class not found in Java classpath com.egi.services.mff.api.LocalMFFFactoryDelegate
**
** Call stack:
** >mff_importsignal.m at 50
** >mff_import.m at 85
** >in_fopen_mff.m at 43
** >in_fopen.m at 117
** >in_data.m at 106
** >import_data.m at 200
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@import_data,[],[],[],iStudy,iSubject) at 662
**


I hope to hear from you soon
thanks

Hi,

It's likely that the error is related to the size of the file that you are trying to import.
Try to increase the Java Heap Memory size in Matlab

I reported this error on the mffmatlabio github repo:
https://github.com/arnodelorme/mffmatlabio/issues/37

@000
If increasing the Java heap size doesn't work, could you please upload an example file somewhere (short if possible) and post the download link here, so that we can reproduce this error?
You could also post the link on the GitHub issue, for the developers of this library.
Thanks

Arnaud Delorme replied:

I think this is because this person has another plugin installed with an older version of the JAVA library. See below.
Can't import more than one file using MFFMatlabIO · Issue #27 · arnodelorme/mffmatlabio · GitHub

When I load HD EEG from .mff, getting this error (attached in the picmff ),

After reinstall this mff plugin, I could import successfully. On each brainstorm initiation, I need to reinstall mff for importing the EEG.

Can you pls fix this bug.

@harilalp I moved your post to this older topic dealing with this issue.

Make sure you don't have any other program using MFF files (eg. EEGLAB or FieldTrip) running in the same Matlab session. You'd need to close Matlab before switching between different programs using different versions of the mff IO library.

Note that could reach similar issues by using the function clear in your personal scripts.
Never call the function clear after Brainstorm has been started.

I also pushed a commit that stops asking continuously to update the mff plugin.

Thanks

error name and content
Hey there,
After one week normal usage of the brainstorm or EEGLAB for importing data, gradually I get this error and changed heap Memory and close and reopen the program every time and even checked EEGLAB was not able to import .mff files too, with repeating the same error. Also I checked Arnaud Delorme github repositories and relaed topics, and there was not something new. By the way, the only solution menains for me is just everyday 2 or 3 times which I need to import the data, I have to erase
C:\Users\XXX.brainstorm file, and open the software and from the reset option to reinstall and the to install .mff reader, in the way of importing file again successfully. Is there something that I have missed?
Thanks for your attention

Hi @AmirJafari,

Have you try these solutions:


Do you mean only Brainstorm or also Matlab?

Hello,
Thanks for your reply. If I understand correctly, I am working on the registered license Matalb that has Brainstorm software as a plugin, also I have checked the mentioned points, and those did not help.

For example I have arranged the heap size 8513 MB and I have already, after several times installing and uninstalling the brainstorm and all the plugins, never installed EEGLAB again.

installedAddons = matlab.addons.installedAddons();
pluginName = 'EEGLAB';
pluginInstalled = any(strcmp({installedAddons.Name}, pluginName));
if pluginInstalled
    fprintf('The plugin "%s" is installed.\n', pluginName);
else
    fprintf('The plugin "%s" is not installed.\n', pluginName);
end
>>> The plugin "EEGLAB" is not installed.

As an update, the only easy way to resolve my current problem is that, when I am encounter the mff importing problem, I close the program all, then deleting the C:\Users\ XX .brainstorm\plugins\mff
just the mff file and when I reopen the software to import my files, it asks me to reinstall mff form its master as an extension.

Again, I appreciate it if you have newer updates.

Best
Amir

Does it work without unistalling/installing the mff plugin?
This is to say just closing Brainstorm and Matlab, then starting Matlab and Brainstorm again.

For the first question: no it does not work, I have tried to close and reopen the matlab, and again it shows the error. Even if it requires the reset option. By the way, first I should clean C:\Users\ XX .brainstorm\plugins\mff and also then do the Brainstorm> file> Edit Preferences> reset.