Repeated Mac arm64 crashes of xdvi-xaw with "set_no_char: attempt to set character of unknown font, offset 42"

John Hawkinson jhawk at alum.mit.edu
Sun Jan 23 00:26:17 CET 2022


Hi. I hope this is the correct place to report this bug, which I have found incredibly frustrating.

A few months ago I moved my work environment from an older x86_64 Mac to a new arm64 M1 Max running MacOS 12.1 and XQuartz 2.8.1, but still with Tex Live 2015, and immediately I began seeing crashes in xdvi when hitting shift-R to reload the current DVI file. Since I did not need to work on any major TeX projects, so I was able to ignore it. I figured these would finally go away when I upgraded to Tex Live 2021, but having done that, the problems remain (and of course now I have a looming deadline this weekend that makes this very annoying).

Crashes look like this:

jhawk at loud-room 2021 eoir ca1 % xdvi-xaw t2a
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.

They are always unknown font, offset 42.

MacOS 12.1 makes it extremely annoying to get a backtrace, because of security hardening and the lack of a debugging entitlement in xdvi-xaw. After hunting around, I found https://gist.github.com/talaviram/1f21e141a137744c89e81b58f73e23c3 which I used to rewrite the code signature and add entitlements that allow lldb to work. After so doing (binary is renamed from xdvi-xaw to xdvi-xaw2) I get this backtrace:

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00000001945b99b8 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x00000001945eceb0 libsystem_pthread.dylib`pthread_kill + 288
    frame #2: 0x000000019452a314 libsystem_c.dylib`abort + 164
    frame #3: 0x0000000100038c3c xdvi-xaw2`do_abort + 16
    frame #4: 0x00000001000031f8 xdvi-xaw2`dvi_fmt_error + 272
    frame #5: 0x0000000100008708 xdvi-xaw2`___lldb_unnamed_symbol13$$xdvi-xaw2 + 80
    frame #6: 0x0000000100004e44 xdvi-xaw2`___lldb_unnamed_symbol11$$xdvi-xaw2 + 352
    frame #7: 0x0000000100006f60 xdvi-xaw2`draw_page + 2108
    frame #8: 0x0000000100019834 xdvi-xaw2`redraw + 480
    frame #9: 0x0000000100019d28 xdvi-xaw2`redraw_page + 1244
    frame #10: 0x0000000100019dc0 xdvi-xaw2`do_pages + 128
    frame #11: 0x00000001000414bc xdvi-xaw2`run_dvi_file + 8796
    frame #12: 0x0000000100001d14 xdvi-xaw2`main + 3412
    frame #13: 0x00000001001450f4 dyld`start + 520

(I'm sorry there are not symbols. I'm not what the path of least resistance to get them would be?)

Although I can trigger this crash 100% of the time with the document I'm working on, reducing it to a minimum working example was surprisingly challenging and fragile. Changing almost any single line seems to at first make the problem go away, but oftentimes it simply makes the crash less reproducible, occuring on the 30th or 50th press of shift-R.  What I've attached seems far too complicated to be the minimum, but I was unable to easily reduce it any further.

Minimum working example that generates the crash follows below my email signature. latex it, xdvi it, and hit shift-R in xdvi and it should crash immediately.

jhawk at lr 2021 eoir ca1 % latex \\nonstopmode\\input t2a.tex
latex \\nonstopmode\\input t2a.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-18>
(./t2a.tex (/usr/local/texlive/2021/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
(./t2a.aux) [1] [2] [3] (./t2a.aux) )
Output written on t2a.dvi (3 pages, 1544 bytes).
Transcript written on t2a.log.
jhawk at loud-room 2021 eoir ca1 % xdvi t2a
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 t2a
jhawk at loud-room 2021 eoir ca1 % 

Please let me know if there's anything else needed for a complete bug report.

Thanks!

--
jhawk at alum.mit.edu
John Hawkinson

% begin t2a.tex
\documentclass{article}
\usepackage{draftcopy}

\begin{document}
\section{Table of Authorities}
\sc a\hfill\rm B\par
\newpage
xxx
\newpage
\begin{center}\textbf{CERTIFICATE OF TYPE-VOLUME COMPLIANCE\\
    and COLOPHON}\end{center}


Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo

\end{document}
% end t2a.tex


More information about the tex-live mailing list.