Channel Editor and brainstorm window not closing

Hi all,

I’ve been having this issue where I open the brainstorm from matlab and try editing the channel file, and it doesn’t close after the edit, forever loading saying “Closing editor…”. Once that happens, I can’t close the brainstorm window either, and I get this error in matlab and I have to force exit via task manager. Has anyone encountered this before?

If anyone knows how to fix this, please let me know!

Below is the error message I get in the matlab command window when I try closing the brainstorm window

Undefined function or variable 'toDouble'.

Error in opaque/double (line 84)`
   dbl(i) = toDouble(cel{i});
Error in panel_channel_editor>GetTableData (line 549)
         if ~isempty(jLoc) && ~all(isnan(double(jLoc)))
Error in panel_channel_editor>PanelHidingCallback (line 216)
         FinalChannel = GetTableData(ctrl.jTableChannel);
Error in panel_channel_editor (line 39)
         eval(macro_method);
Error in gui_hide (line 72)
         isAccepted = panel_channel_editor('PanelHidingCallback');
Error in bst_memory>UnloadAll (line 3298)
         gui_hide('ChannelEditor');
Error in bst_memory (line 73)
         eval(macro_method);
Error in bst_exit (line 49)
         isCancel = bst_memory('UnloadAll', 'Forced');
Error in gui_brainstorm>CreateWindow/closeWindow_Callback (line 526)
         if (~bst_exit())

Can you share a copy of the channel file that is causing the trouble?

The path for that file can be obtained with right-click on the the channel file, then File > Copy file path to clipboard

Hello Dr. Cassani,

Thank you for your prompt response, and this is the path to the file. And it’s not just one channel file, but it’s whenever I try to edit any channel file. The path I pasted here is one of them that can be edited but doesn’t close and therefore doesn’t get the edit saved.

C:\Users\Myusername\Downloads\lab\brainstorm_db\MapMaking\data\P055\00010000000000023911_0005-export\channel.mat

Please share the file rather the the path to the file, so we can check the contents

Dear Expert

I have exactly the same error. It happens with all the files so I do not believe It is a file problem. I also have tried to open an old analysis in which I have changed the label a SEEG EEG without problems in the past, but now It gives me the same error. I am still using an old version of Matlab(2019) and the last version of Brainstorm of january. Could the problems be related to an old Matlab version in your opinion?

Indeed the error state that a function toDouble is not recognized.

Could you help me?

Best regards

Lorenzo

Hi @giolloiljolly23,

Does this happen when modifying the Loc of sensor manually? Or
When does this happens?

EDIT:

The issue seems to be related with the conversion of some Java objects in the channel editor table.

Please share this info:

  • Matlab version
  • Java version
  • OS name
  • OS type

This information can be obtained in the Brainstorm main window: Help > System info

Dear Raymundo

It is happens when I manually modify the Channel type in SEEG.

I am out of work now. I will check the matlab version and other details as soon as possible

Thanks so much

Lorenzo

Dear Raymundo

Here you have the info required:

== Brainstorm ===
Version :        3.260114
Release :        260114
Variant :        source

=== Matlab ===
Matlab version : R2020a (9.08)
Java version   : 1.8

=== System ===
OS name   :      macOS 14.1.1 (x86_64)
OS type   :      mac64
Mem total :      16384 MiB
Mem avail :      11633 MiB

Hello @giolloiljolly23,

Thank you for the detailed information. This issue is now fixed, Commit: a55c3f4
Please update your Brainstorm instance to 23-Feb-2026

It was a bug on the MathWorks side for Matlab versions R2021a and older.

FYI @mokamura79

1 Like

Dear Raymundo

Thank you so much. We were able to modify the channel table

We really appreciate

Best regards

Lorenzo

1 Like