sglyon / ORCA.jl

Julia interface to Plotly's ORCA image exporter app
3 stars 5 forks source link

Having trouble saving 3D plots #7

Closed kylecarbon closed 4 years ago

kylecarbon commented 5 years ago

Hi! I'm having trouble saving 3D figures on my system and I'm not sure where to look to next.

I can save regular plots generated via scatter. Once I switch to scatter3d, I get the error below. Any thoughts?

System info

julia> versioninfo()
Julia Version 1.0.2
Commit d789231e99 (2018-11-08 20:11 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
Environment:
  JULIA_GPG = 3673DF529D9049477F76B37566E3C7DC03D6E495
  JULIA_PATH = /usr/local/julia
  JULIA_VERSION = 1.0.2

MWE (from the 3D section in the docs)

julia> n = 400
    rw() = cumsum(randn(n))
    trace1 = scatter3d(;x=rw(),y=rw(), z=rw(), mode="lines",
                        marker=attr(color="#1f77b4", size=12, symbol="circle",
                                    line=attr(color="rgb(0,0,0)", width=0)),
                        line=attr(color="#1f77b4", width=1))
scatter3d with fields line, marker, mode, type, x, y, and z

julia> p = plot([trace1])

julia> using ORCA

julia> savefig(p, "test.png")
Unreachable reached at 0x7f13fca1f227

signal (4): Illegal instruction
in expression starting at no file:0
#open#294 at ./iostream.jl:371
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1831
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
open at ./iostream.jl:367 [inlined]
#savefig#2 at /root/.julia/packages/ORCA/ZfBvW/src/ORCA.jl:68 [inlined]
savefig at /root/.julia/packages/ORCA/ZfBvW/src/ORCA.jl:63
unknown function (ip: 0x7f13fca1ef9a)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1831
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
#savefig#44 at /root/.julia/packages/PlotlyJS/ENOSE/src/savefig_orca.jl:1
unknown function (ip: 0x7f13fca1ecdf)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1831
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
savefig at /root/.julia/packages/PlotlyJS/ENOSE/src/savefig_orca.jl:1
unknown function (ip: 0x7f13fca1ebca)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1831
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:324
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:430
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:363 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:682
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:806
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f14204027bf)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:815
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:805
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:622
eval at ./boot.jl:319
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:85
macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:117 [inlined]
#28 at ./task.jl:259
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2184
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1537 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:268
unknown function (ip: 0xffffffffffffffff)
Allocations: 106294005 (Pool: 106273711; Big: 20294); GC: 237
Illegal instruction (core dumped)
sglyon commented 5 years ago

Hi @kylecarbon I'm sorry, I don't really know what is going wrong here and am not sure I will be able to take a close look in the coming weeks.

One thing that could be helpful if you are up for it would be to test if your example works with the plotly python package. Behind the scenes they are both using the same underlying approach for saving figures. If plotly.py can save the figure then we know the problem is here. If plotly.py can't do it then I'd guess the problem is with the underlying ORCA library.

kylecarbon commented 4 years ago

@sglyon sorry for the lack of follow-up but I don't have this issue anymore with Julia v1.3.1 and ORCA v0.3.1.