Julia packages Tk and PyPlot don't like each other. The following code 
produces a crash of the REPL:

using Tk
using PyPlot
plot()

With the following error message:

Fatal Python error: PyEval_RestoreThread: NULL tstate
> signal (6): Aborted
> gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
> abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
> unknown function (ip: 0x7f8ecc66ed0e)
> PyEval_RestoreThread at /usr/lib/x86_64-linux-gnu/libpython2.7.so (unknown 
> line)
> unknown function (ip: 0x7f8eb569efc5)
> TclInvokeStringCommand at /usr/lib/x86_64-linux-gnu/libtcl8.6.so (unknown 
> line)
> TclNRRunCallbacks at /usr/lib/x86_64-linux-gnu/libtcl8.6.so (unknown line)
> unknown function (ip: 0x7f8ece5a3050)
> TclServiceIdle at /usr/lib/x86_64-linux-gnu/libtcl8.6.so (unknown line)
> Tcl_DoOneEvent at /usr/lib/x86_64-linux-gnu/libtcl8.6.so (unknown line)
> tcl_doevent at /home/bernd/.julia/v0.4/Tk/src/tkwidget.jl:20
> tcl_doevent at /home/bernd/.julia/v0.4/Tk/src/tkwidget.jl:20
> jlcall_tcl_doevent_21208 at  (unknown line)
> jl_apply_generic at /home/bernd/bin/julia/usr/bin/../lib/libjulia.so 
> (unknown line)
> anonymous at stream.jl:693
> unknown function (ip: 0x7f90edc7fa34)
> unknown function (ip: (nil))
> Aborted



Not sure if this is a bug or unavoidable, probably PyPlot internally uses 
Tk(?). 


One a side note, does anybody know if it is possible in a single program to 
draw on a canvas in Tk AND use a plotting window to plot some data? 
I am running a cellular automata (think Game of Life), use Tk to visualize 
the state of the automata, but now want to plot some additional functions 
and statistics of the running simulation.


Cheers, Bernd

Reply via email to