Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plotKDE(fg, [:l0;:l1]) StackOverflowError #65

Closed
Affie opened this issue Oct 16, 2019 · 16 comments
Closed

plotKDE(fg, [:l0;:l1]) StackOverflowError #65

Affie opened this issue Oct 16, 2019 · 16 comments

Comments

@Affie
Copy link
Member

Affie commented Oct 16, 2019

julia 1.2
new environment
]add IncrementalInference
]add RoMEPlotting
[904591bb] IncrementalInference v0.7.8
[238d586b] RoMEPlotting v0.1.7

plotKDE(fg, [:l0;:l1])
ERROR: StackOverflowError:
Stacktrace:
 [1] _array_for at ./boot.jl:404 [inlined]
 [2] collect(::Base.Generator{Array{Any,1},typeof(Compose.parse_colorant)}) at ./array.jl:608
 [3] parse_colorant at /home/johan/.julia/packages/Compose/aVZwV/src/Compose.jl:43 [inlined]
 [4] Gadfly.Guide.ManualColorKey(::String, ::Array{String,1}, ::Array{Any,1}) at /home/johan/.julia/packages/Gadfly/09PWZ/src/guide.jl:505 (repeats 15271 times)
 [5] #plotKDE#15(::Array{String,1}, ::Int64, ::Float64, ::Float64, ::Nothing, ::Nothing, ::String, ::Nothing, ::Array{String,1}, ::Nothing, ::Int64, ::Bool, ::Bool, ::Nothing, ::typeof(plotKDE), ::Array{BallTreeDensity,1}) at /home/johan/.julia/packages/KernelDensityEstimatePlotting/5LU2K/src/KernelDensityEstimatePlotting.jl:342
 [6] #plotKDE at ./array.jl:0 [inlined]
 [7] #plotKDE#2(::Array{BallTreeDensity,1}, ::Nothing, ::Nothing, ::Int64, ::Bool, ::Array{String,1}, ::typeof(plotKDE), ::DistributedFactorGraphs.GraphsDFG{SolverParams}, ::Array{Symbol,1}) at /home/johan/.julia/packages/RoMEPlotting/eFz0M/src/SolverVisualization.jl:80
 [8] plotKDE(::DistributedFactorGraphs.GraphsDFG{SolverParams}, ::Array{Symbol,1}) at /home/johan/.julia/packages/RoMEPlotting/eFz0M/src/SolverVisualization.jl:65
 [9] top-level scope at none:0
@Affie
Copy link
Member Author

Affie commented Oct 16, 2019

also

plotKDE(fg,:l0)
┌ Warning: evaluateDualTree vector evaluation API is changing for single point evaluation across multiple dimensions rather than assuming multiple points on a univariate kde.
└ @ KernelDensityEstimate ~/.julia/packages/KernelDensityEstimate/igUGE/src/DualTree01.jl:432
Error showing value of type Plot:
ERROR: MethodError: no method matching unsafe_wrap(::Type{Array}, ::Ptr{UInt8})
Closest candidates are:
  unsafe_wrap(::Union{Type{Array}, Type{Array{T,N} where N}, Type{Array{T,N}}}, ::Ptr{T}, ::Tuple{Vararg{Int64,N}}; own) where {T, N} at pointer.jl:84
  unsafe_wrap(::Union{Type{Array}, Type{Array{T,N} where N}, Type{Array{T,1}}}, ::Ptr{T}, ::Integer; own) where T at pointer.jl:89
  unsafe_wrap(::Type, ::Ptr, ::Tuple{Vararg{#s73,N}} where #s73<:Integer; own) where N at pointer.jl:92
Stacktrace:
 [1] pango_to_svg(::String) at /home/johan/.julia/packages/Compose/aVZwV/src/pango.jl:336
 [2] draw(::SVG, ::Compose.TextPrimitive{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Compose.Rotation{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}}, ::Int64) at /home/johan/.julia/packages/Compose/aVZwV/src/svg.jl:985
 [3] draw(::SVG, ::Compose.Form{Compose.TextPrimitive{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Compose.Rotation{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}}}) at /home/johan/.julia/packages/Compose/aVZwV/src/svg.jl:736
 [4] drawpart(::SVG, ::Compose.Context, ::Compose.IdentityTransform, ::Compose.UnitBox{Float64,Float64,Float64,Float64}, ::Measures.BoundingBox{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}}) at /home/johan/.julia/packages/Compose/aVZwV/src/container.jl:455
 [5] drawpart(::SVG, ::Compose.AdhocContainerPromise, ::Compose.IdentityTransform, ::Compose.UnitBox{Float64,Float64,Float64,Float64}, ::Measures.BoundingBox{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}}) at /home/johan/.julia/packages/Compose/aVZwV/src/container.jl:368
 [6] drawpart(::SVG, ::Compose.Context, ::Compose.IdentityTransform, ::Compose.UnitBox{Float64,Float64,Float64,Float64}, ::Measures.BoundingBox{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}}) at /home/johan/.julia/packages/Compose/aVZwV/src/container.jl:487 (repeats 2 times)
 [7] drawpart(::SVG, ::Compose.Table, ::Compose.IdentityTransform, ::Compose.UnitBox{Float64,Float64,Float64,Float64}, ::Measures.BoundingBox{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}}) at /home/johan/.julia/packages/Compose/aVZwV/src/container.jl:368
 [8] drawpart(::SVG, ::Compose.Context, ::Compose.IdentityTransform, ::Compose.UnitBox{Float64,Float64,Float64,Float64}, ::Measures.BoundingBox{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}}) at /home/johan/.julia/packages/Compose/aVZwV/src/container.jl:487 (repeats 2 times)
 [9] draw at /home/johan/.julia/packages/Compose/aVZwV/src/container.jl:334 [inlined]
 [10] draw at /home/johan/.julia/packages/Gadfly/09PWZ/src/Gadfly.jl:854 [inlined]
 [11] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("application/juno+plotpane")}, ::Plot) at /home/johan/.julia/packages/Gadfly/09PWZ/src/Gadfly.jl:960
 [12] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::String, ::Plot) at ./multimedia.jl:109
 [13] displayinplotpane(::Plot) at /home/johan/.julia/packages/Atom/X8fAI/src/display/showdisplay.jl:51
 [14] display(::Atom.JunoDisplay, ::Plot) at /home/johan/.julia/packages/Atom/X8fAI/src/display/showdisplay.jl:112
 [15] display(::Any) at ./multimedia.jl:323
 [16] #invokelatest#1 at ./essentials.jl:790 [inlined]
 [17] invokelatest at ./essentials.jl:789 [inlined]
 [18] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:156
 [19] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:141
 [20] (::getfield(REPL, Symbol("#do_respond#38")){Bool,getfield(Atom, Symbol("##176#177")),REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:718
 [21] #invokelatest#1 at ./essentials.jl:790 [inlined]
 [22] invokelatest at ./essentials.jl:789 [inlined]
 [23] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/LineEdit.jl:2306
 [24] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:1038
 [25] run_repl(::REPL.AbstractREPL, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:201
 [26] (::getfield(Base, Symbol("##737#739")){Bool,Bool,Bool,Bool})(::Module) at ./client.jl:390
 [27] #invokelatest#1 at ./essentials.jl:790 [inlined]
 [28] invokelatest at ./essentials.jl:789 [inlined]
 [29] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:374
 [30] exec_options(::Base.JLOptions) at ./client.jl:312
 [31] _start() at ./client.jl:464

@Affie
Copy link
Member Author

Affie commented Oct 16, 2019

I can get plotKDE(fg, :x1) |> PDF(pwd()*"/tmp/test.pdf") to work

@Affie
Copy link
Member Author

Affie commented Oct 16, 2019

Pinning to:
[904591bb] IncrementalInference v0.7.8
[238d586b] RoMEPlotting v0.1.6 ⚲

julia> plotKDE(fg, :l0)
┌ Warning: evaluateDualTree vector evaluation API is changing for single point evaluation across multiple dimensions rather than assuming multiple points on a univariate kde.
└ @ KernelDensityEstimate ~/.julia/packages/KernelDensityEstimate/igUGE/src/DualTree01.jl:432
Error showing value of type Plot:
ERROR: TypeError: in typeassert, expected Compose.PangoLayout, got Nothing
Stacktrace:
 [1] max_text_extents at /home/johan/.julia/packages/Compose/aVZwV/src/pango.jl:109 [inlined]
 [2] max_text_extents(::String, ::Measures.Length{:mm,Float64}, ::String) at /home/johan/.julia/packages/Compose/aVZwV/src/pango.jl:124
 [3] render(::Gadfly.Guide.XLabel, ::Theme, ::Gadfly.Aesthetics) at /home/johan/.julia/packages/Gadfly/09PWZ/src/guide.jl:929
 [4] render(::Gadfly.Guide.XLabel, ::Theme, ::Gadfly.Aesthetics, ::Bool) at /home/johan/.julia/packages/Gadfly/09PWZ/src/guide.jl:141
 [5] #render_prepared#99(::Bool, ::Bool, ::typeof(Gadfly.render_prepared), ::Plot, ::Gadfly.Coord.Cartesian, ::Gadfly.Aesthetics, ::Array{Gadfly.Aesthetics,1}, ::Array{Array{Gadfly.StatisticElement,1},1}, ::Array{Array{Gadfly.Aesthetics,1},1}, ::Array{Array{Gadfly.Data,1},1}, ::Dict{Symbol,Gadfly.ScaleElement}, ::Array{Gadfly.GuideElement,1}) at /home/johan/.julia/packages/Gadfly/09PWZ/src/Gadfly.jl:823
 [6] render_prepared(::Plot, ::Gadfly.Coord.Cartesian, ::Gadfly.Aesthetics, ::Array{Gadfly.Aesthetics,1}, ::Array{Array{Gadfly.StatisticElement,1},1}, ::Array{Array{Gadfly.Aesthetics,1},1}, ::Array{Array{Gadfly.Data,1},1}, ::Dict{Symbol,Gadfly.ScaleElement}, ::Array{Gadfly.GuideElement,1}) at /home/johan/.julia/packages/Gadfly/09PWZ/src/Gadfly.jl:803
 [7] render(::Plot) at /home/johan/.julia/packages/Gadfly/09PWZ/src/Gadfly.jl:749
 [8] draw at /home/johan/.julia/packages/Gadfly/09PWZ/src/Gadfly.jl:854 [inlined]
 [9] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("application/juno+plotpane")}, ::Plot) at /home/johan/.julia/packages/Gadfly/09PWZ/src/Gadfly.jl:960
 [10] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::String, ::Plot) at ./multimedia.jl:109
 [11] displayinplotpane(::Plot) at /home/johan/.julia/packages/Atom/X8fAI/src/display/showdisplay.jl:51
 [12] display(::Atom.JunoDisplay, ::Plot) at /home/johan/.julia/packages/Atom/X8fAI/src/display/showdisplay.jl:112
 [13] display(::Any) at ./multimedia.jl:323
 [14] #invokelatest#1 at ./essentials.jl:790 [inlined]
 [15] invokelatest at ./essentials.jl:789 [inlined]
 [16] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:156
 [17] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:141
 [18] (::getfield(REPL, Symbol("#do_respond#38")){Bool,getfield(Atom, Symbol("##176#177")),REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:718
 [19] #invokelatest#1 at ./essentials.jl:790 [inlined]
 [20] invokelatest at ./essentials.jl:789 [inlined]
 [21] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/LineEdit.jl:2306
 [22] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:1038
 [23] run_repl(::REPL.AbstractREPL, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:201
 [24] (::getfield(Base, Symbol("##737#739")){Bool,Bool,Bool,Bool})(::Module) at ./client.jl:390
 [25] #invokelatest#1 at ./essentials.jl:790 [inlined]
 [26] invokelatest at ./essentials.jl:789 [inlined]
 [27] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:374
 [28] exec_options(::Base.JLOptions) at ./client.jl:312
 [29] _start() at ./client.jl:464

@Affie
Copy link
Member Author

Affie commented Oct 16, 2019

julia> plotKDE(fg, [:l0;:l1])
ERROR: UndefVarError: getColorsByLength not defined
Stacktrace:
 [1] #plotKDE#2(::Array{BallTreeDensity,1}, ::Nothing, ::Nothing, ::Int64, ::Bool, ::typeof(plotKDE), ::DistributedFactorGraphs.GraphsDFG{SolverParams}, ::Array{Symbol,1}) at /home/johan/.julia/packages/RoMEPlotting/Vr0Yb/src/SolverVisualization.jl:78
 [2] plotKDE(::DistributedFactorGraphs.GraphsDFG{SolverParams}, ::Array{Symbol,1}) at /home/johan/.julia/packages/RoMEPlotting/Vr0Yb/src/SolverVisualization.jl:63
 [3] top-level scope at none:0

@dehann
Copy link
Member

dehann commented Oct 16, 2019

getColorsByLength should be in KDEPlotting. I recently moved it up. Might be missing an export, can be fixed by workaround by import in RoMEPlotting

@dehann
Copy link
Member

dehann commented Oct 16, 2019

or should reexport it rather from RoMEPlotting

@dehann
Copy link
Member

dehann commented Oct 16, 2019

ERROR: TypeError: in typeassert, expected Compose.PangoLayout, got Nothing

Looks like an upstream error

@dehann
Copy link
Member

dehann commented Oct 16, 2019

What version of Gadfly and Compose do you have?

@dehann
Copy link
Member

dehann commented Oct 16, 2019

Warning: evaluateDualTree vector evaluation API is changing for single point

is an old warning and not too serious. Will fix at some point.

@Affie
Copy link
Member Author

Affie commented Oct 16, 2019

[[Gadfly]]
version = "1.0.1"

[[Compose]]
version = "0.7.3"

@dehann
Copy link
Member

dehann commented Oct 16, 2019

something is wrong with my registry too: :-P

(rp65) pkg> status
    Status `/tmp/rp65/Project.toml`
  [904591bb] IncrementalInference v0.7.8
  [238d586b] RoMEPlotting v0.1.6

(rp65) pkg> update
  Updating registry at `~/.julia/registries/General`
┌ Warning: Some registries failed to update:
│     — `~/.julia/registries/General` — registry dirty
└ @ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/Pkg/src/Types.jl:1171
 Resolving package versions...
  Updating `/tmp/rp65/Project.toml`
 [no changes]
  Updating `/tmp/rp65/Manifest.toml`
 [no changes]

EDIT: fixed locally

@dehann
Copy link
Member

dehann commented Oct 16, 2019

This seems to be working fine on my local machine but not seeing where I fixed it. Will just make sure everything is committed and will tag all repos. Adding a new test to RoMEPlotting to make sure this issue is resolved.

@dehann
Copy link
Member

dehann commented Oct 16, 2019

The pango layout error is upstream, workaround is ]add [email protected], see
GiovineItalia/Gadfly.jl#1324

@dehann
Copy link
Member

dehann commented Oct 16, 2019

right, here is a full list that works:

(rp65) pkg> status
    Status `/tmp/rp65/Project.toml`
  [159f3aea] Cairo v0.6.0
  [a81c6b42] Compose v0.7.4
  [904591bb] IncrementalInference v0.7.8
  [c43967c8] KernelDensityEstimatePlotting v0.1.2 [`~/.julia/dev/KernelDensityEstimatePlotting`]
  [91fb55c2] RoME v0.4.2
  [238d586b] RoMEPlotting v0.1.7

@dehann
Copy link
Member

dehann commented Oct 17, 2019

@Affie
Copy link
Member Author

Affie commented Oct 17, 2019

Success! Issue can be closed as soon as KDEPlotting tag comes through.
image

@dehann dehann closed this as completed in c156cdd Oct 17, 2019
dehann added a commit that referenced this issue Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants