[tlbuild] dvi test?

Bruno Voisin bvoisin at icloud.com
Sat Jan 29 11:41:39 CET 2022


Following are results from an experiment on three different Macs

(1) macOS 10.13 on Intel	(ie High Sierra on a MacBook Pro 17" from 2010)
(2) macOS 11 on Intel		(ie Big Sur on a MacBook 12" from 2015)
(3) macOS 12 on ARM		(ie Monterey on a MacBook Pro 13" from 2020)

with exactly the same TeX and X11 setup: MacTeX-2020 -- including Ghostscript 9.50 -- and XQuartz 2.8.1.

On all three of them, I typeset t2a.tex and opened t2a.dvi in xdvi, then reloaded page 1.

Short version: no crash on (1), crash on both (2) and (3). Adding -noghostscript to the xdvi call changes nothing.

Longer version: the console output of "xdvi -debug 256 t2a.dvi" is pasted below. I fail to see any logic there.

TeX, Ghostscript and X11 are the same in all cases, so it must come from their environment, whatever this means.

Ghostscript does not seem involved.

The default shell is bash on High Sierra and zsh on Big Sur and Monterey. I ran xdvi in bash on Monterey: same result.

Code signing and notarization are required on Big Sur and Monterey, and not required on High Sierra. Dick (Koch) signs and notarizes all the MacTeX binaries. So it's not that.

SIP (System Integrity Protection) is present in Big Sur and Monterey, absent in High Sierra. But XQuartz reads fonts from /opt/X11/share/{fonts,system_fonts}, where the latter contains symlinks to the System fonts from /System/Library/Fonts (like Times.ttc). The fontconfig files are generated there, not in /System/Library/Fonts which is protected by SIP. So it's not that either.

The only constant in all the tests, I think, is that \usepackage{draftcopy} is required for the crash to occur. So the PostScript instructions in the DVI file,

! userdict
begin
/draftcopy-CurrentPage 0 def
/draftcopy-old-BOPhook { } def
currentdict /bop-hook  known{
      /draftcopy-old-BOPhook /bop-hook  load def
} if
/bop-hook{
  draftcopy-old-BOPhook
  /draftcopy-CurrentPage draftcopy-CurrentPage 1 add def
  draftcopy-CurrentPage 0 ge
  draftcopy-CurrentPage 99999 le
  and
  { gsave 200 70 translate 65 rotate 
    /Times-Roman findfont
    215 1  mul scalefont setfont
    0  0  moveto
    0.85 setgray
    (DRAFT)  show
    grestore 
  } if 
} def
end

are responsible for the crash in some way.

I found crash logs xdvi-xaw-<date-and-time>.ips in ~/Library/Logs/DiagnosticReports/, but they are not symbolicated, contrary to John's symbolicated logs earlier in this thread. They tell us nothing beyond xdvi asking for abort(), and the libsystem dylibs obliging.   

The only thing I could think of, based on

xdvi-xaw: set_no_char: attempt to set character of unknown font, offset 42

is xdvi excepting a font number in a certain format (integer or non-integer, signed or unsigned, single or double precision -- possibly this makes no sense, I'm speaking here of something, the C language, I don't really know), when processing findfont maybe, and the system libs or frameworks returning this number in a different format.

In the past, when compiling Ghostscript with clang (the macOS compiler), difficulties have arisen at times because of the differences between clang and actual gcc (like clang frowning over implicit type declaration). But these difficulties arose at compile time, not when running the produced binary.

And, above everything, why does the problem arise only when reloading a page, not when loading it the first time?

So I'm absolutely clueless.

Bruno Voisin


(1) macOS 10.13 on Intel
========================

Before reload

$ xdvi -debug 256 t2a.dvi
Warning: locale not supported by Xlib, locale set to C
KPATHSEA_DEBUG = 4
kdebug:fopen(t2a.dvi, r) => 0x7fffb7a2a030
kdebug:fopen(/Users/brunovoisin/Desktop/Temp/Xdvi/t2a.dvi, r) => 0x7fffb7a2a0c8
kdebug:fclose(0x7fffb7a2a0c8) => 0
xdvik 22.87.04 (Xaw toolkit), kpathsea: kpathsea version 6.3.2
configured with: ppi=600 shrink=8 mfmode=<NONE> alt_font=cmr10 paper=a4
--- G_depth: 24
kdebug:fopen(/usr/local/texlive/texmf-local/web2c/texmf.cnf, r) => 0x7fffb7a2a0c8
kdebug:fclose(0x7fffb7a2a0c8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf.cnf, r) => 0x7fffb7a2a0c8
kdebug:fclose(0x7fffb7a2a0c8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/web2c/texmf.cnf, r) => 0x7fffb7a2a0c8
kdebug:fclose(0x7fffb7a2a0c8) => 0
kdebug:fopen(/usr/local/texlive/texmf-local/ls-R, r) => 0x7fffb7a2a0c8
kdebug:fclose(0x7fffb7a2a0c8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-config/ls-R, r) => 0x7fffb7a2a0c8
kdebug:fclose(0x7fffb7a2a0c8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-var/ls-R, r) => 0x7fffb7a2a0c8
kdebug:fclose(0x7fffb7a2a0c8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/ls-R, r) => 0x7fffb7a2a0c8
kdebug:fclose(0x7fffb7a2a0c8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-config/dvips/config/config.ps, r) => 0x7fffb7a2a0c8
kdebug:fclose(0x7fffb7a2a0c8) => 0
kdebug:fopen(/Users/brunovoisin/.dvipsrc, r) => 0x0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/dvips/xdvi/config.xdvi, r) => 0x7fffb7a2a0c8
kdebug:fclose(0x7fffb7a2a0c8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-var/fonts/map/dvips/updmap/psfonts.map, r) => 0x7fffb7a2a0c8
kdebug:fclose(0x7fffb7a2a030) => 0
kdebug:fopen(/Users/brunovoisin/Desktop/Temp/Xdvi/t2a.dvi, r) => 0x7fffb7a2a030
Warning: Unable to load any usable fontset
../../../texk/xdvik/special.c:1337: |l3backend-dvips.pro| expanded to |/usr/local/texlive/2020/texmf-dist/dvips/l3backend/l3backend-dvips.pro|
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/dvips/l3backend/l3backend-dvips.pro, r) => 0x7fffb7a2a1f8
kdebug:fclose(0x7fffb7a2a1f8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb, r) => 0x7fffb7a2a1f8
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmcsc10.pfb, r) => 0x7fffb7a2a290
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb, r) => 0x7fffb7a2a328

and after it

kdebug:fclose(0x7fffb7a2a030) => 0
kdebug:fopen(/Users/brunovoisin/Desktop/Temp/Xdvi/t2a.dvi, r) => 0x7fffb7a2a030
../../../texk/xdvik/special.c:1337: |l3backend-dvips.pro| expanded to |/usr/local/texlive/2020/texmf-dist/dvips/l3backend/l3backend-dvips.pro|
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/dvips/l3backend/l3backend-dvips.pro, r) => 0x7fffb7a2a3c0
kdebug:fclose(0x7fffb7a2a3c0) => 0
kdebug:fopen(/Users/brunovoisin/.xdvirc, r) => 0x7fffb7a2a3c0
kdebug:fclose(0x7fffb7a2a3c0) => 0
kdebug:fopen(/Users/brunovoisin/.xdvirc.tmp, r) => 0x7fffb7a2a3c0
kdebug:fclose(0x7fffb7a2a3c0) => 0
kdebug:fclose(0x7fffb7a2a458) => 0


(2) macOS 11 on Intel
=====================

Before reload

% xdvi -debug 256 t2a.dvi
Warning: locale not supported by Xlib, locale set to C
KPATHSEA_DEBUG = 4
kdebug:fopen(t2a.dvi, r) => 0x7fff8075a320
kdebug:fopen(/Users/brunovoisin/Desktop/Test/t2a.dvi, r) => 0x7fff8075a3b8
kdebug:fclose(0x7fff8075a3b8) => 0
xdvik 22.87.04 (Xaw toolkit), kpathsea: kpathsea version 6.3.2
configured with: ppi=600 shrink=8 mfmode=<NONE> alt_font=cmr10 paper=a4
--- G_depth: 24
kdebug:fopen(/usr/local/texlive/texmf-local/web2c/texmf.cnf, r) => 0x7fff8075a3b8
kdebug:fclose(0x7fff8075a3b8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf.cnf, r) => 0x7fff8075a3b8
kdebug:fclose(0x7fff8075a3b8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/web2c/texmf.cnf, r) => 0x7fff8075a3b8
kdebug:fclose(0x7fff8075a3b8) => 0
kdebug:fopen(/usr/local/texlive/texmf-local/ls-R, r) => 0x7fff8075a3b8
kdebug:fclose(0x7fff8075a3b8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-config/ls-R, r) => 0x7fff8075a3b8
kdebug:fclose(0x7fff8075a3b8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-var/ls-R, r) => 0x7fff8075a3b8
kdebug:fclose(0x7fff8075a3b8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/ls-R, r) => 0x7fff8075a3b8
kdebug:fclose(0x7fff8075a3b8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-config/dvips/config/config.ps, r) => 0x7fff8075a3b8
kdebug:fclose(0x7fff8075a3b8) => 0
kdebug:fopen(/Users/brunovoisin/.dvipsrc, r) => 0x0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/dvips/xdvi/config.xdvi, r) => 0x7fff8075a3b8
kdebug:fclose(0x7fff8075a3b8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-var/fonts/map/dvips/updmap/psfonts.map, r) => 0x7fff8075a3b8
kdebug:fclose(0x7fff8075a320) => 0
kdebug:fopen(/Users/brunovoisin/Desktop/Test/t2a.dvi, r) => 0x7fff8075a320
Warning: Unable to load any usable fontset
../../../texk/xdvik/special.c:1337: |l3backend-dvips.pro| expanded to |/usr/local/texlive/2020/texmf-dist/dvips/l3backend/l3backend-dvips.pro|
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/dvips/l3backend/l3backend-dvips.pro, r) => 0x7fff8075a4e8
kdebug:fclose(0x7fff8075a4e8) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb, r) => 0x7fff8075a4e8
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmcsc10.pfb, r) => 0x7fff8075a580
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb, r) => 0x7fff8075a618

and after it

kdebug:fclose(0x7fff8075a320) => 0
kdebug:fopen(/Users/brunovoisin/Desktop/Test/t2a.dvi, r) => 0x7fff8075a320
kdebug:fclose(0x7fff8075a320) => 0
xdvi-xaw: set_no_char: attempt to set character of unknown font, offset 42
xdvi-xaw 22.87.04 (Xaw toolkit): ../../../texk/xdvik/dvi-draw.c:488: Shouldn't happen: I'll abort now, to help you debugging this.
zsh: abort      xdvi -debug 256 t2a.dvi


(3) macOS 12 on ARM
===================

Before reload

% xdvi -debug 256 t2a.dvi
Warning: locale not supported by Xlib, locale set to C
KPATHSEA_DEBUG = 4
kdebug:fopen(t2a.dvi, r) => 0x7ff857ae1980
kdebug:fopen(/Users/brunovoisin/Desktop/Temp/TeX/t2a.dvi, r) => 0x7ff857ae1a18
kdebug:fclose(0x7ff857ae1a18) => 0
xdvik 22.87.04 (Xaw toolkit), kpathsea: kpathsea version 6.3.2
configured with: ppi=600 shrink=8 mfmode=<NONE> alt_font=cmr10 paper=a4
--- G_depth: 24
kdebug:fopen(/usr/local/texlive/texmf-local/web2c/texmf.cnf, r) => 0x7ff857ae1a18
kdebug:fclose(0x7ff857ae1a18) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf.cnf, r) => 0x7ff857ae1a18
kdebug:fclose(0x7ff857ae1a18) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/web2c/texmf.cnf, r) => 0x7ff857ae1a18
kdebug:fclose(0x7ff857ae1a18) => 0
kdebug:fopen(/usr/local/texlive/texmf-local/ls-R, r) => 0x7ff857ae1a18
kdebug:fclose(0x7ff857ae1a18) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-config/ls-R, r) => 0x7ff857ae1a18
kdebug:fclose(0x7ff857ae1a18) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-var/ls-R, r) => 0x7ff857ae1a18
kdebug:fclose(0x7ff857ae1a18) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/ls-R, r) => 0x7ff857ae1a18
kdebug:fclose(0x7ff857ae1a18) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-config/dvips/config/config.ps, r) => 0x7ff857ae1a18
kdebug:fclose(0x7ff857ae1a18) => 0
kdebug:fopen(/Users/brunovoisin/.dvipsrc, r) => 0x0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/dvips/xdvi/config.xdvi, r) => 0x7ff857ae1a18
kdebug:fclose(0x7ff857ae1a18) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-var/fonts/map/dvips/updmap/psfonts.map, r) => 0x7ff857ae1a18
kdebug:fclose(0x7ff857ae1980) => 0
kdebug:fopen(/Users/brunovoisin/Desktop/Temp/TeX/t2a.dvi, r) => 0x7ff857ae1980
Warning: Unable to load any usable fontset
../../../texk/xdvik/special.c:1337: |l3backend-dvips.pro| expanded to |/usr/local/texlive/2020/texmf-dist/dvips/l3backend/l3backend-dvips.pro|
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/dvips/l3backend/l3backend-dvips.pro, r) => 0x7ff857ae1b48
kdebug:fclose(0x7ff857ae1b48) => 0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb, r) => 0x7ff857ae1b48
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmcsc10.pfb, r) => 0x7ff857ae1be0
kdebug:fopen(/usr/local/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb, r) => 0x7ff857ae1c78

and after it

kdebug:fclose(0x7ff857ae1980) => 0
kdebug:fopen(/Users/brunovoisin/Desktop/Temp/TeX/t2a.dvi, r) => 0x7ff857ae1980
kdebug:fclose(0x7ff857ae1980) => 0
xdvi-xaw: set_no_char: attempt to set character of unknown font, offset 42
xdvi-xaw 22.87.04 (Xaw toolkit): ../../../texk/xdvik/dvi-draw.c:488: Shouldn't happen: I'll abort now, to help you debugging this.
zsh: abort      xdvi -debug 256 t2a.dvi




More information about the tlbuild mailing list.