GiovineItalia / Gadfly.jl

Crafty statistical graphics for Julia.
http://gadflyjl.org/stable/
Other
1.9k stars 251 forks source link

Geom.histogram2d segfaults with latest julia on OS X and Linux #808

Open protogeezer opened 8 years ago

protogeezer commented 8 years ago

It turns out that other geometries are having even bigger issues...

et-imac-retina:~ sjbespa$ julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+2826 (2016-02-22 16:08 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 1b27f62* (0 days old master)
|__/                   |  x86_64-apple-darwin15.4.0

julia> using Gadfly
WARNING: New definition 
    write(GZip.GZipStream, Array{#T<:Any, N<:Any}) at /Users/sjbespa/.julia/v0.5/GZip/src/GZip.jl:456
is ambiguous with: 
    write(Base.IO, Array{UInt8, N<:Any}) at io.jl:154.
To fix, define 
    write(GZip.GZipStream, Array{UInt8, N<:Any})
before the new definition.

julia> plot(x=randn(10000),y=randn(10000),Geom.histogram2d(xbincount=100,ybincount=100))
WARNING: 
    Using non-boolean collections with any(itr) is deprecated, use reduce(|, itr) instead.
    If you are using any(map(f, itr)) or any([f(x) for x in itr]), use any(f, itr) instead.
 in depwarn(::ASCIIString, ::Symbol) at ./deprecated.jl:64
 in nonboolean_any(::Array{Any,1}) at ./deprecated.jl:808
 in any(::Array{Any,1}) at ./reduce.jl:363
 [inlined code] from ./boot.jl:331
 in (::Gadfly.#mapped_and_used#32)(::Array{Symbol,1}) at /Users/sjbespa/.julia/v0.5/Gadfly/src/Gadfly.jl:610
 in render_prepare(::Gadfly.Plot) at /Users/sjbespa/.julia/v0.5/Gadfly/src/Gadfly.jl:631
 in render(::Gadfly.Plot) at /Users/sjbespa/.julia/v0.5/Gadfly/src/Gadfly.jl:718
 [inlined code] from /Users/sjbespa/.julia/v0.5/Gadfly/src/Gadfly.jl:822
 in display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::MIME{symbol("text/html")}, ::Gadfly.Plot) at /Users/sjbespa/.julia/v0.5/Gadfly/src/Gadfly.jl:952
 [inlined code] from ./expr.jl:8
 in display(::Gadfly.Plot) at /Users/sjbespa/.julia/v0.5/Gadfly/src/Gadfly.jl:904
 in print_response(::Base.Terminals.TTYTerminal, ::Any, ::Void, ::Bool, ::Bool, ::Void) at ./REPL.jl:134
 in print_response(::Base.REPL.LineEditREPL, ::Any, ::Void, ::Bool, ::Bool) at ./REPL.jl:121
 in (::Base.REPL.##18#19{Bool,Base.#parse_input_line,Base.REPL.LineEditREPL,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at ./REPL.jl:626
 in run_interface(::Base.Terminals.TTYTerminal, ::Base.LineEdit.ModalInterface) at /usr/local/lib/julia/sys-debug.dylib:-1
 in run_frontend(::Base.REPL.LineEditREPL, ::Base.REPL.REPLBackendRef) at /usr/local/lib/julia/sys-debug.dylib:-1
 in run_repl(::Base.REPL.LineEditREPL, ::Base.##479#480) at ./REPL.jl:167
 in _start() at /usr/local/lib/julia/sys-debug.dylib:-1
while loading no file, in expression starting on line 0

signal (11): Segmentation fault: 11
while loading no file, in expression starting on line 0
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1848
[inline] at ./range.jl:83
render_continuous_color_key at /Users/sjbespa/.julia/v0.5/Gadfly/src/guide.jl:336
unknown function (ip: 0x31972d828)
jl_call_method_internal at /Users/sjbespa/work/julia/julia-0.5/src/julia_internal.h:69
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1903
render at /Users/sjbespa/.julia/v0.5/Gadfly/src/guide.jl:454
render at /Users/sjbespa/.julia/v0.5/Gadfly/src/guide.jl:50
unknown function (ip: 0x3196f30b3)
jl_call_method_internal at /Users/sjbespa/work/julia/julia-0.5/src/julia_internal.h:69
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1879
render_prepared at /Users/sjbespa/.julia/v0.5/Gadfly/src/Gadfly.jl:795
unknown function (ip: 0x317dadc86)
unknown function (ip: 0x317dadd33)
jl_call_method_internal at /Users/sjbespa/work/julia/julia-0.5/src/julia_internal.h:69
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1879
render at /Users/sjbespa/.julia/v0.5/Gadfly/src/Gadfly.jl:722
[inline] at /Users/sjbespa/.julia/v0.5/Gadfly/src/Gadfly.jl:822
display at /Users/sjbespa/.julia/v0.5/Gadfly/src/Gadfly.jl:952
unknown function (ip: 0x3141d52f7)
jl_call_method_internal at /Users/sjbespa/work/julia/julia-0.5/src/julia_internal.h:69
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1903
[inline] at ./expr.jl:8
display at /Users/sjbespa/.julia/v0.5/Gadfly/src/Gadfly.jl:904
unknown function (ip: 0x3141c1db0)
jl_call_method_internal at /Users/sjbespa/work/julia/julia-0.5/src/julia_internal.h:69
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1903
print_response at ./REPL.jl:136
unknown function (ip: 0x31416b629)
jl_call_method_internal at /Users/sjbespa/work/julia/julia-0.5/src/julia_internal.h:69
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1879
print_response at ./REPL.jl:121
unknown function (ip: 0x31416a119)
jl_call_method_internal at /Users/sjbespa/work/julia/julia-0.5/src/julia_internal.h:69
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1879
#18 at ./REPL.jl:626
unknown function (ip: 0x31374c75f)
jl_call_method_internal at /Users/sjbespa/work/julia/julia-0.5/src/julia_internal.h:69
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1879
run_interface at /usr/local/lib/julia/sys-debug.dylib (unknown line)
jlcall_run_interface_18884 at /usr/local/lib/julia/sys-debug.dylib (unknown line)
jl_call_method_internal at /Users/sjbespa/work/julia/julia-0.5/src/julia_internal.h:69
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1879
run_frontend at /usr/local/lib/julia/sys-debug.dylib (unknown line)
run_repl at ./REPL.jl:168
unknown function (ip: 0x305f29190)
jl_call_method_internal at /Users/sjbespa/work/julia/julia-0.5/src/julia_internal.h:69
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1903
_start at /usr/local/lib/julia/sys-debug.dylib (unknown line)
jlcall__start_19524 at /usr/local/lib/julia/sys-debug.dylib (unknown line)
jl_call_method_internal at /Users/sjbespa/work/julia/julia-0.5/src/julia_internal.h:69
jl_apply_generic at /Users/sjbespa/work/julia/julia-0.5/src/gf.c:1879
jl_apply at /usr/local/bin/julia (unknown line)
true_main at /usr/local/bin/julia (unknown line)
main at /usr/local/bin/julia (unknown line)
Allocations: 19436063 (Pool: 19427795; Big: 8268); GC: 37
Segmentation fault: 11
et-imac-retina:~ sjbespa$ 
protogeezer commented 8 years ago

@Keno this problem and #807 both when away when I checked out and built a Julia commit on 1/31. It will take a while to do a binary search between the current commits and the end of January to figure out where exactly something went sideways.

protogeezer commented 8 years ago

@JeffBezanson: After more analysis it appears that this problem happens starting with commit 464904e17256e0e3fdb9f50d0d401abf3d8547d1 on 2/10. In addition to #807 it is feasible that #804 is also caused by whatever changed then. Some times the plot for this issue shows up with the undefined variable as per 804. Other times the plot results in the segfault.

protogeezer commented 8 years ago

@timholy, @darwindarak - guys, how does one get the attention of someone about this bug? The various manifestations don't seem to be consistent. It stops if I back up to the commit mentioned above. It may not even have much to do with Gadfly, per se.

protogeezer commented 8 years ago

@tbreloff - Tom can you build the 0.5 master, then type "using Gadfly" without a segfault? Am I the only one seeing this? If I had a clue what was going wrong here, I'd either document it more clearly or fix it to the point of being able to work with julia...

tbreloff commented 8 years ago

Fresh 0.5 master install... just for you: https://gist.github.com/tbreloff/75ba9fd714f57b4a15c3

protogeezer commented 8 years ago

Thanks for helping me out. It will get further if you apply the following simple (and maybe not correct) patch:

et-imac-retina:~ sjbespa$ diff .julia/v0.5.bak/Loess/src .julia/v0.5/Loess/src diff .julia/v0.5.bak/Loess/src/Loess.jl .julia/v0.5/Loess/src/Loess.jl 227c227

< function normalize_model!{T <: AbstractFloat}(xs::AbstractMatrix{T}, q::T=0.100000000000000000001)

function Base.normalize!{T <: AbstractFloat}(xs::AbstractMatrix{T}, q::T=0.100000000000000000001)

Or alternatively, change the name of normalize to normalizer?

Stephen

On Mar 9, 2016, at 12:53 PM, Tom Breloff notifications@github.com wrote:

Fresh 0.5 master install... just for you: https://gist.github.com/tbreloff/75ba9fd714f57b4a15c3

— Reply to this email directly or view it on GitHub.