Closed Datseris closed 6 years ago
Oh. This is on Julia 0.7-alpha.0 and [d330b81b] PyPlot v2.5.0
[438e738f] PyCall v1.17.1
.
Notice something important: The exact same piece of code works on Julia 0.6 with
- PyCall 1.16.1
- PyPlot 2.5.0
(and a different branch of DynamicalBilliards of course).
I am using the same python installation in both 0.7 and 0.6 julia versions and related PyCall packages. This eliminates the problem coming from the Python distribution.
on Linux (again using julia 0.7.0 alpha and the same PyPlot and PyCall versions) I get a slightly less verbose but similarily fatal error
julia> using DynamicalBilliards
┌ Warning: `convert(::Type{VersionNumber}, v::AbstractString)` is deprecated, use `VersionNumber(v)` instead.
│ caller = __init__() at init.jl:178
└ @ PyPlot init.jl:178
julia> bd = billiard_bunimovich()
Billiard{Float64} with 4 obstacles:
Bottom wall
Right semicircle
Top wall
Left semicircle
julia> o = bd[2]
Right semicircle {Float64}
center: [1.0, 0.5]
radius: 0.5
facedir: [-1.0, 0.0]
julia> plot_obstacle!(o)
signal (11): Segmentation fault
in expression starting at no file:0
PyObject_Call at /usr/lib/libpython3.6m.so (unknown line)
unknown function (ip: 0x7ffd39ff2a1f)
unknown function (ip: 0x7f8d76be1c7f)
Allocations: 67611774 (Pool: 67600853; Big: 10921); GC: 151
Segmentation fault (core dumped)
Once again, this is the plot_obstacle!
function:
Arc = PyPlot.matplotlib[:patches][:Arc]
function plot_obstacle!(d::Semicircle; kwargs...)
theta1 = atan(d.facedir[2], d.facedir[1])*180/π + 90
theta2 = theta1 + 180
edgecolor = (0,0.6,0)
s1 = Arc(d.c, 2d.r, 2d.r, theta1 = theta1, theta2 = theta2, edgecolor = edgecolor,
lw = 2.0, kwargs...)
PyPlot.gca()[:add_artist](s1)
end
Hi @stevengj ! I am very happy to say that this is solved on current master. Can you please tag a new release and close this?
A new release of PyCall or PyPlot?
I just tagged a new PyPlot release.
Note that on master, the default backend has changed from qt to tk on some platforms — it could be that this is why you stopped hitting the crash.
Hello. I am getting this error which is maddening me, because It did not happen in previous versions.
The problem is, I can't find which is the version that broke it...
I am pasting full steps to replicate, and error message and then I'll tell you more information on the error.
The function
plot_obstacle!
with this argument calls the following piece of code:which is supposed to plot an arc. But then this error happens.
The real problem is that if I paste these code lines one by one in the REPL, everything works ok. But if I call them like a function I get that huge error and Julia crashes
:(