[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] fl_set_font_name() and segmentation fault error

From: Jens Thoms Toerring
Subject: Re: [XForms] fl_set_font_name() and segmentation fault error
Date: Tue, 20 Oct 2009 13:16:44 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Max,

On Tue, Oct 20, 2009 at 11:36:17AM +0200, Max wrote:
> since I have update my desktop to the last xorg version (1.6.3) my xforms-
> based program does not work anymore. :(
> Indeed if I start it I get a plain "Segmentation fault" error with the 
> following backtrace:
> #0  0x00007fa6d51ab1f9 in XFindOnExtensionList () from /usr/lib/libX11.so.6
> #1  0x00007fa6d51a1f86 in _XF86BigfontFreeFontMetrics () from 
> /usr/lib/libX11.so.6
> #2  0x00007fa6d51a206d in XFreeFont () from /usr/lib/libX11.so.6
> #3  0x00007fa6d54ea3fe in fl_set_font_name () from /usr/lib/libforms.so.1
> #4  0x000000000042110a in main (argc=1, argv=0x7fff870b04c8) at 
> isoplot_main.c:169

That's not what's supposed to happen!

> The lines causing the issue are the followings
>   fl_set_font_name(FL_NORMAL_STYLE,
>                    "-adobe-helvetica-medium-r-normal-*-*-?-*-*-*-*-*-*");
>   fl_set_font_name(FL_BOLD_STYLE,
>                    "-adobe-helvetica-bold-r-normal-*-*-?-*-*-*-*-*-*");
>   fl_set_font_name(FL_ITALIC_STYLE,
>                    "-adobe-helvetica-medium-i-normal-*-*-?-*-*-*-*-*-*");
>   fl_set_font_name(FL_BOLDITALIC_STYLE,
>                    "-adobe-helvetica-bold-o-normal-*-*-?-*-*-*-*-*-*");
> If I comment them, everything works, but my application does not look like I 
> want :D
> Am I using the function fl_set_font_name() in a wrong way, or there are known
> issues with the latest xorg's? How would you write the functions above?

To me your use of the function looks quite fine. Unfortunately, I can't
easily reproduce the problem on my machine (I'm also using Xorg 1.6.3)
with a program I cobbled together to do exactly the same calls. And a
quick look at the code of fl_set_font_name() also doesn't reveal any
glaring bugs, at least at a first glance (and the function has remained
mostly unchanged for ages).

Since segmentation faults are so hard to find and can be due to mis-
takes in places far away from the point were they actually happen,
may I ask you to send me your program to be able to see if I get
the same segmentation fault and then debug on it directly? But even
if you can't or don't want to do that I will definitely take a close
look at the font handling code to see if I can find anything that
might do something stupid. Sorry for not being more specific...

                           Best regards, Jens
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de

reply via email to

[Prev in Thread] Current Thread [Next in Thread]