Bug 33081 - Gimp crashes (font related)
Gimp crashes (font related)
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: gtk+ (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Mason
David Lawrence
:
: 32106 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-03-24 06:56 EST by Itai Nahshon
Modified: 2007-04-18 12:32 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-03-30 14:58:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Here's the fix (633 bytes, patch)
2001-03-30 12:42 EST, Tim Waugh
no flags Details | Diff

  None (edit)
Description Itai Nahshon 2001-03-24 06:56:41 EST
Gimp crashes when I select the font 'newspaper' in the
Text Tool font menu.

The font in problem is containd in the file
/usr/X11R6/lib/X11/fonts/misc/arabic24.pcf.gz
which is part of the package XFree86-4.0.3-1. 

It's likely that the the problem is actually not is the Gimp but in one of
the underlyng libraries (gtk/gdk/X11).
Comment 1 Trond Eivind Glomsrxd 2001-03-26 10:41:40 EST
*** Bug 32106 has been marked as a duplicate of this bug. ***
Comment 2 Trond Eivind Glomsrxd 2001-03-28 15:29:15 EST
This is a 2-byte font.. could gtk+ have problems with this? Owen?
Comment 3 Trond Eivind Glomsrxd 2001-03-28 15:57:48 EST
It does work with other 2 byte fonts, though - and the stack of gimp is about 52
k entries deep when it crashes.
Comment 4 Owen Taylor 2001-03-28 16:06:48 EST
Once I get information from Matt about his bug, will make
a package with the following:

Index: gtkfontsel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfontsel.c,v
retrieving revision 1.23.2.8
diff -u -r1.23.2.8 gtkfontsel.c
--- gtkfontsel.c	2001/02/22 22:02:24	1.23.2.8
+++ gtkfontsel.c	2001/03/28 21:07:09
@@ -1647,7 +1647,7 @@
 				gpointer        data)
 {
   GtkFontSelection *fontsel;
-  gint new_size;
+  gdouble new_size;
   gchar *text;
   gchar buffer[16];
   gint i;
@@ -1673,11 +1673,11 @@
   gtk_entry_set_text(GTK_ENTRY(fontsel->size_entry), buffer);
   
   /* Check if the font size has changed, and return if it hasn't. */
-  new_size = atoi(text);
+  new_size = atof(text);
   if (fontsel->metric == GTK_FONT_METRIC_POINTS)
     new_size *= 10;
   
-  if (fontsel->size == new_size)
+  if (fontsel->size == (gint)new_size)
     return;
   
   /* If the size was selected by the user we set the selected_size. */
Comment 5 Itai Nahshon 2001-03-28 18:03:53 EST
Gimp does not work correctly with other 2 byte fonts but it does not crash.
One thing special about the font "newspaper": It does not contain characters
in the 7-bit ASCII range. I think we expect that fonts that are calle
"iso-10646-1"
are expected to contain at least a minimal subset.
Comment 6 Tim Waugh 2001-03-30 12:41:12 EST
This is a gtk+ bug.
Comment 7 Tim Waugh 2001-03-30 12:42:00 EST
Created attachment 14263 [details]
Here's the fix
Comment 8 Owen Taylor 2001-03-30 12:45:07 EST
Well, thanks for the patch, but look up a few lines....
Comment 9 Tim Waugh 2001-03-30 12:55:45 EST
Oh yeah.

I must read mail from bugzilla
I must read mail from bugzilla
I must read mail from bugzilla

Comment 10 Trond Eivind Glomsrxd 2001-03-30 14:58:07 EST
After applying the patch, gimp no longer crashes when using the font... but the
text in this font is _tiny_.
Comment 11 Matt Wilson 2001-04-06 16:12:51 EDT
gtk+-1.2.9-5

Note You need to log in before you can comment on or make changes to this bug.