Failure after updating brainstorm

Hey
After updating my old brainstorm version to version03-Nov-2016 I am getting the following error:

BST> Starting Brainstorm:
BST> =================================
BST> Version: 03-Nov-2016
BST> Compiling main interface files…
BST> Emptying temporary directory…
BST> Deleting old process reports…
BST> Loading configuration file…
BST> Loading default montages…
BST> Checking internet connectivity… ok
BST> Initializing user interface…
BST> Starting OpenGL engine… hardware
BST> Reading plugins folder…
BST> License accepted.
BST> Loading current protocol…
Error in gui_layout>GetScreenBrainstormAreas (line 239)
if (nargin < 1) || isempty(jBstWindow)
Output argument “jBstArea” (and maybe others) not assigned during call to “gui_layout>GetScreenBrainstormAreas”.
Error in gui_layout>TileWindows (line 447)
[jBstArea, FigArea, nbScreens] = GetScreenBrainstormAreas(jBstWindow);
Error in gui_layout>Update (line 46)
TileWindows(0);
Error in gui_layout (line 33)
eval(macro_method);
Error in bst_memory>UnloadDataSets (line 2971)
gui_layout(‘Update’);
Error in bst_memory>UnloadAll (line 2776)
UnloadDataSets(iDSToUnload);
Error in bst_memory (line 71)
eval(macro_method);
Error in gui_brainstorm>SetCurrentProtocol (line 838)
bst_memory(‘UnloadAll’, ‘Forced’);
Error in gui_brainstorm (line 32)
eval(macro_method);
Error in bst_startup (line 491)
gui_brainstorm(‘SetCurrentProtocol’, GlobalData.DataBase.iProtocol);
Error in brainstorm (line 126)
bst_startup(BrainstormHomeDir, 1, 0);

Can you tell me how to fix this?
thank s in advance

Hi Brahim,

I guess it’s because you have more than 2 screens on your computer. I never considered this case in the code…
In gui_layout.m, can you try to replace line 306:
if (nbScreens == 2)
With:
if (nbScreens > 2)

Let me know how it behaves in this case. If it solves your issue, I’ll keep this change it in the distribution.
Francois

Hi Brahim,

The new line should be (nbScreens >= 2), not (nbScreens > 2).
I made the same error in the code… but it’s fixed now.

Francois