Debian Bug report logs - #374062
TTF_RenderUNICODE_Solid fails when rendering strings containing spaces

version graph

Package: libfreetype6; Maintainer for libfreetype6 is Steve Langasek <vorlon@debian.org>; Source for libfreetype6 is src:freetype.

Reported by: "C Rodrigues" <red5_2@hotmail.com>

Date: Sat, 17 Jun 2006 01:48:01 UTC

Severity: serious

Tags: etch, fixed-upstream, patch

Merged with 386285, 456199

Found in versions freetype/2.1.7-5, freetype/2.2.1-5, freetype/2.2.1-5+etch1

Fixed in version 2.3.5-1

Done: Steve Langasek <vorlon@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Samuel Mimram <smimram@debian.org>:
Bug#374062; Package libsdl-ttf2.0-0. Full text and rfc822 format available.

Acknowledgement sent to "C Rodrigues" <red5_2@hotmail.com>:
New Bug report received and forwarded. Copy sent to Samuel Mimram <smimram@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "C Rodrigues" <red5_2@hotmail.com>
To: submit@bugs.debian.org
Subject: TTF_RenderUNICODE_Solid fails when rendering strings containing spaces
Date: Sat, 17 Jun 2006 01:44:29 +0000
[Message part 1 (text/plain, inline)]
Package: libsdl-ttf2.0-0
Version: 2.0.8-2

libfreetype6 version 2.2.1-2
libsdl1.2debian version 1.2.10-3

When attempting to render a string containing spaces using 
TTF_RenderUTF8_Solid(), rendering fails and NULL is returned.  Rendering is 
successful when the string contains no spaces.  Rendering is successful with 
TTF_RenderUTF8_Blended() or TTF_RenderUTF8_Shaded().  The failure appears to 
be independent of the choice of font.  The included file and font 
demonstrate the problem.  It was compiled with

gcc main.c -lSDL_ttf -lSDL

I investigated the problem further using the source package.  When running 
the program provided, an error code is returned by the call to Find_Glyph in 
TTF_RenderUNICODE_Solid at approximately line 1080 of SDL_ttf.c.  This error 
does not seem to occur if the third argument to Find_Glyph is changed to be 
CACHED_METRICS|CACHED_PIXMAP instead of CACHED_METRICS|CACHED_BITMAP.  I do 
not know if such a change affects the expected rendered image.

I discovered this problem because it causes some pygame code to raise 
exceptions.

[main.c (text/x-csrc, attachment)]
[font.ttf (application/octet-stream, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Samuel Mimram <smimram@debian.org>:
Bug#374062; Package libsdl-ttf2.0-0. Full text and rfc822 format available.

Acknowledgement sent to Samuel Mimram <samuel.mimram@ens-lyon.org>:
Extra info received and forwarded to list. Copy sent to Samuel Mimram <smimram@debian.org>. Full text and rfc822 format available.

Message #10 received at 374062@bugs.debian.org (full text, mbox):

From: Samuel Mimram <samuel.mimram@ens-lyon.org>
To: C Rodrigues <red5_2@hotmail.com>, 374062@bugs.debian.org, Sam Lantinga <slouken@libsdl.org>
Subject: Re: Bug#374062: TTF_RenderUNICODE_Solid fails when rendering strings containing spaces
Date: Sun, 18 Jun 2006 01:54:20 +0200
Hi,

C Rodrigues wrote:
> Package: libsdl-ttf2.0-0
> Version: 2.0.8-2
> 
> libfreetype6 version 2.2.1-2
> libsdl1.2debian version 1.2.10-3
> 
> When attempting to render a string containing spaces using
> TTF_RenderUTF8_Solid(), rendering fails and NULL is returned.  Rendering
> is successful when the string contains no spaces.  Rendering is
> successful with TTF_RenderUTF8_Blended() or TTF_RenderUTF8_Shaded(). 
> The failure appears to be independent of the choice of font.  The
> included file and font demonstrate the problem.  It was compiled with
> 
> gcc main.c -lSDL_ttf -lSDL
> 
> I investigated the problem further using the source package.  When
> running the program provided, an error code is returned by the call to
> Find_Glyph in TTF_RenderUNICODE_Solid at approximately line 1080 of
> SDL_ttf.c.  This error does not seem to occur if the third argument to
> Find_Glyph is changed to be CACHED_METRICS|CACHED_PIXMAP instead of
> CACHED_METRICS|CACHED_BITMAP.  I do not know if such a change affects
> the expected rendered image.
> 
> I discovered this problem because it causes some pygame code to raise
> exceptions.

Thanks for the test-case you've provided, I've been able to reproduce
the problem. More intriguing, if I do a SDL_Init(SDL_INIT_VIDEO) at the
beginning then the error message returned by TTF_GetError() is:

Failed loading DPMSDisable: /usr/lib/libX11.so.6: undefined symbol:
DPMSDisable

Unfortunately, I have no deeper insight about this. I've CCed upstream.

Cheers,

Samuel.

PS : Sam Lantiga, you can find the full Debian bug report at
http://bugs.debian.org/374062



Information forwarded to debian-bugs-dist@lists.debian.org, Samuel Mimram <smimram@debian.org>:
Bug#374062; Package libsdl-ttf2.0-0. Full text and rfc822 format available.

Acknowledgement sent to Sam Lantinga <slouken@devolution.com>:
Extra info received and forwarded to list. Copy sent to Samuel Mimram <smimram@debian.org>. Full text and rfc822 format available.

Message #15 received at 374062@bugs.debian.org (full text, mbox):

From: Sam Lantinga <slouken@devolution.com>
To: Samuel Mimram <samuel.mimram@ens-lyon.org>
Cc: C Rodrigues <red5_2@hotmail.com>, 374062@bugs.debian.org, Sam Lantinga <slouken@libsdl.org>
Subject: Re: Bug#374062: TTF_RenderUNICODE_Solid fails when rendering strings containing spaces
Date: Mon, 19 Jun 2006 23:08:06 -0700
> Thanks for the test-case you've provided, I've been able to reproduce
> the problem. More intriguing, if I do a SDL_Init(SDL_INIT_VIDEO) at the
> beginning then the error message returned by TTF_GetError() is:

> Failed loading DPMSDisable: /usr/lib/libX11.so.6: undefined symbol:
> DPMSDisable

This message is from the X11 dynamic loading and is unrelated (and harmless).

I've entered this bug into the SDL bug database:
http://bugzilla.libsdl.org/show_bug.cgi?id=254

Thanks!
	-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment



Noted your statement that Bug has been forwarded to http://bugzilla.libsdl.org/show_bug.cgi?id=254. Request was from Samuel Mimram <smimram@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `libsdl-ttf2.0-0' to `freetype'. Request was from sjoerd@spring.luon.net (Sjoerd Simons) to control@bugs.debian.org. Full text and rfc822 format available.

Severity set to `important' from `normal' Request was from sjoerd@spring.luon.net (Sjoerd Simons) to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `freetype' to `libfreetype6'. Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Forcibly Merged 374062 386285. Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Severity set to `important' from `normal' Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: fixed-upstream Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Steve Langasek <vorlon@debian.org>:
Bug#374062; Package libfreetype6. Full text and rfc822 format available.

Acknowledgement sent to Mike Furr <mfurr@debian.org>:
Extra info received and forwarded to list. Copy sent to Steve Langasek <vorlon@debian.org>. Full text and rfc822 format available.

Message #34 received at 374062@bugs.debian.org (full text, mbox):

From: Mike Furr <mfurr@debian.org>
To: 374062@bugs.debian.org
Subject: why is this not RC?
Date: Wed, 02 May 2007 16:15:48 -0400
I don't understand why this is not an RC bug (and has not yet been fixed
despite fixed-upstream).  I have been unable to run any code which uses
TTF_Render*_Solid without getting the error described.

As such, I would also request that the fix be back-ported and submitted
for inclusion in Etch r1 since the problem exists in Etch too.

-Mike



Reply sent to Steve Langasek <vorlon@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to "C Rodrigues" <red5_2@hotmail.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #39 received at 374062-done@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: 374062-done@bugs.debian.org, 386285-done@bugs.debian.org
Subject: Bugs fixed upstream
Date: Mon, 9 Jul 2007 16:36:51 -0700
Version: 2.3.5-1

These bugs each appear to be fixed upstream in freetype version 2.3.5, which
is now in unstable.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/



Reply sent to Steve Langasek <vorlon@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Jens Schicke <j.schicke@asco.de>:
Bug acknowledged by developer. Full text and rfc822 format available.

Bug marked as found in version 2.2.1-5. Request was from Don Armstrong <don@debian.org> to control@bugs.debian.org. (Tue, 10 Jul 2007 03:39:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#374062; Package libfreetype6. Full text and rfc822 format available.

Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #51 received at 374062@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: Mike Furr <mfurr@debian.org>, 374062@bugs.debian.org
Subject: Re: Bug#374062: why is this not RC?
Date: Tue, 10 Jul 2007 00:13:16 -0700
Mike,

On Wed, May 02, 2007 at 04:15:48PM -0400, Mike Furr wrote:

> I don't understand why this is not an RC bug (and has not yet been fixed
> despite fixed-upstream).  I have been unable to run any code which uses
> TTF_Render*_Solid without getting the error described.

> As such, I would also request that the fix be back-ported and submitted
> for inclusion in Etch r1 since the problem exists in Etch too.

This bug is not marked as RC because no one reported it as such; on the
whole, freetype is perfectly usable for most people and with most
applications, and if there's some other reason that this bug should be
treated as RC and warrant an update in a stable point release, that hasn't
been made clear to me.  If you can explain to me why you think this is RC
(What code uses TTF_Render*_Solid?  Does this make libsdl-ttf unusable?),
I'm happy to have the bug escalated to 'serious' and inquire with the SRMs
about accepting an update.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/



Information forwarded to debian-bugs-dist@lists.debian.org, Steve Langasek <vorlon@debian.org>:
Bug#374062; Package libfreetype6. Full text and rfc822 format available.

Acknowledgement sent to Christoph Fritz <chris_honschu@gmx.de>:
Extra info received and forwarded to list. Copy sent to Steve Langasek <vorlon@debian.org>. Full text and rfc822 format available.

Message #56 received at 374062@bugs.debian.org (full text, mbox):

From: Christoph Fritz <chris_honschu@gmx.de>
To: 374062@bugs.debian.org
Subject: please add this to debian etch
Date: Fri, 17 Aug 2007 15:02:44 +0200
Hi,

this bug really sucks because development with libsdl-ttf doesn't 
really work without this patch. And it is very annoying to patch 
every workstation by hand.

So _please_ add this patch to debian etch (stable).

# cat 374062_bug_honschu.diff 

--- freetype-2.2.1.orig/src/base/ftutil.c
+++ freetype-2.2.1/src/base/ftutil.c
@@ -120,12 +120,12 @@
     FT_Error  error = FT_Err_Ok;
 
 
-    if ( cur_count < 0 || new_count < 0 || item_size <= 0 )
+    if ( cur_count < 0 || new_count < 0 || item_size < 0 )
     {
       /* may help catch/prevent nasty security issues */
       error = FT_Err_Invalid_Argument;
     }
-    else if ( new_count == 0 )
+    else if ( new_count == 0 || item_size == 0 )
     {
       ft_mem_free( memory, block );
       block = NULL;



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 15 Sep 2007 07:29:09 GMT) Full text and rfc822 format available.

Bug unarchived. Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (Sat, 20 Oct 2007 22:00:02 GMT) Full text and rfc822 format available.

Tags added: etch Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (Sat, 20 Oct 2007 22:00:04 GMT) Full text and rfc822 format available.

Severity set to `serious' from `important' Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (Sat, 20 Oct 2007 22:00:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Steve Langasek <vorlon@debian.org>:
Bug#374062; Package libfreetype6. Full text and rfc822 format available.

Acknowledgement sent to Jon Dowland <jon+bts@alcopop.org>:
Extra info received and forwarded to list. Copy sent to Steve Langasek <vorlon@debian.org>. Full text and rfc822 format available.

Message #69 received at 374062@bugs.debian.org (full text, mbox):

From: Jon Dowland <jon+bts@alcopop.org>
To: 374062@bugs.debian.org
Subject: Re: Bug#374062: why is this not RC?
Date: Mon, 26 Nov 2007 11:07:19 +0000
[ this mail has sat rotting in my postponed folder for ages.
  sorry about that. ]

On Tue, Jul 10, 2007 at 12:13:16AM -0700, Steve Langasek
wrote:
> (What code uses TTF_Render*_Solid?  Does this make
> libsdl-ttf unusable?),

Any text rendered using TTF_Render*_Solid which includes a
space character will fail. TTF_Render*_Shaded works, as does
blended, and those are most commonly used.  So libsdl-ttf is
not unusable, but severely impaired.

> I'm happy to have the bug escalated to 'serious' and
> inquire with the SRMs about accepting an update.

I read somewhere (maybe the upstream bug report) that a
security fix caused the regression. However I've walked
back freetype6 versions as far as 2.1.7-5 and the bug is
still present.


-- 
Jon Dowland




Forcibly Merged 374062 386285 456199. Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (Thu, 13 Dec 2007 20:15:21 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 16 Mar 2009 09:33:33 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 01:49:28 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.