Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problematic DVI format of dviasm: FNTDEF before BOP #20

Open
aminophen opened this issue Mar 10, 2022 · 2 comments
Open

Problematic DVI format of dviasm: FNTDEF before BOP #20

aminophen opened this issue Mar 10, 2022 · 2 comments

Comments

@aminophen
Copy link
Owner

$ tex \\relax a\\end                           % => "texput.dvi" is written
$ dviasm texput.dvi >texput.dump
$ dviasm texput.dump -o texput.dump.dvi

The resulting "texput.dump.dvi" seems valid (at least for dvitype), but FNTDEF comes before BOP; I think such a DVI format is valid, as dvitype and most of the major DVI drivers accept it. However, there are some issues:

(1) dvi2tty hangs after an error

$ dvi2tty texput.dump.dvi
dvi2tty: Missing beginning-of-page command

It waits for user [Return] input, instead of exiting right away.

(2) dvispc fails to print FNTDEF before BOP.

$ dvispc -a texput.dump.dvi >texput.dump.spc.txt

It ignores FNTDEF before BOP as written in "texput.dump.dvi".

(3) dvi2tty crashes while processing dvispc's result

$ dvispc -x texput.dump.spc.txt texput.dump.spc.dvi
$ dvi2tty texput.dump.spc.dvi
Segmentation fault: 11

The dvispc's result "texput.dump.spc.dvi" does not contain FNTDEF before BOP or before the appearance of SETCHAR, so it's actually problematic (dvipdfmx seems ok, but dvips fails)

$ dvips texput.dump.spc.dvi
"This is dvips(k) 2022.1 (TeX Live 2022)  Copyright 2022 Radical Eye Software (www.radicaleye.com)
' TeX output 2022.03.10:2237' -> texput.spc.ps
Font number 0 not found
dvips: ! no font selected

but dvitype does not complain about it, so I'm not sure such a DVI file is valid. However, in any circumstances dvi2tty should not cause a segmentation fault.

@aminophen
Copy link
Owner Author

Issue of dvi2tty reported texjporg/tex-jp-build#138, but I want to consider improving dviasm.

@aminophen
Copy link
Owner Author

(3) dvi2tty crashes while processing dvispc's result

Fixed in r62644.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant