We got a report from a customer that their ThinLinc (4.7.0) sessions crash when they're using TeamCenter. The customer also reports that ThinLinc 4.1.1 works fine. > (EE) > (EE) Backtrace: > (EE) 0: /opt/thinlinc/libexec/Xvnc (xorg_backtrace+0x3f) [0x5d7c3f] > (EE) 1: /opt/thinlinc/libexec/Xvnc (0x400000+0x1db0c9) [0x5db0c9] > (EE) 2: /lib64/libpthread.so.0 (0x3e3a000000+0xf710) [0x3e3a00f710] > (EE) 3: /opt/thinlinc/libexec/Xvnc (0x400000+0x2504d5) [0x6504d5] > (EE) 4: /opt/thinlinc/libexec/Xvnc (0x400000+0x250a0a) [0x650a0a] > (EE) 5: /opt/thinlinc/libexec/Xvnc (0x400000+0x2517bb) [0x6517bb] > (EE) 6: /opt/thinlinc/libexec/Xvnc (FontEncReallyLoad+0x42) [0x651912] > (EE) 7: /opt/thinlinc/libexec/Xvnc (FontEncFind+0x79) [0x64faf9] > (EE) 8: /opt/thinlinc/libexec/Xvnc (FTPickMapping+0xc9) [0x647b29] > (EE) 9: /opt/thinlinc/libexec/Xvnc (0x400000+0x22d813) [0x62d813] > (EE) 10: /opt/thinlinc/libexec/Xvnc (0x400000+0x231596) [0x631596] > (EE) 11: /opt/thinlinc/libexec/Xvnc (0x400000+0x2341cb) [0x6341cb] > (EE) 12: /opt/thinlinc/libexec/Xvnc (0x400000+0x246365) [0x646365] > (EE) 13: /opt/thinlinc/libexec/Xvnc (FontFileListNextFontWithInfo+0x53) [0x646403] > (EE) 14: /opt/thinlinc/libexec/Xvnc (0x400000+0x242975) [0x642975] > (EE) 15: /opt/thinlinc/libexec/Xvnc (doListFontsWithInfo+0x17b) [0x58a52b] > (EE) 16: /opt/thinlinc/libexec/Xvnc (StartListFontsWithInfo+0x163) [0x58c5c3] > (EE) 17: /opt/thinlinc/libexec/Xvnc (Dispatch+0x28f) [0x58911f] > (EE) 18: /opt/thinlinc/libexec/Xvnc (main+0x3ae) [0x49d51e] > (EE) 19: /lib64/libc.so.6 (__libc_start_main+0xfd) [0x3e3981ed1d] > (EE) 20: /opt/thinlinc/libexec/Xvnc (0x400000+0x9eec3) [0x49eec3] > (EE) > (EE) Segmentation fault at address 0x3e00003ff6 > > Fatal server error: > Caught signal 11 (Segmentation fault). Server aborting
Created attachment 811 [details] Font file and fonts.dir / fonts.scaled from customer
How to use / test: - unpack simsun.tcc / fonst.dir and fonst.scaled into ~/.fonts - cd into ~/.fonts and run mkfontsdir to update fonts.dir from fonts.scaled - update fontpath with 'xset +fp ~/.fonts' - run xlsfonts and verify that the three simsun fonts are loaded into X11 server with different encodings Then run xfontsel and select a simsun font famly (fmly) and then gb2312.1980 in rgstry to get rendered chines characters.
The rendering is broken while viewing any of the fonts using xfontsel within Xvnc (ThinLinc 4.9.0). When the same test on Fedora 26 X11 server renders the fonts without a problem. We can not crash the xfontsel but this indicates that Xvnc and core fonts rendering has problem. Updating freetype and libfontenc seems like a proper step in the right direction.
xfontsel still fails to render after upgraded Xvnc. However freetype does now log that it can't find the encodings for the fonts. FreeType: couldn't find encoding 'ascii-0' for '/home/hean01/.fonts/simsun.ttc' FreeType: couldn't find encoding 'gb2312.1980-0' for '/home/hean01/.fonts/simsun.ttc' I tried same tests using Xvnc from my build which fails and with Xvnc from fedora with success. I found that if I created a enconding index (encoding.dir) file in the same directory as the fontfile ( ~/.fonts ) fixed the problem and the font is now rendered successfully. Here is how I created the encodings index: cd ~/.fonts mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large .
Still waiting for clearance from customer. However the upgrade of freetype on bug #5160 and this change, makes the simsun font to render properly.
Tested on RHEL 7 by - create directory with the simsun font - mkfontscale to create fonts.scale - mkfontdir to create fonts.dir - add link to directory in /etc/X11/fontpath.d Then - verified that font is found by xlsfonts | grep simsun - verified that chinese characters are shown in xfontsel after: - selecting simsun family - selecting gb2312.1980 registry - verified no message about X11 in xinit.log