Hi all,

I've been suffering from a vague BoundsError() which turned out quite
hard to debug because of a lack of information. This is (a reduced
version of) the code which tripped the issue:
> using DataFrames
> using Gadfly
> 
> function main(args)
>     df = DataFrame(x = [1, 1], y = [0, 1])
>     thepdf = SVG("/tmp/bug.svg", 210mm, 297mm)
>     theplot = plot(df, x="x", y="y", Scale.y_log10)
>     draw(thepdf, theplot)
> end
> 
> main(ARGS)

When running this, both julia 0.2 prints:
> $ julia bug.jl 
> ERROR: BoundsError()
>  in getindex at array.jl:277
> at bug.jl:11
With line 11 being the call to main... If I remove the call to main, and
execute everything in global scope, the backtrace starts at line 8,
which is the call to draw (and hence equally uninformative). Current git
master is even less useful, hiding the array.jl frame as well:
> $ julia bug.jl 
> ERROR: BoundsError()
> while loading bug.jl, in expression starting on line 11

Is the backtrace supposed to be that short? If so, how does one debug
such an issue?

Best,
-- 
Tim Besard
Computer Systems Lab
Department of Electronics & Information Systems
Ghent University

Reply via email to