Skip to content

plotting causes SEGFAULT #419

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

Closed
dlfivefifty opened this issue Jan 17, 2019 · 14 comments
Closed

plotting causes SEGFAULT #419

dlfivefifty opened this issue Jan 17, 2019 · 14 comments

Comments

@dlfivefifty
Copy link

julia> versioninfo()
Julia Version 1.0.2
Commit d789231e99 (2018-11-08 20:11 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.2.0)
  CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)

julia> using PyPlot

julia> plot(1:10)
Segmentation fault: 11

A window briefly appears before the SEGFAULT.

@cormullion
Copy link

cormullion commented Jan 24, 2019

A bit more information from the crash on my mac:

julia-1.1> using PyPlot

julia-1.1> x = range(0; stop=2*pi, length=1000); y = sin.(3 * x + 4 * cos.(2 * x));

julia-1.1> plot(x, y, color="red", linewidth=2.0, linestyle="--")
2019-01-24 09:11:10.174 julia[662:29121764] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fbafd8318c0
2019-01-24 09:11:10.174 julia[662:29121764] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fbafd8318c0'
*** First throw call stack:
(
)
libc++abi.dylib: terminating with uncaught exception of type NSException

signal (6): Abort trap: 6
in expression starting at no file:0
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 12760827 (Pool: 12759145; Big: 1682); GC: 27
Abort trap: 6

using [d330b81b] PyPlot v2.7.0

Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin14.5.0) (Mojave)
CPU: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)

@cormullion
Copy link

(May be the same as #253.)

@stevengj
Copy link
Member

stevengj commented Jan 24, 2019

It works fine for me on my Mac with the Conda python. What are PyPlot.backend and PyPlot.PyCall.python? I have:

julia> PyPlot.backend
"qt5agg"

julia> PyPlot.PyCall.python
"/Users/stevenj/.julia/conda/3/bin/python"

@dlfivefifty
Copy link
Author

Exactly the same thing:

julia> PyPlot.backend
"qt5agg"

julia> PyPlot.PyCall.python
"/Users/solver/.julia/conda/3/bin/python"

@stevengj
Copy link
Member

Does it work in Python? Try:

using PyCall
ENV["MPLBACKEND"]="qt5agg"
run(`$(PyCall.python) -c "import matplotlib.pyplot as plt; plt.plot([1,2,3,4]); plt.show()"`)

@dlfivefifty
Copy link
Author

Yes, it works!

@stevengj
Copy link
Member

I still can't reproduce. I'm using Julia 1.1.0 on macos 10.14, and I ran Conda.update() to make sure I'm using the latest Conda packages; can you try that?

@dlfivefifty
Copy link
Author

Just did and still it crashes

@stevengj
Copy link
Member

stevengj commented Jan 24, 2019

Are you using JuliaPro, the standard julialang.org download, or a custom build?

@dlfivefifty
Copy link
Author

Julia 1.0.2 built from source with MKL:

julia> versioninfo()
Julia Version 1.0.2
Commit d789231e99 (2018-11-08 20:11 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.2.0)
  CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)

@stevengj
Copy link
Member

Duplicate of JuliaPy/PyCall.jl#443.

Julia's MKL conflicts with the one used in NumPy.

@stevengj
Copy link
Member

By the way, what does LinearAlgebra.BLAS.vendor() print for such builds? It might be nice to print a warning.

@dlfivefifty
Copy link
Author

julia> LinearAlgebra.BLAS.vendor()
:mkl

@stevengj
Copy link
Member

Warning added in JuliaPy/PyCall.jl#637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants