Closed tpdsantos closed 6 years ago
This happens to me too. Very annoying.
More precisely, julia crashes when you open several figure windows, then close some, and select at figure windows you hadn't yet selected.
I can't reproduce any kind of crash but I can get a hang after closing the first window, when using TkAgg (not sure about other backend). It looks like the problem is that tkinter._default_root
is None
after closing the first figure:
julia> PyPlot.plt[:get_backend]()
"TkAgg"
julia> close("all")
julia> figure(1)
plot([1,2,3])
figure(2)
plot([1,2,3])
@show pyimport("tkinter")["_default_root"]
close(1)
@show pyimport("tkinter")["_default_root"];
(pyimport("tkinter"))["_default_root"] = PyObject <tkinter.Tk object .>
(pyimport("tkinter"))["_default_root"] = PyObject None
Not sure how to fix it though. TkAgg works in IPython. It looks like IPython uses tkinter._default_root.createfilehandler
in non-Windows Tk. Maybe this is a better API to use? https://github.com/ipython/ipython/blob/7.0.1/IPython/terminal/pt_inputhooks/tk.py
https://github.com/JuliaPy/PyCall.jl/pull/591 fixes the problem with TkAgg.
Thanks a lot @tkf for your quick response! It works now! I'm glad this package is actively developed, I'm going to post other issues then! :-) And yes you are right julia did not "crash", it rather "hung", I lacked the proper technical term!
Since the last update from PyPlot, PyCall and Conda, everytime I use this function :
The second figure, besides opening with a different logo than the first, doesn't respond and eventually crashes julia. Although I can simply create
Absfig
after evaluating theBalance
values and solving the problem, before the last updates I never had this problem...Did this happen to anyone? Thanks