Right click doesn't work on Mac in Brainstorm, but works fine in Matlab and other app

Have you noticed this? What is the work-around?

1 Like

Hello,

I know there are some bugs in the management of the Java events in recent versions of MacOS (example: http://stackoverflow.com/questions/20497629/mac-os-x-java-swing-mouse-released-event-is-not-fired)
All the interface of Matlab and Brainstorm is based on Java, so the source of the problem is probably there.
But so far, I’ve only seen this problem you describe on a MacOS system running in a VMWare virtual machine (which is not officially supported).

Is this happening on a clean install of a MacOS 10.9 (Mavericks) or 10.10 (Yosemite), running on Apple hardware?
Can you please copy-paste here the output of the “ver” command in your Matlab command window?

If you want to do some debugging, you can try the following:

  • Install an older version of Matlab
  • Run the compiled version of Brainstorm for Matlab 2014a (see the Installation page of the Brainstorm website, section “Without Matlab”)
  • Run the compiled version for older Matlab versions (same section)

I think I know how to fix the code, but it will take a while before I can distribute a working version…

Francois

Hello,
Could you please give me some information for trying to reproduce your bug?
Thanks
Francois

Hi All,
I’m new to Brainstorm and have a major issue that doesn’t allow me to import any data: right click doesn’t work. I use a Mac (10.10.1) and Matlab R2014b. First I did the installation with Matlab and couldn’t use right click. Then I tried to install Brainstorm without Matlab to see whether this could solve the issue. In all cases right lick doesn’t work. Are there other users having the same problem? What could be a solution to this?
Thank you in advance,
Maria Pefkou

1 Like

Hi Maria,

I moved your post to this thread because it looks like a similar issue.
I could not reproduce it on my side, and this user never got back to me.

If you’re willing to help me going through some debugging, we will probably understand where this is coming from.
Does the right-click work correctly in the Matlab interface (to create a new folder in the file explorer for instance)?
Could you answer the few other questions below?

Thanks,
Francois

Hi Francois,
thanks for the quick reply. I’d be happy to help debug this.
Right click works correctly in the Matlab interface. Both OSX and Matlab version were upgraded recently (before the installation of Brainstorm though). See pasted below the output of the command “ver”.
I’m afraid I cannot go back to an older matlab version, as you suggested . I tried the installation “without Matlab” and right click still didn’t work.
Let me know if I can help with something.
Thanks,
Maria

>> ver

MATLAB Version: 8.4.0.150421 (R2014b)
MATLAB License Number: unknown
Operating System: Mac OS X Version: 10.10.1 Build: 14B25
Java Version: Java 1.7.0_55-b13 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode

MATLAB Version 8.4 (R2014b)
Simulink Version 8.4 (R2014b)
Bioinformatics Toolbox Version 4.5 (R2014b)
Communications System Toolbox Version 5.7 (R2014b)
Control System Toolbox Version 9.8 (R2014b)
Curve Fitting Toolbox Version 3.5 (R2014b)
DSP System Toolbox Version 8.7 (R2014b)
Database Toolbox Version 5.2 (R2014b)
DatapixxToolbox Version 0.9, Aug
FastICA for Matlab 7.x and 6.x Version 2.5, October 19
FieldTrip Version unknown fieldtriptoolbox.org
Financial Toolbox Version 5.4 (R2014b)
Global Optimization Toolbox Version 3.3 (R2014b)
Image Acquisition Toolbox Version 4.8 (R2014b)
Image Processing Toolbox Version 9.1 (R2014b)
MATLAB Compiler Version 5.2 (R2014b)
Neural Network Toolbox Version 8.2.1 (R2014b)
Optimization Toolbox Version 7.1 (R2014b)
Parallel Computing Toolbox Version 6.5 (R2014b)
Partial Differential Equation Toolbox Version 1.5 (R2014b)
Psychtoolbox Version 3.0.10 1 June
Signal Processing Toolbox Version 6.22 (R2014b)
Simulink Control Design Version 4.1 (R2014b)
Statistical Parametric Mapping Version 4667 (SPM8)
Statistical Parametric Mapping Version 8.3 (SPM8)
Statistics Toolbox Version 9.1 (R2014b)
Symbolic Math Toolbox Version 6.1 (R2014b)
System Identification Toolbox Version 9.1 (R2014b)
Voxel Based Morphometry Toolbox Version 435 (VBM8)
Wavelet Toolbox Version 4.14 (R2014b)
Yokogawa MEG Reader toolbox for MATLAB Version 1.05.00
Yokogawa MEG Reader toolbox for MATLAB Version 1.04.01

1 Like

Hello,

I would like to know if the problem comes from the new graphics system used in Matlab 2014b and 2015a, or from the version of Java (<= Matlab 2012b: Java 6, after: Java 7).
Could you try to install an older version of the compiled version of Brainstorm? It requires that you install different versions of the MCR.
http://neuroimage.usc.edu/brainstorm/InstallationR2012b
http://neuroimage.usc.edu/brainstorm/InstallationR2013b
http://neuroimage.usc.edu/brainstorm/InstallationR2014a

Do you know what was the version of MacOS before upgrading to 10.10.1?
Do you know what was the first version of MacOS installed on this computer? (a full reinstallation after a disk format would count for a first installation)
What type of hardware is it ? (macbook? desktop?)

I’m sorry for this complexity… Apple decided a few years ago that Java should disappear, and since then it’s been difficult for Java developers to have things working properly and consistently on MacOS. We have to re-code many things at every minor upgrade of MacOS.

Francois

Hi Francois,
I installed all these versions, together with the corresponding MCR, but the problem persists. Maybe I should note that I firstly installed all the MCRs and then the Brainstorm versions one by one, although I suppose this is not significant.
The version of MacOS before the upgrade was 10.9. Unfortunately I don’t know which was the first MacOS installed on this computer as it was bought some time ago and I was not using it back then. According to my estimations it must have been acquired 2.5 years ago, but this is something I cannot confirm. It is an iMac desktop.
I would fully understand if this issue cannot be first priority for now, I’m quite sure I’ll find my way out using something else. Hopefully it’s not something difficult to solve though!
Best wishes,
Maria

Hi Maria,

I have tested this with a similar configuration but it works well on my end. If I cannot reproduce an error, it’s almost impossible to fix it…
I think the only option left is to debug this directly on your computer.
The function to investigate is probably brainstorm3/toolbox/gui/gui_popup.m, which creates and displays popup menus.

I guess there are two possible problems:

  1. Either the clicking event is not captured or processed correctly by the Java event management system (Swing EDT). In this case, the function gui_popup.m is not even called.
  2. Or the function gui_popup.m is creating the popup menu in a way that is not correctly interpreted on your system. In this case, the function gui_popup.m is called but does not produce the expected result (displaying the popup).

If you place a breakpoint at the beginning of the fuction and right-click somewhere, case #1 would not stop, case #2 would stop.

If you are comfortable with Matlab/Java coding, or if you find someone around you in Geneva who could help (the CMU is full of geeks), you could try to debug this yourself.
If not, you could give me access to your computer at a time where you don’t need it and I’ll test those things directly on it. We could do this easily with the program Teamviewer. Download it, run it (select the option WITHOUT installation), then send me by email the codes to connect to it (ID and password).
To send me an email: just click on my username on this forum.

Cheers,
Francois

Hi, I’m experiencing a similar problem with brainstorm. I can’t right click in the GUI, but it does work in my version of matlab and in other applications. Has this problem been resolved? I’m using a OS Yosemite 10.10.5. Here’s a copy of the output from the ver command:

MATLAB Version: 8.3.0.532 (R2014a)
MATLAB License Number: 711765
Operating System: Mac OS X Version: 10.10.5 Build: 14F27
Java Version: Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode

MATLAB Version 8.3 (R2014a)
Simulink Version 8.3 (R2014a)
Control System Toolbox Version 9.7 (R2014a)
Curve Fitting Toolbox Version 3.4.1 (R2014a)
DSP System Toolbox Version 8.6 (R2014a)
DatapixxToolbox Version 0.9, Aug
Image Acquisition Toolbox Version 4.7 (R2014a)
Image Processing Toolbox Version 9.0 (R2014a)
Instrument Control Toolbox Version 3.5 (R2014a)
Optimization Toolbox Version 7.0 (R2014a)
Parallel Computing Toolbox Version 6.4 (R2014a)
Psychtoolbox Version 3.0.11 3 July
Signal Processing Toolbox Version 6.21 (R2014a)
SimMechanics Version 4.4 (R2014a)
Simscape Version 3.11 (R2014a)
Simulink Control Design Version 4.0 (R2014a)
Stateflow Version 8.3 (R2014a)
Statistics Toolbox Version 9.0 (R2014a)
Symbolic Math Toolbox Version 6.0 (R2014a)

Thank you in advance for your time.

-Sylvia

1 Like

Hello,

Some people reported that they could fix this issues with different combinations of OS/Matlab version.
Is your system up to date? If not, try to run all the updates you can.

Can you install Matlab 2015a?
If not, try to run the compiled Brainstorm version for 2015a:
http://neuroimage.usc.edu/brainstorm/InstallationR2015a

Let me know how it goes.
Francois

Yes, I tried the compiled Brainstorm version for 2015 and was still unsuccessful. I then decided to try an external mouse that had a right button that worked as did modifying the trackpad settings for a secondary click as opposed to using control+click which wasn’t registering within brainstorm. Thank you for your time.

“Control” and two finger tap on the trackpad worked for me.

1 Like

Had the same problem but luckily the control + two finger tap helped!

2 Likes

Isn't it something can be configured on your system?