Bug 231417

Summary: Rosegarden hangs on SuSE 10.2
Product: [openSUSE] openSUSE 10.2 Reporter: Dave Rosky <d_rosky>
Component: X11 ApplicationsAssignee: Mike Fabian <mfabian>
Status: RESOLVED FIXED QA Contact: Stefan Dirsch <sndirsch>
Severity: Normal    
Priority: P5 - None CC: ast, dieter.jurzitza, wl
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Endless loop

Description Dave Rosky 2007-01-02 23:57:00 UTC
The notation editor in Rosegarden 1.4.0 hangs after placing the first note on the score when running on SuSE 10.2.  This works fine (in my own experience) with Rosegarden 1.4.0 on Fedora 6, Arch Linux, and Sabayon, so it appears to be an issue or interaction specific to OpenSuSE 10.2.  The problem appears whether the program is installed from the RPM in the Packman repository, or compiled from source tarball.

To reproduce the problem, install Rosegarden 1.4.0 (can start with --nosequencer if Timidity or fluidsynth is not running), place a track, open it in the notation editor, and place a note on the score.  The program freezes using 100% CPU and must be killed.  It isn't clear whether the problem is in Rosegarden, or one of the shared libraries shipped with SuSE 10.2, since it only seems to happen on SuSE 10.2.

More info can be found in the following bug on Rosegarden bugzilla:

http://sourceforge.net/tracker/index.php?func=detail&aid=1620644&group_id=4932&atid=104932
Comment 1 Takashi Iwai 2007-01-09 11:27:39 UTC
Mike, this looks like a font rendering issue...
Comment 2 Dave Rosky 2007-01-09 21:28:16 UTC
Yes, it appears to be a font rendering problem.  It may be a combination of a bad font, and/or problems with Freetype in relation to KDE.  Also, as I posted in the Rosegarden Bugzilla, I have now seen the problem in another disto besides SuSE 10.2 that was released very recently (Sabayon 3.26, released about a week ago), so it seems to be upstream rather than something specific to SuSE.

It's interesting to note that the fonts in question don't cause the GNOME font viewer to hang or crash, and I can use the font to enter text in GNOME applications (although it's a symbol font, so it doesn't *look* like text).  Perhaps some combination of the font and Freetype cause an error condition that isn't handled gracefully by KDE.

There is more info in the bug on Rosegarden bugzilla.  Should this bug be closed as a SuSE bug, since it seems to be an upstream issue?

Dave
Comment 3 Mike Fabian 2007-01-09 23:35:07 UTC
When I try to select any of the Lilypond fonts in "gedit", "gedit" already
hangs when selecting the font in the font selector.
Comment 4 Mike Fabian 2007-01-09 23:36:55 UTC
It is true the that gnome-font-viewer doesn't hang. But gnome-font-viewer doesn't show
much of the fonts, only some digits.
Comment 5 Mike Fabian 2007-01-09 23:40:01 UTC
The easiest way to reproduce hang with only freetype2 involved is using
"ftview" or "ftstring" from the "ft2demos" package. The following commands
both hang:

ftstring -m 012345 20 /opt/kde3/share/apps/rosegarden/fonts/LilyPond-feta-nummer-design10.pf
ftview 20 /opt/kde3/share/apps/rosegarden/fonts/LilyPond-feta-nummer-design10.pf      

The same happens with the other 2 LilyPond fonts.
Comment 6 Mike Fabian 2007-01-10 00:06:29 UTC
The LilyPond* fonts which come with rosegarden4-1.0 on SuSE Linux 10.1
and those which come with rosegarden4-1.4.0 on openSUSE 10.2 are identical.

ftview from SuSE Linux 10.1 (ft2demos-2.1.10, freetype2-2.1.10) can display these fonts.

ftview from openSUSE 10.2 (ft2demos-2.2.1.20061027, freetype2-2.2.1.20061027)
hangs when trying to display these fonts.
Comment 7 Dave Rosky 2007-01-10 01:18:19 UTC
"When I try to select any of the Lilypond fonts in "gedit", "gedit" already
hangs when selecting the font in the font selector."

That's interesting.  I will try this on my system later.  I did notice that one of the fonts did not display correctly in the Gnome font viewer, but I tried using the font in another Gnome application (it was glabels, not gedit), and the font worked fine.  Maybe it's application dependent.

I will also try ftview on my system and see if the results are the same.
Dave
Comment 8 Mike Fabian 2007-01-10 01:20:35 UTC
The problem is reproducible with ft2demos and freetype2 CVS head from today.
Comment 9 Werner Lemberg 2007-01-10 06:52:48 UTC
I've mailed David Turner, asking for a fix.
Comment 10 Werner Lemberg 2007-01-10 07:02:22 UTC
BTW, an easy fix independent of FreeType is to regenerate
the three PFA files with a current version of FontForge (just tested).
Comment 11 Mike Fabian 2007-01-12 21:39:24 UTC
David Turner has fixed it indeed. Thank you very much!

I submitted freetype2-2.2.1.20070112  (= 2.3.0rc1) packages to
STABLE and to the openSUSE build service:

-------------------------------------------------------------------
Fri Jan 12 20:54:24 CET 2007 - mfabian@suse.de

- update to 2.2.1.20070112 (= 2.3.0rc1).
  • bugzilla #231417 fixed, see ChangeLog:
     2007-01-10  David Turner  <david@freetype.org>
     [...]
     * src/pshinter/pshalgo.c (psh_glyph_compute_inflections):
     fixed a typo which created an endless loop with some malformed
     font files

-------------------------------------------------------------------

The new packages will show up in

http://software.opensuse.org/download/M17N/

when the build is finished.
Comment 12 Mike Fabian 2007-01-12 21:42:00 UTC
Closing as FIXED.
Comment 13 Petr Gajdos 2007-03-23 15:17:35 UTC
Hi,
we are preparing update of TeXmacs for 10.2, see bug #232997. After upgrading to TeXmacs 1.0.6.9 appears the same problem (infinite loop) discussed here. We have found, that this problem can be solved in the same way like here, i. e. by change sense of one condition in psh_glyph_compute_inflections() src/pshinter/pshalgo.c (see patch below). Can you please update freetype2 in 10.2 as well?
Comment 14 Petr Gajdos 2007-03-23 15:19:40 UTC
Created attachment 126232 [details]
Endless loop
Comment 15 Mike Fabian 2007-03-23 18:38:57 UTC
You mean we should release an official update of freetype2 to the
version currently in STABLE/Factory for openSUSE 10.2?

Or release an freetype2 for openSUSE 10.2 which has the patch from comment #14
applied and nothing more?

I would like to update to the freetype 2.3.1 which we have currently in 
STABLE/Factory, if possible. 

Anja, what do you think? Can you give us a SWAMPID?
Comment 16 Mike Fabian 2007-03-23 18:40:19 UTC
In openSUSE 10.2 we currently have freetype2-2.2.1.20061027
(CVS HEAD from 20061027).

In STABLE we have freetype 2.3.1. 

These should be binary compatible, therefore an update should be OK.

Comment 17 Petr Gajdos 2007-03-26 09:50:10 UTC
It doesn't matter for me, in both cases will be my problem solved, so it's up to you.
Thanks a lot
Comment 19 Mike Fabian 2007-03-26 14:03:00 UTC
freetype 2.3.1 submitted for 10.2. Patchinfo file is:


mfabian@magellan:~$ cat /work/src/done/PATCHINFO/freetype2.patch.box 
DISTRIBUTION: 10.2-i386,10.2-ppc,10.2-x86_64
PACKAGE: freetype2
PACKAGER: mfabian@suse.de
BUGZILLA: 231417
SWAMPID: 9171
CATEGORY: recommended
SUMMARY: avoid an endless loop with some malformed font files
SUMMARY_DE: vermeidet eine Endlosschleife beim Öffnen einiger kaputter Fonts
DESCRIPTION:
Freetype <= 2.3.0rc1 ran in an endless loop when opening some
malformed font files like those which come with Rosegarden or
TeXmacs. This update to freetype 2.3.1 includes a fix for the
problem.

DESCRIPTION_DE:
Freetype <= 2.3.0rc1 kann in eine Endlosschleife laufen
beim Öffnen einer kaputter Fontdateien wie zum Beispiel die,
die in Rosegarden und TeXmacs enthalten sind.
Dieses Update auf freetype 2.3.1 enthält einen Fix für
dieses Problem.

mfabian@magellan:~$ 


Closing as FIXED.
Comment 20 Petr Gajdos 2007-05-09 07:10:40 UTC
*** Bug 271183 has been marked as a duplicate of this bug. ***
Comment 22 Mike Fabian 2007-07-20 14:15:20 UTC
update to freetype2 2.3.5 submitted to /work/src/done/10.2
Comment 23 Mike Fabian 2007-07-20 14:19:47 UTC
New PATCHINFO is:

/work/src/done/PATCHINFO /srv/www/htdocs/pictures/20070714-Königsjodler
mfabian@magellan:/work/src/done/PATCHINFO$ cat freetype2.patch.box 
DISTRIBUTION: 10.2-i386,10.2-ppc,10.2-x86_64
PACKAGE: freetype2
PACKAGER: mfabian@suse.de
BUGZILLA: 231417
SWAMPID: 9171
CATEGORY: recommended
SUMMARY: avoid an endless loop with some malformed font files
SUMMARY_DE: vermeidet eine Endlosschleife beim Öffnen einiger kaputter Fonts
DESCRIPTION:
Freetype <= 2.3.0rc1 ran in an endless loop when opening some
malformed font files like those which come with Rosegarden or
TeXmacs. This update to freetype 2.3.5 includes a fix for the
problem.

DESCRIPTION_DE:
Freetype <= 2.3.0rc1 kann in eine Endlosschleife laufen
beim Öffnen einer kaputter Fontdateien wie zum Beispiel die,
die in Rosegarden und TeXmacs enthalten sind.
Dieses Update auf freetype 2.3.5 enthält einen Fix für
dieses Problem.
mfabian@magellan:/work/src/done/PATCHINFO$ 
Comment 24 Mike Fabian 2007-07-20 14:20:32 UTC
Closing as FIXED.
Comment 25 Anja Stock 2007-07-27 13:59:21 UTC
released