JuliaPy / JuliaPy/PyPlot.jl

Crashing Julia on Ctrl+C

Open
#305 6 comments 4 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
488
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Loop termination crashes Julia process if I'm using PyPlot inside the loop.
PyPlot.backend is "qt5agg"
Julia 0.6.0

```
using PyPlot

for i=1:1000
plot(randn(32))
sleep(0)
end
```

```
Traceback (most recent call last):
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 197, in __draw_idle_agg
FigureCanvasAgg.draw(self)
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\backends\backend_agg.py", line 464, in draw
self.figure.draw(self.renderer)
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\artist.py", line 63, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\figure.py", line 1144, in draw
renderer, self, dsu, self.suppressComposite)
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\image.py", line 139, in _draw_list_compositing_images
a.draw(renderer)
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\artist.py", line 63, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\axes\_base.py", line 2426, in draw
mimage._draw_list_compositing_images(renderer, self, dsu)
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\image.py", line 139, in _draw_list_compositing_images
a.draw(renderer)
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\artist.py", line 63, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\lines.py", line 822, in draw
drawFunc(renderer, gc, tpath, affine.frozen())
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\lines.py", line 1267, in _draw_lines
self._lineFunc(renderer, gc, path, trans)
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\lines.py", line 1293, in _draw_solid
renderer.draw_path(gc, path, trans)
File "C:\Users\Yury Parfenov\.julia\v0.6\Conda\deps\usr\lib\site-packages\matplotlib\backends\backend_agg.py", line 166, in draw_path
self._renderer.draw_path(gc, path, transform, rgbFace)
KeyboardInterrupt
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Julia loop using PyPlot and the reported qt5agg traceback, then trace how Ctrl+C reaches the matplotlib backend_qt5agg draw path. Reproduce the crash on the stated Julia 0.6.0 setup; done means interrupting the loop no longer crashes the Julia process.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia, matplotlib, python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.