Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XtConvertAndStore() error

19 views
Skip to first unread message

Russell Shaw

unread,
Feb 21, 2006, 1:19:30 AM2/21/06
to
Hi,
In two unrelated X programs, XtConvertAndStore() fails saying:

Warning: Missing charsets in String to FontSet conversion
Warning: Unable to load any usable fontset
Error: Couldn't find per display information


This is the point of failure in one of them:


gui_init_tooltip_font()
{
XrmValue from, to;

from.addr = (char *)gui.rsrc_tooltip_font_name;
from.size = strlen(from.addr);
to.addr = (XtPointer)&gui.tooltip_fontset;
to.size = sizeof(XFontSet);

if (XtConvertAndStore(vimShell, XtRString, &from, XtRFontSet, &to) == False)
{
/* Failed. What to do? */
}
}
#endif


(gdb) print from.addr
$2 = 0x8181353 "XtDefaultFontSet"

(gdb) print from.size
$7 = 16

(gdb) print to.addr
$5 = 0x81a2b70 ""

(gdb) print to.size
$6 = 4


I'm using X.org on debian-sid.

noj...@gate.cpmet.ufpel.tche.br

unread,
Feb 22, 2006, 9:32:21 PM2/22/06
to

Russell Shaw wrote:
> Hi,
> In two unrelated X programs, XtConvertAndStore() fails saying:
>
> Warning: Missing charsets in String to FontSet conversion
> Warning: Unable to load any usable fontset
> Error: Couldn't find per display information
---8<

> XrmValue from, to;
>
> from.addr = (char *)gui.rsrc_tooltip_font_name;
> from.size = strlen(from.addr);
> to.addr = (XtPointer)&gui.tooltip_fontset;
> to.size = sizeof(XFontSet);
>
> if (XtConvertAndStore(vimShell, XtRString, &from, XtRFontSet, &to) == False)
> {
> /* Failed. What to do? */
> }
---8<---

> (gdb) print from.addr
> $2 = 0x8181353 "XtDefaultFontSet"

Do you have a value for xtDefaultFontSet in your resource database?

--- Casantos

Russell Shaw

unread,
Feb 22, 2006, 10:15:12 PM2/22/06
to

I think it is hard-coded in the Xt library. The program was working
ok without a resource database, before i upgraded some things on my
system.

noj...@gate.cpmet.ufpel.tche.br

unread,
Feb 23, 2006, 8:47:36 PM2/23/06
to

It is hard-coded but you can replace it on-the-fly either via display
resource
database, application resource file or command line, like in

xedit -xrm '*xtDefaultFontSet: -*-courier-medium-r-normal-*-120-*'

Perhaps the resource database is being corrupted by some other code in
your application or provided by from some library. What happens if you
run the same program on a different system?

I'm starting to get curious about this bug. I never saw such thing
happen
before. Could you please post a compilable standalone code that makes
the same bug raise? That would help to isolate the cause of the
problem.

--- Casantos

Russell Shaw

unread,
Feb 23, 2006, 9:52:28 PM2/23/06
to

Hi,
I got the error in gvim and xvile. I've been trying to modify Xt to
give a more detailed error message of the actual fonts missing.
It will take some effort to get around to making a standalone
app give the error.

Russell Shaw

unread,
Feb 23, 2006, 10:00:04 PM2/23/06
to

Hi,


I got the error in gvim and xvile. I've been trying to modify Xt to
give a more detailed error message of the actual fonts missing.
It will take some effort to get around to making a standalone
app give the error.

gvim -xrm '*xtDefaultFontSet: -*-courier-medium-r-normal-*-120-*'

makes the error go away. Thanks;)

I'll keep looking for what the cause is tho. If i made a standalone
app, it would probably give the error on my system but not yours.

noj...@gate.cpmet.ufpel.tche.br

unread,
Feb 24, 2006, 12:27:30 AM2/24/06
to

Russell Shaw wrote:

---8<---


> I got the error in gvim and xvile. I've been trying to modify Xt to
> give a more detailed error message of the actual fonts missing.

---8---

The usual value for xtDefaultFontSet is "fixed". Normally it is an
alias
to a font belonging to the "misc" foundry. Look at

/usr/X11R6/lib/X11/fonts/misc/fonts.alias

--- Casantos

Russell Shaw

unread,
Feb 24, 2006, 8:37:15 PM2/24/06
to

After installing openoffice 2.0 which brought in 100 other dependencies,
the original problem has disappeared:(

0 new messages