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 14:39:38 CET 2022


Jonathan Fine <jfine2358 at gmail.com> wrote on Sun, 23 Jan 2022
at 07:40:15 EST in <CALD=Yf9rdBZY5f26OdmaXXp2tPisQZjT4eLH9+Lo8sZoCUDEeA at mail.gmail.com>:

> Thank you for this John. I'm not a Mac or ARM person so I can't help much
> directly. dvitype works for me on my linux machine.

I didn't mean to suggest I had no workarounds -- as Jonathan suggests, pdflatex works, as does a "while :; xdvi file; sleep 1; done" wrapper.

I don't yet know if this is a Mac or an arm64 problem? -- I'd think the question would be what's going on at xdvik/dvi-draw.c:488 and to determine what state is invalid (and then why). I'd imagine we could get there with some platform-independent debugging in lldb, or perhaps some debugging printfs or tracing, but I'm not familiar with this code and could use some guidance.

I did ./Build --debug for xdvik-22.87.05 from source (with a configure patch from https://tug.org/svn/texlive/trunk/Build/source/texk/kpathsea/configure?r1=55760&r2=55759&pathrev=55760) and I now have a better stack trace now, with symbols and function parameters:

jhawk at loud-room 2021 eoir ca1 % lldb xdvi-bin    
(lldb) target create "xdvi-bin"
Current executable set to 'xdvi-bin' (arm64).
(lldb) run t2a
Process 76717 launched: '/Library/TeX/texbin/xdvi-bin' (arm64)
xdvi-bin: set_no_char: attempt to set character of unknown font, offset 42
xdvi-bin 22.87.05 (Xaw toolkit): ../../../texk/xdvik/dvi-draw.c:488: Shouldn't happen: I'll abort now, to help you debugging this.
Process 76717 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001945b99b8 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1945b99b8 <+8>:  b.lo   0x1945b99d8               ; <+40>
    0x1945b99bc <+12>: pacibsp 
    0x1945b99c0 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1945b99c4 <+20>: mov    x29, sp
Target 0: (xdvi-bin) stopped.
(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: 0x000000010004d18c xdvi-bin`do_abort at util.c:300:5
    frame #4: 0x0000000100004440 xdvi-bin`dvi_fmt_error(message="set_no_char: attempt to set character of unknown font") at dvi-draw.c:488:5
    frame #5: 0x0000000100009210 xdvi-bin`set_no_char(ch=0) at dvi-draw.c:1804:5
    frame #6: 0x000000010000681c xdvi-bin`draw_part(fp=0x00000001edbfeb40, minframe=0x0000000100176f18, current_dimconv=8.3022000830220009) at dvi-draw.c:1861:15
    frame #7: 0x0000000100007b9c xdvi-bin`draw_page at dvi-draw.c:2267:2
    frame #8: 0x0000000100022a1c xdvi-bin`redraw(windowrec=0x0000000100171f78) at events.c:6035:5
    frame #9: 0x0000000100023140 xdvi-bin`redraw_page at events.c:6188:5
    frame #10: 0x00000001000236d0 xdvi-bin`do_pages at events.c:6274:7
    frame #11: 0x00000001000567b4 xdvi-bin`run_dvi_file(filename="/Users/jhawk/Documents/2021 eoir ca1/t2a.dvi", data=0x00000001001762e0) at xdvi.c:3622:5
    frame #12: 0x00000001000019b8 xdvi-bin`main(argc=2, argv=0x000000016fdff708) at main.c:1311:6
    frame #13: 0x00000001002010f4 dyld`start + 520
(lldb) ^D


Does this suggest any useful lines of inquiry?


[ Aside: What's the right way to run TeX tools from their build tree? If I just attempt to run xdvi-bin naively, I have all kinds of texmf.cnf issues that result in oodles of this sort of thing:

---cut
jhawk at loud-room 2021 eoir ca1 % ~/src/xdvik-22.87.05/Work/texk/xdvik/xdvi-bin t2a               
warning: kpathsea: configuration file texmf.cnf not found in these directories: /Users/jhawk/src/xdvik-22.87.05/Work/texk/xdvik:/Users/jhawk/src/xdvik-22.87.05/Work/texk/xdvik/share/texmf-local/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texk/xdvik/share/texmf-dist/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texk/xdvik/share/texmf/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texk/xdvik/texmf-local/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texk/xdvik/texmf-dist/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texk/xdvik/texmf/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texk:/Users/jhawk/src/xdvik-22.87.05/Work/texk/share/texmf-local/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texk/share/texmf-dist/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texk/share/texmf/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texk/texmf-local/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texk/texmf-dist/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texk/texmf/web2c:/Users/jhawk/src/xdvik-22.87.05/texmf-local/web2c:/Users/jhawk/src/xdvik-22.87.05/Work:/Users/jhawk/src/xdvik-22.87.05/Work/share/texmf-local/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/share/texmf-dist/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/share/texmf/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texmf-local/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texmf-dist/web2c:/Users/jhawk/src/xdvik-22.87.05/Work/texmf/web2c.
xdvi-bin: Warning: could not find dvips map file psfonts.map; skipping


kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 cmbx10
mktexpk: /Users/jhawk/Library/texlive/2021/texmf-var/fonts/pk/ljfour/public/cm/cmbx10.600pk already exists.
...
---cut

Setting TEXMFCNF=/usr/local/texlive/2021 doesn't seem to help, beyond resolving the texmf.cnf not found error.

The quick and dirty workaround was to copy xdvi-bin out of the build tree to /Library/TeX/texbin/ and run it from there. ]

--
jhawk at alum.mit.edu
John Hawkinson

> As you have a deadline this weekend I suggest that you find a work-around.
> Perhaps using pdflatex will help you, depending on the PS specials you are
> using. Otherwise, perhaps use dvips + ps 2 pdf for preview.
> 
> I hope this helps with your deadline.



More information about the tex-live mailing list.