Brainstorm not loading functional data by condition

Hi Francois,

Brainstorm is not allowing me to open the functional data (by condition) in my protocol. It does allow me to view functional data (by subject) and anatomy folders. Below are the errors that I am seeing. I have reset brainstorm multiple times. Francois, could you please help me with this?

** Error: Line 574: node_create_db_studies
** Java exception occurred:
** java.lang.ArrayIndexOutOfBoundsException: 1 >= 1

** at java.util.Vector.elementAt(Vector.java:477)

** at javax.swing.tree.DefaultMutableTreeNode.getChildAt(DefaultMutableTreeNode.java:245)

**
** Call stack:
** >node_create_db_studies.m at 574
** >panel_protocols.m>UpdateTree at 434
** >panel_protocols.m at 46
** >gui_brainstorm.m>CreateWindow/protocolDisplayModeChanged_Callback at 556
** >bst_call.m at 28
** >gui_brainstorm.m>@(h,ev)bst_call(@protocolDisplayModeChanged_Callback,h,ev) at 457

Thank you in advance. I appreciate the help.
Adam

I added an extra test that should prevent this error from happening: Bugfix: Nodes with empty names in display by condition · brainstorm-tools/brainstorm3@826ec2b · GitHub

However, this error indicates that there are deeper errors in your database, like files with empty comments.
Start by reloading the database.
Having you created files by yourself in the database? Have you moved or deleted files manually?
If you have written custom scripts? they might be the cause of your problems.

Francois,

After updating this file and brainstorm as a whole, as well as resetting brainstorm, I am still getting the same error.
I have not manually altered any files or written any custom scripts.
Do you have other ideas as to why this might be happening?

Thank you for the help!
Adam

I apologize for the response delay...

I am still getting the same error.

With the fix I made, it might not be the same error.
Please post again the full error message you get.
Please confirm that this occurs only with the view of the functional files by condition.

If this is really exactly the same error message, with the same line number, I would need further debugging information to understand and fix the problem:

  • Open file node_create_db_studies.m in the Matlab editor.
  • Put a breakpoint at line 574 (click on the left of the line)
  • Refresh the display of the database explorer to generate the error (click again on the third button above the database explorer, or press F5)
  • When the debugger stops at line 574, copy-paste the following lines in the database explorer:
     nbChild
     nodeListIntra_cond.getComment
     nodeListIntra_cond.getFileName
     nodeParent.getComment
     nodeParent.getFileName
     nodeParent.getChildAt(1)
     nodeParent.getChildAt(1).getComment
     nodeParent.getChildAt(1).getFileName
    
  • Copy-paste the output obtained in the Matlab command window
  • Press the button Continue in the Matlab ribbon "Editor", it should trigger the error. If it does not, and the debugger is stopped again at line 574, then it was not the previous node that was causing the error. You need to identify the last time the debugger stops before it crashes (count the times you click on Continue), and then execute the code above and report what you obtain in the command window. Hope this is clear enough...

Francois,

It may be helpful to know that the error I was getting is from a protocol that is located on a remote, shared network drive (i.e., not my laptop's local hard drive) that I must use a VPN to connect to when I am not on my university campus. I am beginning to wonder if either the remote drive or VPN is causing the error in node_create_db_studies.m. I say this because I have made a new protocol on my laptop's local drive to move forward with my EEG analysis and brainstorm seems to be working fine.

If you do not think this would contribute, I will go ahead and run the debugging steps above and get back to you.

As always, thank you for all your help!

Adam

I don't think the problem can come from the fact that this is a remote desktop or a network drive.
Especially if it works correctly in the other exploration mode.

@Raymundo.Cassani investigated this bug further and found the solution!

Please update Brainstorm and try again.

This seems to fix the issue.
Thank you both for your help!! @Francois @Raymundo.Cassani

Adam

1 Like