Plots.jl: QPaintDevice: Cannot destroy paint device that is being painted [SOLVED]

ericsfraga
Thu, 29 Jan 2026 13:18:25 +0000
Visualization

Good morning. Anybody here using the Plots.jl package for Julia? I am trying to generate some plots in files without having them display on the screen. I have a sequence of

plt = plot(...)
plot!(plt, ...)
plot!(plt, ...)
savefig(plt, filename)

in a script (not interactive) which invariably leads to errors while running:

QPaintDevice: Cannot destroy paint device that is being painted
Segmentation fault (core dumped)

The actual plots in the files are generated just fine and my program runs fine otherwise but the errors are annoying and the display flickers. I have tried setting the show = false option to all plot calls to no effect.

(I’ve asked this on mastodon where I got some nice answers but nothing so far that has worked unfortunately. I don’t particularly like discourse as it requires me using an overblown web browser… I’m old skool. )

2 posts - 1 participant