gnuplot freezes if the wx terminal is used

Bug #300829 reported by dqsfd
108
This bug affects 16 people
Affects Status Importance Assigned to Milestone
gnuplot (Debian)
Fix Released
Unknown
gnuplot (Ubuntu)
Confirmed
Undecided
Unassigned
octave2.9 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: gnuplot

I'm using ubuntu 8.10 and gnuplot (version 4.2.3-1) crashes on opening a new window.

Here is what needs to be typed at gnuplot's prompt :
plot x
set terminal wxt 1

Then gnuplot just don't respond anymore.

Revision history for this message
Bernardo Mello (bmello67) wrote :

I have a similar problem with the very first window I plot. The graphic windows freezes after plotting any graphics, like

plot sin(x)

After showing the graphic, the graphic window doesn't update if you move another window in front of it. If you type a gnuplot command that doesn't use the graphic window, like a=2, it is ok. However, if you try to plot another graphic, the whole gnuplot freezes.

Revision history for this message
Bernardo Mello (bmello67) wrote :

I forgot saying that it only occurs in my 64 bits installation. No problems with the 32 bits one.

Revision history for this message
sancho-fx1 (sancho-fx3) wrote :

The same happens with me. The figure window freezes after been displayed for a couple of seconds. I discovered it in octave first, then confirmed that it happens in gnuplot also (ubuntu 8.10, ibex, i386). Everything used to work fine 2 weeks ago, might be related to some recent system update?

Revision history for this message
wollig (wollig) wrote :

Same for me
I use ubuntu 8.10 kernel 2.6.27-11, gnuplot Version 4.2 patchlevel 3
I can do one plot, then gnuplot freezes.

i tried 'strace gnuplot ...'
what i can see then
(1) gnuplot starts up (no window yet) and 'hangs' in read, which is ok
(2) i type 'plot sin(x)'
(3) gnuplot displays the expected plot
(4) gnuplot now calls select endlessly with a timeout of (i guess 10000 nanoseconds) and always returns with timeout. This is ok as i did not type anything until now
(5) i type 'set xrange [-1:1]; replot'
(6) now gnuplot freezes, nothing is plotted

in strace i see the following lines at the end of the trace
rt_sigaction(SIGFPE, {0x429f00, [FPE], SA_RESTORER|SA_RESTART, 0x7f7558537060}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGFPE, {SIG_DFL}, {0x429f00, [FPE], SA_RESTORER|SA_RESTART, 0x7f7558537060}, 8) = 0
rt_sigaction(SIGINT, {0x4da970, [INT], SA_RESTORER|SA_RESTART, 0x7f7558537060}, {0x45fbf0, [INT], SA_RESTORER|SA_RESTART, 0x7f7558537060}, 8) = 0
futex(0x12ca540, 0x80 /* FUTEX_??? */, 2

The last line seems incomplete to me, but i am not very familiar with strace. For me it looks like, that gnuplot is waiting for some trigger to continue. In fact, i would expect a 'select' again.
Maybe this description is of any help

Revision history for this message
wollig (wollig) wrote :

One important thing i forgot to mention:

gnuplot works fine if i set the terminal to x11 (gnuplot> set terminal x11) before plotting

Revision history for this message
Bernardo Mello (bmello67) wrote :

I observed the same behaviour described by wolling in my machine, i.e., if I set the terminal to X11, gnuplot works fine.

Revision history for this message
Pietro Battiston (toobaz) wrote :

Can reproduce this in Intrepid, but not in (64 bit) (up to date 13 Feb 2009) Jaunty, where there is no problem.

Revision history for this message
Heikki Mäntysaari (heikki-mantysaari) wrote :

I can confirm this. Terminal is by default set to wxt and if it is used then Gnuplot freezes when I have plotted something. X11 terminal works fine.

I'm using Intrepid (64bit) and Gnuplot 4.2.3-1. I tried to upgrade Gnuplot to 4.2.4-1 using Jauntys packages but it didn't help.

Changed in gnuplot (Ubuntu):
status: New → Confirmed
Revision history for this message
Jorrit Kronjee (jorrit-wafel) wrote :

I can confirm this problem has been solved in Jaunty.

Revision history for this message
Heikki Mäntysaari (heikki-mantysaari) wrote :

I can still confirm this problem in Jaunty. First plot works and when I see the window I can push the buttons etc., but when I try to close it or plot an another graph the window freezes and I have to kill it. I'm using 64-bit Jaunty and the "radeon" driver (card is Radeon HD 4850).

On the other hand I don't see this bug on my netbook (Acer Aspire One) using Jauntys lpia-build: gnuplot works well. The graphics card is Intel Mobile 945GM. So does this have something to do with a video driver?

Revision history for this message
Heikki Mäntysaari (heikki-mantysaari) wrote :

This bug is not in Octave

Changed in octave2.9 (Ubuntu):
status: New → Invalid
Revision history for this message
dqsfd (uams) wrote :

I confirm this issue is still present in Jaunty.

Revision history for this message
Heikki Mäntysaari (heikki-mantysaari) wrote :

There is a workaround for this bug described on report #239466: go to System -> Preferences -> Accessibility and deactivate the checkbox "Activate accessibility" (or whatever it is in English, I use my system in Finnish). You may need to log out. After that gnuplot seems to work (any ideas why?)

Revision history for this message
Heikki Mäntysaari (heikki-mantysaari) wrote :

It looks like gnuplot freezes when the window is reactivated.

When I run gnuplot under gdb, I get the following backtrace when the window has freezed:
Terminal type set to 'wxt'
gnuplot> plot x
[New Thread 0x7fa47c02f950 (LWP 29279)]
[New Thread 0x7fa47b551950 (LWP 29280)]
gnuplot>
Program received signal SIGINT, Interrupt.
[Switching to Thread 0x7fa4883137e0 (LWP 29278)]
0x00007fa485b0f742 in select () from /lib/libc.so.6
(gdb) bt
#0 0x00007fa485b0f742 in select () from /lib/libc.so.6
#1 0x00000000004dd0b1 in wxt_waitforinput ()
    at ../../../src/wxterminal/wxt_gui.cpp:2867
#2 0x000000000046fd1d in getc_wrapper (fp=0x1) at ../../../src/readline.c:96
#3 0x00007fa487f1fc8f in ?? () from /usr/lib/libedit.so.2
#4 0x00007fa487f1540b in el_gets () from /usr/lib/libedit.so.2
...

So the problem seems to be in a wxt_waitforinput() function (file wxterminal/wxt_gui.cpp). When the window freezes the loop starting from line 2856 keeps running. Any ideas why?

This report may also be related with this: https://bugzilla.redhat.com/show_bug.cgi?id=479085

Revision history for this message
cristian (cristiancozzolino) wrote :

"*** This bug is a duplicate of bug 300829 ***
    https://bugs.launchpad.net/bugs/300829

** This bug has been marked a duplicate of bug 300829
   gnuplot crashes on opening a second window

--
Gnuplot crashes
https://bugs.launchpad.net/bugs/239466"

This isn't true because I've not to open a second windows to cause a crash. ;)

This bug, howewer is fixed in Jaunty :)

Revision history for this message
Heikki Mäntysaari (heikki-mantysaari) wrote :

No, this bug is not fixed in Jaunty (I'm running up-to-date Jaunty and I still have this problem, see the comments above).

And yes, you don't have to open a second window. The title of this bug report is not very accurate: gnuplot freezes when you try to plot a second graph, close the window or reactivate the window.

summary: - gnuplot crashes on opening a second window
+ gnuplot freezes if the wx terminal is used
Revision history for this message
Bruno Girin (brunogirin) wrote :

I can confirm this bug on Jaunty 32bit. For example plots, try any in the simple demo examples: http://gnuplot.sourceforge.net/demo_4.2/simple.html

Revision history for this message
Bruno Girin (brunogirin) wrote :

I don't know if that helps but when running gnuplot on a file (such as http://gnuplot.sourceforge.net/demo_4.2/simple.1.gnu) with the -persist option, I get the following output when the plot window disappears:

bruno@nuuk:~/Desktop$ gnuplot -persist simple.1.gnu
bruno@nuuk:~/Desktop$
** (<unknown>:18085): WARNING **: Failed to send buffer
<unknown>: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.

I can also confirm that either setting the terminal to x11 or disabling assistive technologies are effective workarounds.

To set the terminal to x11:
gnuplot> set terminal x11
gnuplot> load "simple.1.gnu"

To disable assistive technologies:
1. Go to System -> Preferences -> Assistive Technologies
2. Uncheck "Enable Assistive Technologies"
3. Click "Close and Log Out" then log back in again (or click Close, finish what you were doing, log out, log back in)

Revision history for this message
Heikki Mäntysaari (heikki-mantysaari) wrote : apport-collect data

Architecture: amd64
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: fglrx
Package: gnuplot 4.2.4-6
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 LANG=fi_FI.UTF-8
Uname: Linux 2.6.28-14-generic x86_64
UserGroups: adm admin audio cdrom dialout fuse kqemu kvm libvirtd lpadmin plugdev sambashare scanner

Revision history for this message
Heikki Mäntysaari (heikki-mantysaari) wrote :
Revision history for this message
Yuji Matsuo (eklerni) wrote :

I can also confirm this bug on Karmic 32bit(gnuplot 4.2).
But x11 is fine.

Revision history for this message
elrond (elrond.) wrote :

I can confirm that the problem occurs in Karmic i686 using GNOME as desktop environment, but not LXDE (setting terminal to wxt works well in this DE). I'm adding apport report of gnuplot running on GNOME. If necessary, I can attach report for gnuplot on LXDE.

Revision history for this message
Bruno Girin (brunogirin) wrote :

Note that this is the object of a support request in the Gnuplot tracker: https://sourceforge.net/tracker/index.php?func=detail&aid=2822483&group_id=2055&atid=202055

I don't seem to have the problem anymore on Karmic 32bit with Gnuplot 4.2.5-2. Can someone confirm whether this is still an issue? Thanks!

Revision history for this message
Pietro Battiston (toobaz) wrote :

It is still an issue to me with the same version, and if I recall correctly it has always affected only 64 bit installations.

Revision history for this message
Hendrik Lönngren (hendrik0) wrote :

No, my 32-bit jaunty is affected.

Revision history for this message
matangdilis (matangdilis) wrote :

It affected my desktop with nvidia graphics card but not my laptop with intel graphics. Both machines use Karmic amd64 bit and gnome desktop. I will try some of the work arounds in the desktop later.

The gnuplot gui freezes and can't even be closed. None of the menus work in the nvidia desktop. The nvidia uses proprietary drivers with dri enabled.

Revision history for this message
elrond (elrond.) wrote :

@matangdilis: for a workaround, look at fensterplatz's comment in bug #239466

Revision history for this message
Adamo Ferro (adamo-ferro) wrote :

Hi guys,

I've Ubuntu 10.04 64bit.
Gnuplot was working just fine. Then I switched on System->Preferencies->Assistive Technologies->Enable assistive technologies to test some software.
Gnuplot with wxt was not working anymore (one plot and then everything freezes).
I didn't have any idea why... but then by disabling the accessibility option, as suggested above by Heikki Mäntysaari, it worked again...

Thank you very much!
Adamo

Revision history for this message
professordes (d-a-johnston-hw) wrote :

Ubuntu 10.10 32bit, pae kernel, fglrx graphics driver.

 System->Preferencies->Assistive Technologies->Enable assistive technologies

still freezes gnuplot using a wxt terminal after one plot.

Workarounds (as reported above for earlier versions):

1) use x11 terminal
2) switch off assistive technologies

Revision history for this message
SAn (san.at) wrote :

The problem is still present in Ubuntu 10.04 Natty (32-bit): gnuplot freezes with wx terminal after the first plot is drawn. When I deactivate "System - Preferences - Assistive Technologies - Enable assistive technologies' everything works fine.

Changed in gnuplot (Debian):
status: Unknown → New
Changed in gnuplot (Debian):
status: New → Incomplete
Changed in gnuplot (Debian):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.