Subject: Re: [X2Go-Dev] nxagent aborts session with 'Could not open default font 'fixed''

From: devsk <[email-masked]>
Date: Mon, 8 Jun 2015 04:28:09 +0000 (UTC)

I did a quick gdb session. You can see it below. The culprit is exactly the function that I pointed out earlier in 1st post for this bug.

(gdb) b SetDefaultFont
Breakpoint 1 at 0x4210b0: file NXdixfonts.c, line 221.
(gdb) r :50
Starting program: /tmp/nxagent :50
warning: File "/mnt/livecd/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

NXAGENT - Version 3.5.99.0

Copyright (C) 2001, 2011 NoMachine.
See http://www.nomachine.com/ for more information.

Info: Agent running with pid '10502'.
Session: Starting session at 'Sun Jun  7 21:19:22 2015'.
Info: Using alpha channel in render extension.
Info: Not using local device configuration changes.
error opening security policy file /usr/local/lib/nx/X11/xserver/SecurityPolicy
SessionPath not defined

Breakpoint 1, SetDefaultFont (defaultfontname=0x703f11 "fixed") at NXdixfonts.c:221
221     NXdixfonts.c: No such file or directory.
(gdb) bt
#0  SetDefaultFont (defaultfontname=0x703f11 "fixed") at NXdixfonts.c:221
#1  0x000000000040dd05 in main ()
(gdb) s
226     in NXdixfonts.c
(gdb) 
221     in NXdixfonts.c
(gdb) 
226     in NXdixfonts.c
(gdb) 
FakeClientID (client=client@entry=0) at NXresource.c:441
441     NXresource.c: No such file or directory.
(gdb) 
444     in NXresource.c
(gdb) 
441     in NXresource.c
(gdb) 
444     in NXresource.c
(gdb) 
441     in NXresource.c
(gdb) 
444     in NXresource.c
(gdb) fini
Run till exit from #0  FakeClientID (client=client@entry=0) at NXresource.c:444
SetDefaultFont (defaultfontname=0x703f11 "fixed") at NXdixfonts.c:228
228     NXdixfonts.c: No such file or directory.
Value returned is $1 = 127
(gdb) p fid
$2 = <optimized out>
(gdb) p err
$3 = <optimized out>
(gdb) s
226     in NXdixfonts.c
(gdb) 
228     in NXdixfonts.c
(gdb) 
227     in NXdixfonts.c
(gdb) 
OpenFont (pfontname=<optimized out>, lenfname=<optimized out>, flags=31, fid=<optimized out>, client=<optimized out>) at NXdixfonts.c:526
526     in NXdixfonts.c
(gdb) fini
Run till exit from #0  OpenFont (pfontname=<optimized out>, lenfname=<optimized out>, flags=31, fid=<optimized out>, client=<optimized out>) at NXdixfonts.c:526
227     in NXdixfonts.c
(gdb) p err
$4 = <optimized out>
(gdb) s
OpenFont (pfontname=0x703f11 "fixed", lenfname=5, flags=31, fid=127, client=0xa53ab0) at NXdixfonts.c:526
526     in NXdixfonts.c
(gdb) 
OpenFont (client=0xa53ab0, fid=fid@entry=127, flags=flags@entry=31, lenfname=5, pfontname=pfontname@entry=0x703f11 "fixed") at NXdixfonts.c:512
512     in NXdixfonts.c
(gdb) 
528     in NXdixfonts.c
(gdb) 
512     in NXdixfonts.c
(gdb) 
528     in NXdixfonts.c
(gdb) fini
Run till exit from #0  OpenFont (client=0xa53ab0, fid=fid@entry=127, flags=flags@entry=31, lenfname=5, pfontname=pfontname@entry=0x703f11 "fixed") at NXdixfonts.c:528
SetDefaultFont (defaultfontname=0x703f11 "fixed") at NXdixfonts.c:229
229     in NXdixfonts.c
Value returned is $5 = 0
(gdb) p Success
No symbol "Success" in current context.
(gdb) s
231     in NXdixfonts.c
(gdb) 
LookupIDByType (id=127, rtype=4) at NXresource.c:1192
1192    NXresource.c: No such file or directory.
(gdb) 
1193    in NXresource.c
(gdb) 
SecurityLookupIDByType (client=0x0, id=127, rtype=4, mode=0) at NXresource.c:1140
1140    in NXresource.c
(gdb) 
1131    in NXresource.c
(gdb) 
1140    in NXresource.c
(gdb) 
1131    in NXresource.c
(gdb) 
1140    in NXresource.c
(gdb) fini
Run till exit from #0  SecurityLookupIDByType (client=0x0, id=127, rtype=4, mode=0) at NXresource.c:1140
SetDefaultFont (defaultfontname=0x703f11 "fixed") at NXdixfonts.c:232
232     NXdixfonts.c: No such file or directory.
Value returned is $6 = (void *) 0x0
(gdb) s
236     in NXdixfonts.c
(gdb) 
230     in NXdixfonts.c
(gdb) p defaultFont
$7 = (FontPtr) 0x0
(gdb) p pf
$8 = <optimized out>
(gdb) s
236     in NXdixfonts.c

LookupIDByType() returns a null ptr.

-devsk