Hi,
I have used matlab for a long time and always liked it. That to say until version 2014b. This version seems to have severe concurrency problems. I got this crash today:
Error using matlab.ui.Figure/set
Axes must be an existing child of figure.
Error in nrOfUEs (line 87)
set(gcf,'CurrentAxes',ax1);
Error in Throughput_stats (line 1071)
nrOfUEs(Stop, NrUE);
Error in femto_all_thrp (line 60)
Throughput_stats(...
87 set(gcf,'CurrentAxes',ax1);
But in debug mode right after this crash manually typing
K>> set(gcf,'CurrentAxes',ax1);
Does not give an error. There are a few possible causes to this problem, depending on what the error message really mean in matlab:
1) The handle is not created
This is however unlikely since the loop
while ~ishandle(ax1)
fprintf('waiting...\n');
end
is not triggered.
2) The handle is modified in row 79 and is thus locked with a mutex lock or other preferred lock
3) The axes are modified, and thus not accessible
There may (mostl likely) also be other possible issues with this. The question is
Are there any workarounds to this problem?
My relevant code row 78-87
78
79 linkaxes([ax1 ax2], 'x');
81
82
83 while ~ishandle(ax1)
84 fprintf('waiting...\n');
85 end
87 set(gcf,'CurrentAxes',ax1);