pterm crashes with SIGFPE if 'mincho (kochi)' font selected

Bug #134902 reported by Peter Maydell
2
Affects Status Importance Assigned to Milestone
putty (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: pterm

If in a running pterm I use ctrl-right arrow to bring up a menu, select 'change settings', 'Fonts', 'Font used for ordinary text' and select 'mincho (kochi)' from the list, then press 'Apply', pterm crashes with a SIGFPE.

You can also get it to crash by asking for this font on the command line:
 pterm -fn '-kochi-mincho-medium-r-normal-*-*-120-*-*-m-*-jisx0212.1990-0'

This is pterm 0.60-1.

I built from source and ran under gdb, which shows that it's falling over here:
Program received signal SIGFPE, Arithmetic exception.
0x0806cb46 in configure_area (widget=0x80d9598, event=0xbf99f8e0,
    data=0x80b2640) at ../unix/gtkwin.c:450
450 w = (event->width - 2*inst->cfg.window_border) / inst->font_width;

because inst->font_width is zero.

I believe the font comes from package ttf-kochi-mincho 1.0.20030809-4ubuntu2 .
I suppose it's possible that the font is somehow broken, but in any case pterm shouldn't crash.

Revision history for this message
Jeff Anderson (jander99) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Changed in putty (Ubuntu):
status: New → Incomplete
Revision history for this message
Peter Maydell (pmaydell) wrote :

So, my original bug report included a simple single command line to reproduce the bug. In Jaunty that exact same command still fails:

pm215@canth:~/anime$ pterm -fn '-kochi-mincho-medium-r-normal-*-*-120-*-*-m-*-jisx0212.1990-0'

Gtk-WARNING **: Failed to load module "libcanberra-gtk-module.so": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory
Floating point exception

The obvious conclusion is that you didn't even try to reproduce this bug before bouncing it back to me to say "is it still there?". http://www.chiark.greenend.org.uk/ucgi/~cjwatson/blosxom/ubuntu/2009-02-27-bug-triage-rants.html points out that this just makes Ubuntu look kind of clueless. Please stop wasting my time.

Changed in putty (Ubuntu):
status: Incomplete → New
Revision history for this message
Jeff Anderson (jander99) wrote :

Peter,

Thank you for responding to this bug. You are correct that I've not tested this particular bug. Please understand there are over 23,000 "New/Undecided" reports in Launchpad. I've been going through oldest-first in an attempt to get responses like yours. Since you're able to reproduce this, I've changed the status to Confirmed so it will show up on the radar more clearly.

Changed in putty (Ubuntu):
status: New → Confirmed
Revision history for this message
Jeff Anderson (jander99) wrote :

I've noticed in the package description that ttf-kochi-mincho development has stopped, and suggests using ttf-sazanami-mincho instead.

I've installed this font, and changed the font used from your command:

jeff@tester:~$ pterm -fn '-sazanami-mincho-medium-r-normal-*-*-120-*-*-m-*-jisx0212.1990-0'

Gtk-WARNING **: Failed to load module "libcanberra-gtk-module.so": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory
Floating point exception

Running pterm without any argument reproduces the Gtk-WARNING, so I'm ignoring that for now. I do get a Floating point exception as you do.

Japanese fronts, from my understanding, are 'wide-format' fonts, so I tried the pterm switch -fw instead of -fn and pterm loaded without the Floating point exception.

Since my language is set as English, it didnt load Japanese characters. Could you try using -fw with kochi, and with sazanami?

Thanks.

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 134902] Re: pterm crashes with SIGFPE if 'mincho (kochi)' font selected

On Sat, Jul 18, 2009 at 05:57:34PM -0000, Jeff Anderson wrote:
> Thank you for responding to this bug. You are correct that I've not
> tested this particular bug. Please understand there are over 23,000
> "New/Undecided" reports in Launchpad. I've been going through oldest-
> first in an attempt to get responses like yours.

For the record, IMO it's better to leave bugs New/Undecided than to do
this kind of thing.

(Interesting that -fw doesn't seem to reproduce it. Of course it's still
a bug that -fn crashes ...)

Revision history for this message
Peter Maydell (pmaydell) wrote :

> (Interesting that -fw doesn't seem to reproduce it. Of course it's still a bug that -fn crashes ...)

font_width (which is erroneously zero) is set like this:

    inst->font_width = gdk_char_width(inst->fonts[0], ' ');

so it's only -fn that affects it. (-fw sets fonts[1].)

Perhaps these fonts don't include the space character?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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