BST path and warnings

Hi Francois,

My versions of Linux OS and Matlab were recently upgraded and I’m now running into some issues with Brainstorm. When I follow the installation notes on the website and launch BST from its directory (rather than manually adding it to the Matlab path), BST is no longer in the path the next time I launch Matlab. Also, each time I launch BST, I get a long list of warnings in the Matlab window (see below). I’m now running Matlab 7.11.0 (R2010b) on Ubuntu 10.04.1 LTS. I would greatly appreciate any help you can give. Here are the warnings (at least, as many as the forum will allow me to include):

>> cd /opt/brainstorm3/
>> brainstorm
Warning: Possible deprecated use of set on a Java callback.
> In bst_splash at 54
In brainstorm at 76

BST> Starting Brainstorm:
BST> =================================
BST> Version: 3.0.100922 (22-Sep-2010)
BST> Checking internet connectivity… ok
BST> Starting OpenGL engine…
BST> Compiling main interface files…
BST> Emptying temporary directory…
BST> Initializing GUI…
Warning: Possible deprecated use of set on a Java callback.
> In gui_brainstorm>CreateWindow at 62
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In gui_component at 126
In gui_brainstorm>CreateWindow at 85
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In gui_component at 126
In gui_brainstorm>CreateWindow at 87
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In gui_component at 126
In gui_brainstorm>CreateWindow at 88
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In gui_component at 126
In gui_brainstorm>CreateWindow at 89
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In gui_component at 126
In gui_brainstorm>CreateWindow at 91
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In gui_component at 126
In gui_brainstorm>CreateWindow at 92
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In gui_component at 126
In gui_brainstorm>CreateWindow at 95
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In gui_component at 126
In gui_brainstorm>CreateWindow at 96
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In gui_component at 126
In gui_brainstorm>CreateWindow at 99
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In gui_component at 126
In gui_brainstorm>CreateWindow at 102
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In bst_navigator>CreateNavigatorMenu at 633
In bst_safeCall at 31
In bst_navigator at 43
In gui_brainstorm>CreateWindow at 107
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In bst_navigator>CreateNavigatorMenu at 634
In bst_safeCall at 31
In bst_navigator at 43
In gui_brainstorm>CreateWindow at 107
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In bst_navigator>CreateNavigatorMenu at 635
In bst_safeCall at 31
In bst_navigator at 43
In gui_brainstorm>CreateWindow at 107
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77
Warning: Possible deprecated use of set on a Java callback.
> In bst_navigator>CreateNavigatorMenu at 636
In bst_safeCall at 31
In bst_navigator at 43
In gui_brainstorm>CreateWindow at 107
In bst_safeCall at 29
In gui_brainstorm at 32
In gui_initialize at 39
In bst_startup at 333
In brainstorm at 77

Hi Will,

From Matlab 7.1 (R14SP3) to 7.11 (2010b), the developers changed progressively but radically their standards to access Java objects. It starts with warnings, like the ones you have, and in version 2011b, the same calls will generate errors… Problem: all the interface of Brainstorm is written in Java code embedded in Matlab scripts.

I knew it was going to happen… I have now to choose between keeping the backwards compatibility or providing support for the newer versions… That’s the dark side of the fully integrated and highly productive environment like Matlab…

Due to license restrictions, I do not have access to a Matlab2010b license from USC right now, so I cannot start working on that transition. But I can provide you with a quick fix. Once Brainstorm is started (if it starts…), type:
> [msg,id] = lastwarn
> warning(‘off’, id)
It would turn off the warnings until I fix that in a better way.

Can you send me the identifier of the warning (the content of the variable id) so I can disable it from Brainstorm itself ?
If not you will have to type that each time you want to start brainstorm…

For your path problem: just add your brainstorm3 folder in your Matlab path, but WITHOUT THE SUB-FOLDERS. So that you can type “brainstorm” from any folder, but do not interfere with brainstorm.

Cheers
Francois

Hi Francois,

Thanks for your very helpful reply. The path thing is straightened out now. Although, I think your advice (which of course worked) is different from the installation instructions on the Brainstorm website.

Regarding the warnings, your instructions worked beautifully for that too. As requested, here is the value of the “id” variable:

id =
MATLAB:hg:JavaSetHGProperty

Thanks again for all your help.

Best,
Will