After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 388702 - pango 1.15.2 segfaults on Korean example from testgtk
pango 1.15.2 segfaults on Korean example from testgtk
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: hangul
unspecified
Other Linux
: Immediate blocker
: ---
Assigned To: Changwoo Ryu
pango-maint
: 391860 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-12-22 18:14 UTC by Matthias Clasen
Modified: 2007-01-03 22:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
korean text (54 bytes, text/plain)
2006-12-22 18:15 UTC, Matthias Clasen
  Details
stacktrace from testgtk crash (16.32 KB, text/plain)
2007-01-02 20:31 UTC, Matthias Clasen
  Details
pmap output (6.46 KB, text/plain)
2007-01-02 20:34 UTC, Matthias Clasen
  Details
Proposed patch, including the fix for bug 388581 (1.61 KB, patch)
2007-01-03 12:45 UTC, Changwoo Ryu
committed Details | Review

Description Matthias Clasen 2006-12-22 18:14:49 UTC
I'll attach a text file that crashes pango-view
Comment 1 Matthias Clasen 2006-12-22 18:15:21 UTC
Created attachment 78803 [details]
korean text
Comment 2 Behdad Esfahbod 2006-12-24 04:54:17 UTC
Changwoo Ryu, this seems to be caused by your commit:

2006-12-20  Changwoo Ryu  <cwryu@debian.org>

        * modules/hangul/hangul-defs.h:
        * modules/hangul/hangul-fc.c
        (hangul_engine_shape): Optimizing for non-old Hangul users; no
        more waste of decompose and compose.
        (render_syllable): The string argument is now in UTF-8. Normalization
        is now done only when the entire sequence is equivalent to a
        precomposed syllable.
        (render_isolated_tone): Conditioned out tone mark's dummy base
        character drawing.



Can you fix the crash please?

Matthias, can you do a pmap on the crashing process (inside gdb perhaps) to see which fonts it has opened?

Thanks,
Comment 3 Changwoo Ryu 2006-12-24 15:35:29 UTC
I tried a few different Hangul fonts but I couldn't reproduce the crash.  Please let me know which font it used.
Comment 4 Behdad Esfahbod 2007-01-02 19:44:35 UTC
*** Bug 391860 has been marked as a duplicate of this bug. ***
Comment 5 Behdad Esfahbod 2007-01-02 19:46:01 UTC
Ok, I'll revert this change if no patch arrives in 24 hours.  I want to release 1.16.0 in about a week and this is too late in the devel cycle to have a crasher hanging around.
Comment 6 Nicolas Mailhot 2007-01-02 20:15:07 UTC
(In reply to comment #4)
> *** Bug 391860 has been marked as a duplicate of this bug. ***

Thanks for looking at this and happy new year :)

The crash happens when browsing to http://en.wikipedia.org/wiki/Teletext which seems to include tables of videotext glyphs (from what I see in links, firefox & epy just crash)

The font was probably dejavu 2.13 Mono as it's the U+2500… block provider on my system (with some arial glyphs mixed in). After uninstalling it I still have a crasher (and now gucharmap says dejavu LGC 2.10 + Arial are responsible for this block)

I don't know how to test further – the system won't let me uninstall LGC as OO.o depends on it
Comment 7 Behdad Esfahbod 2007-01-02 20:21:06 UTC
(In reply to comment #6)

> I don't know how to test further – the system won't let me uninstall LGC as
> OO.o depends on it

Remove Arial temporarily?
rpm -e --nodeps LGC, or mv/usr/share/fonts/dejavu-lgc /tmp  temporarily.

Comment 8 Matthias Clasen 2007-01-02 20:31:41 UTC
Created attachment 79213 [details]
stacktrace from testgtk crash
Comment 9 Matthias Clasen 2007-01-02 20:34:25 UTC
Created attachment 79214 [details]
pmap output
Comment 10 Nicolas Mailhot 2007-01-02 20:36:29 UTC
(In reply to comment #7)

> rpm -e --nodeps LGC, or mv/usr/share/fonts/dejavu-lgc /tmp  temporarily.

behdad, you're an evil man, but anyway removing every dejavu derivative & ms core fonts from the system still results in a crasher

I haven't the faintest idea wha

Comment 11 Nicolas Mailhot 2007-01-02 20:36:54 UTC
t other font it may use to render this page
Comment 12 Changwoo Ryu 2007-01-03 06:28:18 UTC
I see why I couldn't reproduce it...  The problem seems to be in the fallback for the case that there was no font which has Hangul glyphs.
Comment 13 Changwoo Ryu 2007-01-03 12:43:50 UTC
The patch from bug 388581 should resolve the crash:

http://bugzilla.gnome.org/attachment.cgi?id=78794&action=view

But this is not a duplicate of 388851.  This crash let me know a more exceptional case, when there is "S+T" sequence and the font has no Hangul glyph.  Patch coming..

Now I am moving to a new place and have a limited net access (thanks to svn allowing me to make patch with no connection).  Please commit the patch and mark the bugs fixed, if it's ok.
Comment 14 Changwoo Ryu 2007-01-03 12:45:08 UTC
Created attachment 79268 [details] [review]
Proposed patch, including the fix for bug 388581
Comment 15 Changwoo Ryu 2007-01-03 12:47:43 UTC
Oops, typo in the changelog.  Please exclude the copy&pasted line..
Comment 16 Behdad Esfahbod 2007-01-03 17:03:36 UTC
Thanks.  Nicolas, can you test the patch?
Comment 17 Behdad Esfahbod 2007-01-03 18:57:49 UTC
Thanks.  That fixed it.

2007-01-03  Changwoo Ryu  <cwryu@debian.org>

        Bug 388702 - Crash when there's no Hangul glyph in the font.
        
        * modules/hangul/hangul-fc.c (render_syllable): Do not try to
        render unknown syllable glyphs as jamos.

        * modules/hangul/hangul-fc.c (hangul_engine_shape): Check if the
        remaining string is a syllable.

        Bug 388581 - Every last Hangul syllable is decomposed to jamos.

        * modules/hangul/hangul-fc.c (hangul_engine_shape): Check if the
        remaining string is a syllable.

Comment 18 Behdad Esfahbod 2007-01-03 18:59:19 UTC
Forgot to close.
Comment 19 Nicolas Mailhot 2007-01-03 21:22:32 UTC
(In reply to comment #16)
> Thanks.  Nicolas, can you test the patch?

I can confirm the fix

BTW since caillon did a firefox 2 release after all could you point him to your ligature fix please?
Comment 20 Behdad Esfahbod 2007-01-03 22:17:28 UTC
(In reply to comment #19)
> (In reply to comment #16)
> > Thanks.  Nicolas, can you test the patch?
> 
> I can confirm the fix
> 
> BTW since caillon did a firefox 2 release after all could you point him to your
> ligature fix please?

The fix is part of the printing patch.  I'm sure he picks it up very soon if he's not already.