Bug in __go_draw_axes__/do_linestyle_command
Ben Abbott
bpabbott at mac.com
Sun Feb 24 13:06:16 CST 2008
I've been working on modifying strcat.m so that it is consistent with
Matlab's. I thought I was done when I encountered a error during "make".
../../run-octave -f -q -H -p . --eval "geometryimages ('griddata',
'eps');"
error: `errbars' undefined near line 1411 column 16
error: evaluating argument list element number 1
error: if: error evaluating conditional expression
error: evaluating if command near line 1411, column 3
error: called from `do_linestyle_command' in file `/Users/bpabbott/
Development/mercurial/octave-3.0.0/scripts/plot/__go_draw_axes__.m'
error: evaluating if command near line 840, column 11
error: evaluating switch command near line 333, column 7
error: evaluating for command near line 329, column 5
error: evaluating if command near line 25, column 3
error: called from `__go_draw_axes__' in file `/Users/bpabbott/
Development/mercurial/octave-3.0.0/scripts/plot/__go_draw_axes__.m'
error: evaluating switch command near line 58, column 4
error: evaluating for command near line 56, column 2
error: evaluating if command near line 33, column 7
error: evaluating if command near line 26, column 5
error: evaluating if command near line 25, column 3
error: called from `__go_draw_figure__' in file `/Users/bpabbott/
Development/mercurial/octave-3.0.0/scripts/plot/__go_draw_figure__.m'
error: evaluating if command near line 36, column 3
error: called from `gnuplot_drawnow' in file `/Users/bpabbott/
Development/mercurial/octave-3.0.0/scripts/plot/gnuplot_drawnow.m'
error: evaluating if command near line 401, column 3
error: called from `print' in file `/Users/bpabbott/Development/
mercurial/octave-3.0.0/scripts/plot/print.m'
error: evaluating if command near line 24, column 3
error: called from `geometryimages' in file `/Users/bpabbott/
Development/mercurial/octave-3.0.0/doc/interpreter/geometryimages.m'
I isolated the problem to a call to do_linestyle_command() with is
part of __go_draw_axes__.m. The grep below shows the three instances
of do_linestyle_command. The second is missing the fifth argument
"errbars", which produces the crash.
bens-macbook:~/Development/mercurial/octave/scripts/plot bpabbott$
fgrep -C4 do_linestyle_command *.m
__go_draw_axes__.m- xaxisloc_using, yaxisloc_using);
__go_draw_axes__.m- endif
__go_draw_axes__.m- endif
__go_draw_axes__.m-
__go_draw_axes__.m: [style, typ, with] = do_linestyle_command (obj,
data_idx, mono,
__go_draw_axes__.m- plot_stream, errbars);
__go_draw_axes__.m-
__go_draw_axes__.m- if (have_newer_gnuplot || isnan (typ))
__go_draw_axes__.m- withclause{data_idx} = sprintf ("with %s
linestyle %d",
--
__go_draw_axes__.m- data_idx++;
__go_draw_axes__.m- is_image_data(data_idx) = false;
__go_draw_axes__.m- parametric(data_idx) = false;
__go_draw_axes__.m- have_cdata(data_idx) = true;
__go_draw_axes__.m: [style, typ, with] = do_linestyle_command
(obj, data_idx,
__go_draw_axes__.m- mono, plot_stream);
__go_draw_axes__.m- if (isempty (obj.keylabel))
__go_draw_axes__.m- titlespec{data_idx} = "title \"\"";
__go_draw_axes__.m- else
--
__go_draw_axes__.m- endif
__go_draw_axes__.m-
__go_draw_axes__.m-endfunction
__go_draw_axes__.m-
__go_draw_axes__.m:function [style, typ, with] = do_linestyle_command
(obj, idx, mono,
__go_draw_axes__.m- plot_stream, errbars)
__go_draw_axes__.m-
__go_draw_axes__.m- persistent have_newer_gnuplot ...
__go_draw_axes__.m- = compare_versions (__gnuplot_version__ (),
"4.0", ">");
It may be that this code is normally not encountered during make, but
is for me due a bug of my own creation.
So, I have two questions;
(1) Has anyone encountered this problem during a build in the last few
days?, or is it just me?
(2) Even if I've introduced a but, there is still a bug associated
with do_linestyle_command. What is the proper correction for this?
Shall a 5th argument be added, for example an empty string.
[style, typ, with] = do_linestyle_command (obj, data_idx, mono,
plot_stream, "");
... or should a check be made in do_linestyle_command?
if (nargin < 5)
errbars = "";
endif
Ben
More information about the Bug-octave
mailing list