mhacontrol warning: Index in position 1 exceeds array bounds.

Post Reply
tobiasherzke
Posts: 109
Joined: Mon Jun 24, 2019 12:51 pm

mhacontrol warning: Index in position 1 exceeds array bounds.

Post by tobiasherzke » Mon Aug 26, 2019 8:45 am

Moving github issue #36 to the openMHA forum:

dhanashri-innovision has asked:
I tried running OpenMHA project with open mha running on command prompt.
whenever I give mhacontrol command with no argument, the photo for OpenMHA pops up, and then it gives the error "Index in position 1 exceeds in array bound" in a new pop up window.
if I press OK,
I get this message in command window.

mhacontrol
Warning: Index in position 1 exceeds array bounds.
C:\Program Files\openMHA\mfiles\mha_findid.m:35
C:\Program Files\openMHA\mfiles\mha_get_basic_cfg_network.m:24
C:\Program Files\openMHA\mfiles\mhacontrol.m:52
In mhacontrol (line 81)
Index in position 1 exceeds array bounds.

Error in mha_findid (line 35)
cfg.(csBase{idx(1),2}) = csBase{idx(1),1};

Error in mha_get_basic_cfg_network (line 24)
[s.base,s.all_id_plugs] = mha_findid(mha);

Error in mhacontrol (line 52)
s = mha_get_basic_cfg_network( mha );

tobiasherzke
Posts: 109
Joined: Mon Jun 24, 2019 12:51 pm

Re: mhacontrol warning: Index in position 1 exceeds array bounds.

Post by tobiasherzke » Mon Aug 26, 2019 9:02 am

I tried to reproduce but could not trigger this error.

Please give more details:
  • Do you have the latest version 4.10.0 installed?
  • Were you trying mhacontrol with Matlab or Octave, what version?
  • How have you set up the matlab search path and the java class path?
  • How have you started and configured mha.exe?

Dhanashri-Innovision
Posts: 3
Joined: Tue Sep 10, 2019 4:58 am

Re: mhacontrol warning: Index in position 1 exceeds array bounds.

Post by Dhanashri-Innovision » Tue Sep 10, 2019 5:05 am

Please give more details:
Do you have the latest version 4.10.0 installed? Yes

Were you trying mhacontrol with Matlab or Octave, what version?
I am using Matlab. typed these commands in matlab

setenv('LD_LIBRARY_PATH','')
addpath('C:\Program Files\openMHA\mfiles')
javaaddpath('C:\Program Files\openMHA\mfiles\mhactl_java.jar')


How have you set up the matlab search path and the java class path?
yes

How have you started and configured mha.exe?
started the mha through mingw-64 by ./mha.exe before starting matlab

Dhanashri-Innovision
Posts: 3
Joined: Tue Sep 10, 2019 4:58 am

Re: mhacontrol warning: Index in position 1 exceeds array bounds.

Post by Dhanashri-Innovision » Tue Sep 10, 2019 11:46 am

Hi,
Reinstalling openmha from scratch resolved this issue.
thanks.
Now the project works just fine.
Great efforts, and great work.
Hope you will keep doing better than this.

Mmar
Posts: 2
Joined: Wed Feb 12, 2020 3:39 pm

Re: mhacontrol warning: Index in position 1 exceeds array bounds.

Post by Mmar » Wed Feb 12, 2020 3:57 pm

Hi openMHA team,

I have exactly the same issue as Dhanashri-Innovision, but reinstalling did not fix it.

As for questions:

Do you have the latest version 4.10.0 installed?
I use version 4.11.0

Were you trying mhacontrol with Matlab or Octave, what version?
Matlab R2018b

How have you set up the matlab search path and the java class path?
>> setenv('LD_LIBRARY_PATH','')
>> addpath('C:\Program Files\openMHA\mfiles')
>> javaaddpath('C:\Program Files\openMHA\mfiles\mhactl_java.jar')


How have you started and configured mha.exe?
Started mha.exe via cmd by typing "mha". No further configurations.


Thanks for your support!

tobiasherzke
Posts: 109
Joined: Mon Jun 24, 2019 12:51 pm

Re: mhacontrol warning: Index in position 1 exceeds array bounds.

Post by tobiasherzke » Thu Feb 13, 2020 1:47 pm

Thanks for sharing the additional information.

I could not reproduce this with octave 5.2.0. We will try to reproduce this with Matlab2018b.

tobiasherzke
Posts: 109
Joined: Mon Jun 24, 2019 12:51 pm

Re: mhacontrol warning: Index in position 1 exceeds array bounds.

Post by tobiasherzke » Fri Feb 28, 2020 7:22 am

Interim update: We could reproduce this error with Matlab 2019. A fix is currently in code review...

tobiasherzke
Posts: 109
Joined: Mon Jun 24, 2019 12:51 pm

Re: mhacontrol warning: Index in position 1 exceeds array bounds.

Post by tobiasherzke » Mon Mar 09, 2020 2:47 pm

Update: The fix will be part of the next openMHA release. You can test and use it before we make the next release by replacing mfile mha_findid.m in your openMHA installation with this version: https://raw.githubusercontent.com/HoerT ... a_findid.m

Mmar
Posts: 2
Joined: Wed Feb 12, 2020 3:39 pm

Re: mhacontrol warning: Index in position 1 exceeds array bounds.

Post by Mmar » Tue Mar 10, 2020 3:49 pm

Thank you very much for the fix. MHA control works fine now.

Post Reply