#794821 libwxbase3.0-0: segmentation fault (SIGSEGV) with gnuplot5

#794821#5
Date:
2015-08-06 21:35:44 UTC
From:
To:
A reproducible crash in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
with gnuplot5:
------------------------------------------------------------------------
#!/bin/sh

set -e

cat <<EOF > tmpfile-plot
0 0
10 10
EOF

gnuplot -persist <<EOF
set term wxt
plot "tmpfile-plot" using 1:2 t '' with line
EOF

rm tmpfile-plot
echo "Scroll with the mouse wheel -> gnuplot crashes (see 'core' file)."
------------------------------------------------------------------------

Core was generated by `/usr/bin/gnuplot -persist'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f8bd16fc2c7 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0

The backtrace:

Thread 1 (Thread 0x7f8bd2dd4a00 (LWP 9205)):
#0  0x00007f8bd16fc2c7 in  () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#1  0x00007f8bd16fc989 in wxThread::Wait(wxThreadWait) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#2  0x00007f8bd2d009ce in  ()
#3  0x00007f8bd2ca5a5a in  ()
#4  0x00007f8bd2c080bd in  ()
#5  0x00007f8bceb1cb45 in __libc_start_main (main=0x7f8bd2c07a70, argc=2, argv=0x7ffe756fde98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe756fde88) at libc-start.c:287
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 4204190694647783783, 140238513017482, 140730868686480, 0, 0, -4205055871845408409, -4228928106766671513}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x7ffe756fdeb0, 0x7f8bd2bce1a8}, data = {prev = 0x0, cleanup = 0x0, canceltype = 1970265776}}}
        not_first_call = <optimized out>
#6  0x00007f8bd2c092b3 in  ()

#794821#10
Date:
2019-10-09 19:21:22 UTC
From:
To:
Sorry, I seem to have failed to respond to this before (or my response
never made it to the BTS).  I certainly did take a look before as I
found your repoducer script on my disk...

I can reproduce the crash, but it appears to be connected with the
removal of tmpfile-plot - if I add:

    sleep 5

before the "rm" command then I can use the scroll wheel for 5 seconds
but then get the crash after that - presumably changing the viewing
area causes gnuplot to try to reload the plot file or something like
that?

Hmm, I don't seem to get a core file (and sadly am struggling to work
out how to enable them on current Debian).

But repeating that after installing these packages (assuming unstable)
would be more enlightening:

libwxbase3.0-0v5-dbgsym libwxgtk3.0-gtk3-0v5-dbgsym

Cheers,
    Olly