when the package is compiled with +cjk use flag, and when LANG is set to (whatever).UTF-8, xdvi segfaults. xdvi runs happily when the package is recompiled with cjk flag disabled. Reproducible: Always Steps to Reproduce: 1. start xdvi (some dvi file) in xterm when UTF-8 locale is set, e.g. in LANG 2. Observe segfault 3. Actual Results: xdvi complains about: (1) locale not supported by Xlib (2) unable to convert FontSet (3) unable to load usable fontset and segfault with "Error: no fontset found" Expected Results: Able to view the dvi file. emerge --info: Portage 2.1.4.5 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 x86_64) ================================================================= System uname: 2.6.25-gentoo-r7 x86_64 Pentium(R) Dual-Core CPU E5200 @ 2.50GHz Timestamp of tree: Fri, 14 Nov 2008 18:46:01 +0000 app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.5.2-r7 dev-util/cmake: 2.4.6-r1 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r2 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS=" -march=nocona -O2 -pipe " CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS=" -march=nocona -O2 -pipe " DISTDIR="/var/tmp/distfiles" EMERGE_DEFAULT_OPTS=" --with-bdeps=y " FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS=" http://ftp.twaren.net/Linux/Gentoo/ ftp://ftp.twaren.net/Linux/Gentoo/ http://ftp.iij.ad.jp/pub/linux/gentoo/ ftp://ftp.iij.ad.jp/pub/linux/gentoo/ " LANG="en_HK.utf8" LDFLAGS="-Wl,-O1" LINGUAS="en en_GB zh zh_TW" MAKEOPTS=" -j3 " PKGDIR="/var/tmp/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/overlay /usr/local/portage/layman/berkano" SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage" USE="X Xaw3d acl acpi alsa amd64 avahi bash-completion berkdb branding bzip2 cairo cdr cjk cli cracklib crypt cups cupsddk curl cvs cxx dbus directfb dri dvd dvdr dvdread dvi emacs encode esd fam fbcon flac gdbm gif git glut gnutls gpm gstreamer gtk hal iconv imagemagick immqt-bc ipv6 java java6 jpeg kde ladspa ldap libnotify libssh2 lzo mad mdnsresponder-compat midi mikmod mmx mozilla mp3 mpeg mplayer mudflap multilib ncurses nls nptl nptlonly nvidia ogg ogg123 opengl openmp pam pcre pdf perl png policykit ppds pppd preview-latex pulseaudio python qt3 qt3support qt4 quicktime readline realmedia rss samba sdk sdl seamonkey sensord session spell srt sse sse2 sse3 ssl ssse3 startup-notification subversion svg symlink sysfs tcpd tiff truetype unicode usb vorbis xml xorg xv xvmc zlib" ALSA_CARDS="hdaintel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB zh zh_TW" USERLAND="GNU" VIDEO_CARDS="fbdev nv nvidia vesa" Unset: CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
$ emerge -pv xdvik These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-text/xdvik-22.84.14 USE="cjk motif -Xaw3d -emacs -neXt" 0 kB $ xdvi Warning: Missing charsets in String to FontSet conversion Warning: Missing charsets in String to FontSet conversion xdvi-motif: Warning: Warning: Can't open "(null)" -> works fine $ locale LANG=en_US.utf8 LC_CTYPE="en_US.utf8" LC_NUMERIC="en_US.utf8" LC_TIME="en_US.utf8" LC_COLLATE="en_US.utf8" LC_MONETARY="en_US.utf8" LC_MESSAGES="en_US.utf8" LC_PAPER="en_US.utf8" LC_NAME="en_US.utf8" LC_ADDRESS="en_US.utf8" LC_TELEPHONE="en_US.utf8" LC_MEASUREMENT="en_US.utf8" LC_IDENTIFICATION="en_US.utf8" LC_ALL= can you please attach a backtrace following http://www.gentoo.org/proj/en/qa/backtraces.xml ? or is it specific to your en_HK locale ?
If xdvi has no previous history, it works fine until you start opening a dvi file. If xdvi can get hold of previously opened dvi file, you will run into trouble immediately. # emerge -1av xdvik These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] media-fonts/kochi-substitute-20030809-r3 USE="X" 0 kB [ebuild R ] app-text/xdvik-22.84.14 USE="Xaw3d cjk* emacs -motif -neXt" 0 kB % xdvi ~/Documents/letter.dvi Warning: locale not supported by Xlib, locale set to C xdvi-xaw3d: Warning: Warning: Can't open "(null)" Warning: Cannot convert string "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*,-*-*-medium-r-*-*-12-*-*-*-*-*-*" to type FontSet Warning: Unable to load any usable fontset Warning: Unable to load any usable fontset xdvi-xaw3d 22.84.14 j1.40 (Xaw toolkit): events.c:4146: Shouldn't happen: Segmentation fault - trying to clean up and aborting ... zsh: abort xdvi ~/Documents/letter.dvi % gdb /usr/bin/xdvi-xaw3d GNU gdb 6.7.1 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) set args ~/Documents/letter.dvi (gdb) run Starting program: /usr/bin/xdvi-xaw3d ~/Documents/letter.dvi Warning: locale not supported by Xlib, locale set to C xdvi-xaw3d: Warning: Warning: Can't open "(null)" Warning: Cannot convert string "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*,-*-*-medium-r-*-*-12-*-*-*-*-*-*" to type FontSet Warning: Unable to load any usable fontset Warning: Unable to load any usable fontset Program received signal SIGSEGV, Segmentation fault. SetTextWidthAndHeight (lw=0x22d9ec0) at Label.c:277 277 Label.c: No such file or directory. in Label.c
If I use USE="motif cjk", then the dvi file is shown, but all the menu(File, Navigate, Zoom,...) and page numbers in the side panel is not shown. % xdvi ~/Documents/letter.dvi > err 2>&1 % cat xdvi ~/Documents/letter.dvi Warning: locale not supported by Xlib, locale set to C Warning: Cannot convert string "-*-*-medium-r-*-*-12-*-*-*-*-*-*-*" to type FontSet Warning: Unable to load any usable fontset Warning: Name: =NORMAL Class: XmRendition Conversion failed. Cannot load font. Warning: Name: =UNMARKED Class: XmRendition Conversion failed. Cannot load font. Warning: Cannot convert string "-*-*-bold-r-*-*-12-*-*-*-*-*-*-*" to type FontSet Warning: Unable to load any usable fontset Warning: Name: =MARKED Class: XmRendition Conversion failed. Cannot load font. Warning: Name: =TOPIC_LABEL Class: XmRendition Conversion failed. Cannot load font. Warning: Cannot convert string "-*-*-bold-r-*-*-14-*-*-*-*-*-*-*" to type FontSet Warning: Unable to load any usable fontset Warning: Name: =TOPIC_HEADING Class: XmRendition Conversion failed. Cannot load font. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. xdvi-motif: Warning: Warning: Can't open "(null)" Warning: No font found. Warning: Name: =NORMAL Class: XmRendition Conversion failed. Cannot load font. Warning: Name: =UNMARKED Class: XmRendition Conversion failed. Cannot load font. Warning: Name: =MARKED Class: XmRendition Conversion failed. Cannot load font. Warning: Name: =TOPIC_LABEL Class: XmRendition Conversion failed. Cannot load font. Warning: Name: =TOPIC_HEADING Class: XmRendition Conversion failed. Cannot load font. Warning: Name: statusline Class: XmTextField XmFontListGetNextFont failed. Warning: Cannot convert string "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*,-*-*-medium-r-*-*-12-*-*-*-*-*-*," to type FontSet Warning: Unable to load any usable fontset Warning: Cannot convert string "fixed" to type FontSet Warning: Unable to load any usable fontset Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. Warning: No font found. With USE="motif -cjk", the menu and page numbers show up fine, with just 5 lines of noise: % xdvi ~/Documents/letter.dvi Warning: locale not supported by Xlib, locale set to C Warning: Cannot convert string "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*" to type FontSet Warning: Unable to load any usable fontset Warning: Cannot convert string "fixed" to type FontSet Warning: Unable to load any usable fontset /etc/texmf/xdvi/xdvi.cfg , /etc/X11/app-defaults/XDvi are precisely the default that comes with the relevant USE flags (i.e. dispatch-conf -> use-new).
(In reply to comment #3) > % cat xdvi ~/Documents/letter.dvi Urrgh, don't know what happened with my mouse middle click. That line should be: % cat err
(In reply to comment #3) > If I use USE="motif cjk", then the dvi file is shown, but all the menu(File, > Navigate, Zoom,...) and page numbers in the side panel is not shown. works fine here :( maybe some missing fonts ? as a difference between xaw3d and motif interfaces i have the "navigate, zoom, etc." buttons on the top of the window with motif instead of the side panel with xaw3d. equery belongs /usr/share/fonts will probably tell you which fonts you have installed anyway, it shouldn't segfault and handle the missing fonts with warnings instead of a crash > % xdvi ~/Documents/letter.dvi > err 2>&1 can you attach this dvi file ? (and better: also the latex source, just in case) because i can perfectly read my dvi files :/ by the way, what tex distribution are you using?
Created attachment 172194 [details] letter.dvi for testing xdvi (Stripping to minimal example...) letter.dvi is created on Gentoo amd64 by TeXLive 2007, using letter class with \address{(my address)} and so on... no major content, no packages loaded. It seems to be something specific to locales such as en_HK.UTF-8. With LANG being any of en_US.UTF-8 en_GB.UTF-8 zh_TW.UTF-8 it works. However, with en_SG.UTF-8 the same crash happens. # equery b /usr/share/fonts | grep media-fonts | awk '{print $1}' media-fonts/font-bh-type1-1.0.0 media-fonts/gnu-gs-fonts-std-8.11 media-fonts/corefonts-1-r4 media-fonts/font-adobe-75dpi-1.0.0 media-fonts/font-cursor-misc-1.0.0 media-fonts/ttf-bitstream-vera-1.10-r3 media-fonts/font-isas-misc-1.0.0 media-fonts/arphicfonts-0.1.20060928 media-fonts/hkscs-ming-1.0_pre20030919-r1 media-fonts/intlfonts-1.2.1 media-fonts/kochi-substitute-20030809-r3 media-fonts/font-misc-misc-1.0.0 media-fonts/font-adobe-utopia-type1-1.0.1 media-fonts/font-alias-1.0.1 media-fonts/wqy-bitmapfont-0.9.9_p0 media-fonts/unifont-1.0-r4 media-fonts/font-adobe-100dpi-1.0.0 media-fonts/font-sony-misc-1.0.0 media-fonts/encodings-1.0.2 media-fonts/opendesktop-fonts-1.4.2 media-fonts/font-util-1.0.1
Created attachment 172197 [details] latex source code for letter.dvi and latex source code.... it is pretty minimal.
I had been able to reproduce it... it was as you said caused by the cjk patch. I bumped xdvik to 22.84.16, which was long overdue, and the latest cjk patch doesnt apply to this version. Hence, I dropped that patch. You shouldn't see this problem anymore but cjk support may have decreased.