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

PDFs missing from NoteCards HC files at files.interlisp.org #1830

Open
pamoroso opened this issue Sep 13, 2024 · 29 comments
Open

PDFs missing from NoteCards HC files at files.interlisp.org #1830

pamoroso opened this issue Sep 13, 2024 · 29 comments

Comments

@pamoroso
Copy link
Contributor

Some TEdit files of the NoteCards documentation are missing the matching PDFs the HC file generation process should make from them at files.interlisp.org. In directory {MEDLEY}/notecards/docs/user-guide-v1.2/ the following TEdit files have no matching PDFs:

  • 03-SOFTWARE-INSTALLATION.TEDIT
  • 04-SYSTEM-USE-ISSUES.TEDIT
  • 05-NOTECARDS-BASICS.TEDIT
  • 11-SYSTEM-CARDS.TEDIT
  • APP-Z-PROG-INTERFACE.TEDIT

Most or all PDFs are missing from {MEDLEY}/notecards/docs/user-guide-v1.2/from_envos/ and {MEDLEY}/notecards/docs/misc/from_envos/.

@masinter
Copy link
Member

these are all files that failed in some way (an error or call to HELP) when run through TEdit or (for Lisp source files) have package problems.

The Notecards files might have missing image object sources, because Notecards isn't in WHEREIS.HASH for TEdit to pick up.

There may be other reasons that all need to be fixedd in the HCFILES process or perhaps some TEdit bugs.

I think the way to address these is to take the files one at a time, try to TEdit hardcopy the file, fix the problems encountered and then try again. Since many of the problems affect more than one file.

@masinter
Copy link
Member

@pamoroso @rmkaplan @fghalasz The task here is to figure out why HCFILES fails on these files by seeing what errors arise when you just try to TEDIT the files and "hardcopy" to pdf or postscript.

@fghalasz wrote:

The hcfiles-fails.txt and hcfiles.dribble files from the weekly builds are stored along with all the hcfiles-generated PDF files on files.interlisp.org. Unfortunately they are not included in the html index pages that HCFILES creates because they are not available until after HCFILES is run.

But they are available at https://files.interlisp.org/medley/loadups/hcfiles-fails.txt and https://files.interlisp.org/medley/loadups/hcfiles.dribble either in a browser or via wget.

hcfiles-fails.txt is just a selection from hcfiles.dribble of every line that ends in IL:FAIL.

@pamoroso
Copy link
Contributor Author

I did a quick sampling and most of the issues are GETFN: HRULE.GETFN errors in IMAGEOBJs.

In one case opening the file with TEdit breaks with the error Help! Shouldn't happen:. In another I was able to use the file browser's hardcopy option to produce a PostScript file. The PostScript document has dashed boxes with an error message where the IMAGEOBs errors show up in TEdit.

I'll go through each file and report on the issues in more detail.

@pamoroso
Copy link
Contributor Author

Opening {MEDLEY}/notecards/docs/user-guide-v1.2/03-SOFTWARE-INSTALLATION.TEDIT with (TEDIT '03-SOFTWARE-INSTALLATION.TEDIT) yields a blank TEdit window and a break window with the error:

Help! Shouldn't happen:

The context of the error:

6_: BT
HELP
SHOULDNT
OPENTEXTSTREAM
TEDIT
TEDIT
FAULTEVAL
EVAL
EXEC

7_: BTV
   MESS1 "Shouldn't happen:"
   MESS2 NIL
HELP
   MESS NIL
SHOULDNT
   FILE 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>03-SOFTWARE-INSTALLATION.TEDIT;1/130,12200>
   TEXTOBJ {TEXTOBJ}#144,172000
   LOOKS {FMT101/62648:NI-204-504}
   FILEPOS 9827
   LOOKSLEN 53
   TABFLG 87
   DEFTAB NIL
   TABCOUNT NIL
   TABS NIL
   TABSPEC (36)
   TABTYPE NIL
   QUAD 135
\TEDIT.GET.SINGLE.PARALOOKS
   FILE 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>03-SOFTWARE-INSTALLATION.TEDIT;1/130,12200>
   TEXTOBJ {TEXTOBJ}#144,172000
   I 1
\TEDIT.GET.PARALOOKS.LIST
   TEXT 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>03-SOFTWARE-INSTALLATION.TEDIT;1/130,12200>
   TEXTOBJ {TEXTOBJ}#144,172000
   PCCOUNT 467
   CURFILEBYTE# 0
   END 16966
   PCNO 1
   ORIGBYTE# 0
   DEFAULTCHARLOOKS {CL101/13312:Gacha10}
   OLDPARALOOKS {FMT101/62694:LE-0-0}
   PC NIL
   BYTELEN 0
   PREVPC {PIECE}#144,127614
   FIRSTPC {PIECE}#144,127614
   PARALOOKSMAP NIL
   CHARLOOKSMAP NIL
\TEDIT.GET.PIECES3
   TEXT 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>03-SOFTWARE-INSTALLATION.TEDIT;1/130,12200>
   TSTREAM #<IO Text Stream/174,76000>
   START 0
   END 16966
   PROPS (BEING-EDITED T)
   TEXTOBJ {TEXTOBJ}#144,172000
   TRAILER (8283 17 3 467 1756286001)
   PCCOUNT 467
   IDATE NIL
   PC NIL
\TEDIT.GET.FORMATTED.FILE
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   TEXTOBJ {TEXTOBJ}#144,172000
   PWINDOW {WINDOW}#122,73664
   READONLY NIL
SI::*UNWIND-PROTECT*
   TEXT 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>03-SOFTWARE-INSTALLATION.TEDIT;1/130,12200>
   TSTREAM #<IO Text Stream/174,76000>
   START 0
   END 16966
   PROPS (BEING-EDITED T)
   LISPXHIST ((&) (4 "" . "_ ") "<not yet evaluated>" 
NIL)
   SI::*RESETFORMS* NIL
   RESETSTATE NIL
\TEDIT.OPENTEXTSTREAM.PIECES
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   TSTREAM #<IO Text Stream/174,76000>
   TEXTOBJ {TEXTOBJ}#144,172000
   TEDIT.GET.FINISHEDFORMS NIL
   PRIMARYW NIL
SI::*UNWIND-PROTECT*
   TEXT 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>03-SOFTWARE-INSTALLATION.TEDIT;1/130,12200>
   WINDOW {WINDOW}#122,77000
   START NIL
   END NIL
   PROPS (BEING-EDITED T)
   LISPXHIST ((&) (4 "" . "_ ") "<not yet evaluated>" 
NIL)
   SI::*RESETFORMS* NIL
   RESETSTATE NIL
OPENTEXTSTREAM
   TEXT 03-SOFTWARE-INSTALLATION.TEDIT
   WINDOW NIL
   DONTSPAWN NIL
   PROPS (BEING-EDITED T)
   TSTREAM NIL
   PROC NIL
TEDIT
   TEXT 03-SOFTWARE-INSTALLATION.TEDIT
   WINDOW NIL
   DONTSPAWN NIL
   PROPS NIL
TEDIT
   *FORM* (TEDIT (QUOTE 03-SOFTWARE-INSTALLATION.TEDIT))
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* TEDIT
\EVALFORM
FAULTEVAL
   *FORM* (UNDOABLY (TEDIT &))
\EVALFORM
   \INTERNAL NIL
EVAL
EVAL-INPUT
   RETRYFLAG NIL
   HELPCLOCK 1084
DO-EVENT
   SI::*DUMMY-FOR-CATCH* T
   SI::*CATCH-RETURN-FROM* (&)
   LISPXHIST ((&) (4 "" . "_ ") "<not yet evaluated>" 
NIL)
   HELPCLOCK 0
XCL::EXECA0001A0002
   *CURRENT-EVENT* ((&) (4 "" . "_ ") 
"<not yet evaluated>" NIL)
   SI::NLSETQ-VALUE NIL
   *PROCEED-CASES* (&)
   SI::*NLSETQFLAG* NIL
XCL::EXECA0001
\PROGV
   XCL::TOP-LEVEL-P T
   XCL::WINDOW {WINDOW}#161,150664
   XCL::TITLE-SUPPLIED NIL
   XCL::TITLE NIL
   *THIS-EXEC-COMMANDS* (#<Hash-Table @ 166,31666>)
   XCL::ENVIRONMENT NIL
   XCL::PROMPT NIL
   XCL::FN EVAL-INPUT
   XCL::PROFILE "XCL"
   *EXEC-ID* ""
   XCL::PROFILE-CACHE (XCL::*PROFILE-NAME* "IL" 
XCL:*EVAL-FUNCTION* EVAL *PACKAGE* #<Package INTERLISP> 
*READTABLE* #<ReadTable INTERLISP/174,75714> 
XCL:*EXEC-PROMPT* "_ " --)
EXEC
\PROC.REPEATEDLYEVALQT
   *FORM* (\PROC.REPEATEDLYEVALQT)
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* \PROC.REPEATEDLYEVALQT
\EVALFORM
   %#FORM# (\PROC.REPEATEDLYEVALQT)
   *CURRENT-PROCESS* #<Process EXEC/174,26204>
   HELPFLAG BREAK!
   \CURRENTDISPLAYLINE 0
   \#DISPLAYLINES 25
   \LINEBUF.OFD #<IO Linebuffer Stream/144,125400>
   *READTABLE* #<ReadTable INTERLISP/174,75714>
   \PRIMTERMTABLE {TERMTABLEP}#174,70740
   \PRIMTERMSA {CHARTABLE}#174,71000
   TtyDisplayStream #<Output Display Stream/130,12700>
   SI::*RESETFORMS* NIL
   \INTERRUPTABLE T
   \TTYWINDOW NIL
   READBUF NIL
   \TERM.OFD #<Output Display Stream/170,117500>
   *STANDARD-OUTPUT* #<Output Display Stream/170,117500>
   *STANDARD-INPUT* #<IO Linebuffer Stream/144,125400>
\MAKE.PROCESS0
T

@pamoroso
Copy link
Contributor Author

Opening {MEDLEY}/notecards/docs/user-guide-v1.2/04-SYSTEM-USE-ISSUES.TEDIT with (TEDIT '04-SYSTEM-USE-ISSUES.TEDIT)displays the document with errors like this in some IMAGEOBJs:

Error in IMAGEOBJ
GETFN: HRULE.GETFN

The document has other rendering issues such as black boxes and random ideographic characters like in this screenshot:

ncdocs-tedit-error

Using the mouse wheel to scroll down the document yields a break window with the error:

In CL::%%NOT-NONCOMPLEX-NUMBER-ERROR
NIL is not a NUMBER.

The error context:

OLDMOUSE/8(debug)BT
CL::%%NOT-NONCOMPLEX-NUMBER-ERROR
IDIFFERENCE
HRULE.IMAGEBOXFN
ENCAPSULATEDOBJ.IMAGEBOXFN
SCROLLW
WHEELSCROLL.DOIT

OLDMOUSE/9(debug)BTV
CL::%%NOT-NONCOMPLEX-NUMBER-ERROR
IDIFFERENCE
   HRULE {IMAGEOBJ}#144,166110
   IMAGE.STREAM #<Output Display Stream/130,12300>
   CURRENT.X NIL
   RIGHT.MARGIN NIL
   SCALE 1
   WIDTHS 2
HRULE.IMAGEBOXFN
   IMAGEOBJ {IMAGEOBJ}#144,166110
   STREAM #<Output Display Stream/130,12300>
   GETFN HRULE.GETFN
   NEWOBJ {IMAGEOBJ}#120,57572
   WIDTH NIL
   HEIGHT NIL
   FONT NIL
ENCAPSULATEDOBJ.IMAGEBOXFN
   TEXTOBJ {TEXTOBJ}#144,172000
   CH#1 7355
   LINE {L:NIL-1000000 79/22482}
   REGION NIL
   IMAGESTREAM #<Output Display Stream/130,12300>
   FORMATTINGSTATE NIL
   TSTREAM #<IO Text Stream/174,76000>
   THISLINE {THISLINE}#144,171714
   OFFSET 0
   TRUEASCENT 9
   TRUEDESCENT 3
   ASCENTB 9
   DESCENTB 3
   ASCENTC 12
   DESCENTC 3
   OVERHANG 0
   SPACELEFT 0
   TX 250
   LINETYPE TRUEDISPLAY
   DISPLAYSTREAM #<Output Display Stream/130,12300>
   WIDTH 300
   WMARGIN 8
   SCALE 1
   FMTSPEC {FMT82/27136:JU-204-504}
   RIGHTMARGIN 504
   TABSPEC (36 (240 . LEFT) (240 . LEFT) (504 . RIGHT))
   KERN NIL
   FIRSTWHITEX 175
   FIRSTWHITESLOT {}#107,17114
   PC {PIECE}#121,176744
   CHARSLOT {}#107,17204
   PREVSP {}#107,17114
   1STLN NIL
   PROTECTED NIL
   CHNOB 7389
   FORCED-END NIL
   CHNO 7402
   LX1 204
   TX NIL
   TXB 177
   FONT {FONTDESCRIPTOR}#136,30524
   CHARSLOTB {}#107,17114
   TABPENDING NIL
   PREVHYPH NIL
   PREVDHYPH NIL
   START-OF-PIECE 7114
   UNBREAKABLE NIL
   JUSTIFIED T
   INWORD T
   LASTCHARSLOT {}#107,20674
   TEXTLEN 28317
   CH {IMAGEOBJ}#144,166110
   DX 10
   BOX NIL
   INSPACES NIL
\TEDIT.FORMATLINE
   PREVLINE {L:7232-7295 79/22612}
   LASTCHAR 28317
   PANE {WINDOW}#122,77000
   TEXTOBJ {TEXTOBJ}#144,172000
   DONTDISPLAY NIL
   LCHARLIM 7354
   YBOT 3
   PBOTTOM 0
   L {L:7296-7354 79/22528}
   NEXT {L:7296-7354 79/22528}
\TEDIT.LINES.BELOW
   TEXTOBJ {TEXTOBJ}#144,172000
   PANE {WINDOW}#122,77000
   DY -8
   PREG (0 0 592 850)
   TEXTLEN 28317
   PBOTTOM 0
   PHEIGHT 850
   PLINES {L:0-0 FE 79/65490}
   OLDTOPLINE {L:5421-5422* FE 79/27560}
   NEWTOPLINE {L:5423-5423* FE 79/27476}
   LASTVISIBLE {L:7232-7295 79/22612}
   WHERESEL (ABOVE . ABOVE)
   DELTA 14
\TEDIT.SCROLLUP
   PANE {WINDOW}#122,77000
   DX 0
   DY 20
   TEXTOBJ {TEXTOBJ}#144,172000
\TEDIT.SCROLLFN
   WINDOW {WINDOW}#122,77000
   DX 0
   DY 20
   CONTINUOUSFLG NIL
SCROLLW
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
SI::*UNWIND-PROTECT*
   WINDOW {WINDOW}#122,77000
   DX 0
   DY 20
   SI::*RESETFORMS* ((\WHEELSCROLLINPROGRESS))
WHEELSCROLL.DOIT
   *FORM* (WHEELSCROLL.DOIT (QUOTE {WINDOW}#122,77000) 0
 20)
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* WHEELSCROLL.DOIT
\EVALFORM
   ..PEV-FORM.. (WHEELSCROLL.DOIT (QUOTE {WINDOW}#122,
77000) 0 20)
   ..PEV-PROC.. NIL
\PROCESS.EVAL1
   \OLDTTY NIL
   \MOUSEBUSY NIL
\MOUSE.PROCESS
   *FORM* (\MOUSE.PROCESS)
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* \MOUSE.PROCESS
\EVALFORM
   %#FORM# (\MOUSE.PROCESS)
   *CURRENT-PROCESS* #<Process OLDMOUSE/174,26410>
   HELPFLAG BREAK!
   \CURRENTDISPLAYLINE 0
   \#DISPLAYLINES 15
   \LINEBUF.OFD #<IO Linebuffer Stream/130,31700>
   *READTABLE* #<ReadTable INTERLISP/174,75714>
   \PRIMTERMTABLE {TERMTABLEP}#174,70740
   \PRIMTERMSA {CHARTABLE}#174,71000
   TtyDisplayStream #<Output Display Stream/170,117300>
   SI::*RESETFORMS* NIL
   \INTERRUPTABLE T
   \TTYWINDOW {WINDOW}#122,72264
   READBUF NIL
   \TERM.OFD #<Output Display Stream/167,117700>
   *STANDARD-OUTPUT* #<Output Display Stream/167,117700>
   *STANDARD-INPUT* #<IO Linebuffer Stream/130,31700>
\MAKE.PROCESS0
T

Exiting the break with ^ and scrolling down some more sometimes yields the same break window.

Using the scroll bar to scroll yields a break window with the same error but a different stacktrace.

Using the Hardcopy > To a file option of the TEdit window's right-click menu yields a break window with the same error but a different stacktrace. However, a PostScript file is still produced and it renders similarly to the document in the TEdit window.

@pamoroso
Copy link
Contributor Author

Opening {MEDLEY}/notecards/docs/user-guide-v1.2/05-NOTECARDS-BASICS.TEDIT with (TEDIT '05-NOTECARDS-BASICS.TEDIT)opens a blank TEdit window and a break window with the error:

In ERROR:
FONT NOT FOUND (coerced to)
(###### 12 (BOLD REGULAR REGULAR) 0 DISPLAY)

where # shows up as a black box in the break window. The context of the error:

6_: BT
ERROR
FONTCREATE
OPENTEXTSTREAM
TEDIT
TEDIT
FAULTEVAL
EVAL
EXEC

7_: BTV
   MESS1 "FONT NOT FOUND (coerced to)"
   MESS2 (\FF\F0MODERN\FF\00 12 (BOLD REGULAR REGULAR) 0 DISPLAY)
   NOBREAK NIL
ERROR
FONTCREATE
   FILE 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>05-NOTECARDS-BASICS.TEDIT;1/130,12200>
   TEXTOBJ {TEXTOBJ}#144,172000
   LOOKS {CL100/30432:Nil12BR}
   FILEPOS 167980
   LOOKSLEN 20
   FONT NIL
   NAME \FF\F0MODERN\FF\00
   SIZE 12
   SUPER 0
   PROPS 512
   STYLESTR NIL
\TEDIT.GET.SINGLE.CHARLOOKS
   TEXT 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>05-NOTECARDS-BASICS.TEDIT;1/130,12200>
   TEXTOBJ {TEXTOBJ}#144,172000
   PCCOUNT 559
   CURFILEBYTE# 153820
   END 168358
   PCNO 529
   ORIGBYTE# 0
   DEFAULTCHARLOOKS {CL101/13312:Gacha10}
   OLDPARALOOKS 10
   PC {PIECE}#122,7334
   BYTELEN 2
   PREVPC {PIECE}#122,7362
   FIRSTPC {PIECE}#144,127614
   PARALOOKSMAP {ARRAYP}#172,37256
   CHARLOOKSMAP {ARRAYP}#172,37264
\TEDIT.GET.PIECES3
   TEXT 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>05-NOTECARDS-BASICS.TEDIT;1/130,12200>
   TSTREAM #<IO Text Stream/174,76000>
   START 0
   END 168358
   PROPS (BEING-EDITED T)
   TEXTOBJ {TEXTOBJ}#144,172000
   TRAILER (158588 17 3 559 1756286001)
   PCCOUNT 559
   IDATE NIL
   PC NIL
\TEDIT.GET.FORMATTED.FILE
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   TEXTOBJ {TEXTOBJ}#144,172000
   PWINDOW {WINDOW}#122,71664
   READONLY NIL
SI::*UNWIND-PROTECT*
   TEXT 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>05-NOTECARDS-BASICS.TEDIT;1/130,12200>
   TSTREAM #<IO Text Stream/174,76000>
   START 0
   END 168358
   PROPS (BEING-EDITED T)
   LISPXHIST ((&) (4 "" . "_ ") "<not yet evaluated>" 
NIL)
   SI::*RESETFORMS* NIL
   RESETSTATE NIL
\TEDIT.OPENTEXTSTREAM.PIECES
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   TSTREAM #<IO Text Stream/174,76000>
   TEXTOBJ {TEXTOBJ}#144,172000
   TEDIT.GET.FINISHEDFORMS NIL
   PRIMARYW NIL
SI::*UNWIND-PROTECT*
   TEXT 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>05-NOTECARDS-BASICS.TEDIT;1/130,12200>
   WINDOW {WINDOW}#122,77000
   START NIL
   END NIL
   PROPS (BEING-EDITED T)
   LISPXHIST ((&) (4 "" . "_ ") "<not yet evaluated>" 
NIL)
   SI::*RESETFORMS* NIL
   RESETSTATE NIL
OPENTEXTSTREAM
   TEXT 05-NOTECARDS-BASICS.TEDIT
   WINDOW NIL
   DONTSPAWN NIL
   PROPS (BEING-EDITED T)
   TSTREAM NIL
   PROC NIL
TEDIT
   TEXT 05-NOTECARDS-BASICS.TEDIT
   WINDOW NIL
   DONTSPAWN NIL
   PROPS NIL
TEDIT
   *FORM* (TEDIT (QUOTE 05-NOTECARDS-BASICS.TEDIT))
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* TEDIT
\EVALFORM
FAULTEVAL
   *FORM* (UNDOABLY (TEDIT &))
\EVALFORM
   \INTERNAL NIL
EVAL
EVAL-INPUT
   RETRYFLAG NIL
   HELPCLOCK 1415
DO-EVENT
   SI::*DUMMY-FOR-CATCH* T
   SI::*CATCH-RETURN-FROM* (&)
   LISPXHIST ((&) (4 "" . "_ ") "<not yet evaluated>" 
NIL)
   HELPCLOCK 0
XCL::EXECA0001A0002
   *CURRENT-EVENT* ((&) (4 "" . "_ ") 
"<not yet evaluated>" NIL)
   SI::NLSETQ-VALUE NIL
   *PROCEED-CASES* (&)
   SI::*NLSETQFLAG* NIL
XCL::EXECA0001
\PROGV
   XCL::TOP-LEVEL-P T
   XCL::WINDOW {WINDOW}#161,150664
   XCL::TITLE-SUPPLIED NIL
   XCL::TITLE NIL
   *THIS-EXEC-COMMANDS* (#<Hash-Table @ 166,31666>)
   XCL::ENVIRONMENT NIL
   XCL::PROMPT NIL
   XCL::FN EVAL-INPUT
   XCL::PROFILE "XCL"
   *EXEC-ID* ""
   XCL::PROFILE-CACHE (XCL::*PROFILE-NAME* "IL" 
XCL:*EVAL-FUNCTION* EVAL *PACKAGE* #<Package INTERLISP> 
*READTABLE* #<ReadTable INTERLISP/174,75714> 
XCL:*EXEC-PROMPT* "_ " --)
EXEC
\PROC.REPEATEDLYEVALQT
   *FORM* (\PROC.REPEATEDLYEVALQT)
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* \PROC.REPEATEDLYEVALQT
\EVALFORM
   %#FORM# (\PROC.REPEATEDLYEVALQT)
   *CURRENT-PROCESS* #<Process EXEC/174,26204>
   HELPFLAG BREAK!
   \CURRENTDISPLAYLINE 0
   \#DISPLAYLINES 25
   \LINEBUF.OFD #<IO Linebuffer Stream/144,125400>
   *READTABLE* #<ReadTable INTERLISP/174,75714>
   \PRIMTERMTABLE {TERMTABLEP}#174,70740
   \PRIMTERMSA {CHARTABLE}#174,71000
   TtyDisplayStream #<Output Display Stream/130,31100>
   SI::*RESETFORMS* NIL
   \INTERRUPTABLE T
   \TTYWINDOW NIL
   READBUF NIL
   \TERM.OFD #<Output Display Stream/170,117500>
   *STANDARD-OUTPUT* #<Output Display Stream/170,117500>
   *STANDARD-INPUT* #<IO Linebuffer Stream/144,125400>
\MAKE.PROCESS0
T

The context of the FONTCREATE frame:

8_: ?=
  FAMILY = \FF\F0MODERN\FF\00
  SIZE = 12
  FACE = BOLD
  ROTATION = 0
  DEVICE = NIL
  NOERRORFLG = NIL
  CHARSET = NIL

@nbriggs
Copy link
Contributor

nbriggs commented Sep 23, 2024

That looks like an xccs encoding issue- it thinks the font name is not in charset 0. This is one for @rmkaplan

@rmkaplan
Copy link
Contributor

rmkaplan commented Sep 23, 2024 via email

@masinter
Copy link
Member

if you load the image object GETFN manually, does it still fail in the Venue sysout?

@rmkaplan
Copy link
Contributor

rmkaplan commented Sep 23, 2024 via email

@pamoroso
Copy link
Contributor Author

Opening {MEDLEY}/notecards/docs/user-guide-v1.2/11-SYSTEM-CARDS.TEDIT with (TEDIT '11-SYSTEM-CARDS.TEDIT)opens a blank TEdit window and a break window with the error:

In ERROR:
EXPECTED PLANE 0 XCCS CHARACTER IS ILL-FORMED

The context of the error:

6_: BT
ERROR
OPENTEXTSTREAM
TEDIT
TEDIT
FAULTEVAL
EVAL
EXEC

7_: BTV
   MESS1 "EXPECTED PLANE 0 XCCS CHARACTER IS ILL-FORMED"
   MESS2 NIL
   NOBREAK NIL
ERROR
   STRM 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>11-SYSTEM-CARDS.TEDIT;1/130,12200>
   START 0
   END 98304
   DEFAULTCHARLOOKS {CL101/13312:Gacha10}
   DEFAULTPARALOOKS {FMT101/62694:LE-0-0}
   NEXTFILEPOS 1060
   CHARSET 255
   FIRSTPC {PIECE}#144,127614
   CODESIZE 1
   SBINABLE T
   EOLC 0
   PC {PIECE}#122,66362
   BYTE 255
   CHAR NIL
   PREVPC {PIECE}#122,66362
   PTYPE 0
   RUNLEN 15
   FILEPOS 1045
   CRBEFORE T
   SHIFTNEXT T
\TEDIT.GET.UNFORMATTED.FILE.XCCS
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   TEXTOBJ {TEXTOBJ}#144,172000
   FORMAT :XCCS
   DEFAULTCHARLOOKS {CL101/13312:Gacha10}
   DEFAULTPARALOOKS {FMT101/62694:LE-0-0}
   PIECES NIL
SI::*UNWIND-PROTECT*
   STREAM 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>11-SYSTEM-CARDS.TEDIT;1/130,12200>
   TSTREAM #<IO Text Stream/174,76000>
   START 0
   END 98304
   PROPS NIL
   LISPXHIST ((&) (4 "" . "_ ") "<not yet evaluated>" 
NIL)
   SI::*RESETFORMS* ((& NIL))
   RESETSTATE NIL
\TEDIT.GET.UNFORMATTED.FILE
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   TEXTOBJ {TEXTOBJ}#144,172000
   PWINDOW {WINDOW}#122,71664
   READONLY NIL
SI::*UNWIND-PROTECT*
   TEXT 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>11-SYSTEM-CARDS.TEDIT;1/130,12200>
   TSTREAM #<IO Text Stream/174,76000>
   START 0
   END 98304
   PROPS (BEING-EDITED T)
   LISPXHIST ((&) (4 "" . "_ ") "<not yet evaluated>" 
NIL)
   SI::*RESETFORMS* NIL
   RESETSTATE NIL
\TEDIT.OPENTEXTSTREAM.PIECES
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   TSTREAM #<IO Text Stream/174,76000>
   TEXTOBJ {TEXTOBJ}#144,172000
   TEDIT.GET.FINISHEDFORMS NIL
   PRIMARYW NIL
SI::*UNWIND-PROTECT*
   TEXT 
#<Input Stream on {DSK}<home>paolo>il>ncdocs>11-SYSTEM-CARDS.TEDIT;1/130,12200>
   WINDOW {WINDOW}#122,77000
   START NIL
   END NIL
   PROPS (BEING-EDITED T)
   LISPXHIST ((&) (4 "" . "_ ") "<not yet evaluated>" 
NIL)
   SI::*RESETFORMS* NIL
   RESETSTATE NIL
OPENTEXTSTREAM
   TEXT 11-SYSTEM-CARDS.TEDIT
   WINDOW NIL
   DONTSPAWN NIL
   PROPS (BEING-EDITED T)
   TSTREAM NIL
   PROC NIL
TEDIT
   TEXT 11-SYSTEM-CARDS.TEDIT
   WINDOW NIL
   DONTSPAWN NIL
   PROPS NIL
TEDIT
   *FORM* (TEDIT (QUOTE 11-SYSTEM-CARDS.TEDIT))
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* TEDIT
\EVALFORM
FAULTEVAL
   *FORM* (UNDOABLY (TEDIT &))
\EVALFORM
   \INTERNAL NIL
EVAL
EVAL-INPUT
   RETRYFLAG NIL
   HELPCLOCK 674
DO-EVENT
   SI::*DUMMY-FOR-CATCH* T
   SI::*CATCH-RETURN-FROM* (&)
   LISPXHIST ((&) (4 "" . "_ ") "<not yet evaluated>" 
NIL)
   HELPCLOCK 0
XCL::EXECA0001A0002
   *CURRENT-EVENT* ((&) (4 "" . "_ ") 
"<not yet evaluated>" NIL)
   SI::NLSETQ-VALUE NIL
   *PROCEED-CASES* (&)
   SI::*NLSETQFLAG* NIL
XCL::EXECA0001
\PROGV
   XCL::TOP-LEVEL-P T
   XCL::WINDOW {WINDOW}#161,150664
   XCL::TITLE-SUPPLIED NIL
   XCL::TITLE NIL
   *THIS-EXEC-COMMANDS* (#<Hash-Table @ 166,31666>)
   XCL::ENVIRONMENT NIL
   XCL::PROMPT NIL
   XCL::FN EVAL-INPUT
   XCL::PROFILE "XCL"
   *EXEC-ID* ""
   XCL::PROFILE-CACHE (XCL::*PROFILE-NAME* "IL" 
XCL:*EVAL-FUNCTION* EVAL *PACKAGE* #<Package INTERLISP> 
*READTABLE* #<ReadTable INTERLISP/174,75714> 
XCL:*EXEC-PROMPT* "_ " --)
EXEC
\PROC.REPEATEDLYEVALQT
   *FORM* (\PROC.REPEATEDLYEVALQT)
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* \PROC.REPEATEDLYEVALQT
\EVALFORM
   %#FORM# (\PROC.REPEATEDLYEVALQT)
   *CURRENT-PROCESS* #<Process EXEC/174,26204>
   HELPFLAG BREAK!
   \CURRENTDISPLAYLINE 0
   \#DISPLAYLINES 25
   \LINEBUF.OFD #<IO Linebuffer Stream/144,125400>
   *READTABLE* #<ReadTable INTERLISP/174,75714>
   \PRIMTERMTABLE {TERMTABLEP}#174,70740
   \PRIMTERMSA {CHARTABLE}#174,71000
   TtyDisplayStream #<Output Display Stream/130,12700>
   SI::*RESETFORMS* NIL
   \INTERRUPTABLE T
   \TTYWINDOW NIL
   READBUF NIL
   \TERM.OFD #<Output Display Stream/170,117500>
   *STANDARD-OUTPUT* #<Output Display Stream/170,117500>
   *STANDARD-INPUT* #<IO Linebuffer Stream/144,125400>
\MAKE.PROCESS0
T

@rmkaplan
Copy link
Contributor

rmkaplan commented Sep 24, 2024 via email

@pamoroso
Copy link
Contributor Author

Opening {MEDLEY}/notecards/docs/user-guide-v1.2/APP-Z-PROG-INTERFACE.TEDIT with (TEDIT 'APP-Z-PROG-INTERFACE.TEDIT), the last file with issues in the user-guide-v1.2 directory, displays the document in TEdit. However, the document contains GETFN: HRULE.GETFN errors in a dozen IMAGEOBJs. Using the Hardcopy > To a file option of the TEdit window's right-click menu produces a PostScript file with the errors rendered the same way.

@rmkaplan
Copy link
Contributor

Note that these all fail in the Venuesysout, but not always in the same way.

@rmkaplan
Copy link
Contributor

Based on our discussion and experiments today, I looked at some of the HCFILES failures in notecards/library/. For ones that wouldn't open in the display, I swapped the CR and LF bytes, and if I then got a font-not-found for size 13, I advised fontcreate in Tedit to substitute 10 for 13 when it read the font.

This helped with some of the files (progress), but others still failed, but now in different ways. I also noticed when I scrolled to the bottom of some of the recovered files that there was sometimes a little garbling there. In some cases the last few characters didn't show on the display, in other cases there were a few black boxes at the end. It appears that here are some 0 bytes that are being included in the last piece (maybe 3?).

Also playing around, one of the other HCFILES failures (I now forget which) was failing not in Tedit, but in the RENAMEFILE that was copying the temporary pdf file back to its place in the Medley file system. This was way down in COPYCHARS, where it was trying to read a character with the ANY eol convention (which we have talked about separately). But I'm not sure why RENAMEFILE in this context (or any context) doesn't use COPYBYTES. Is that because it is copying from {UNIX} to {DSK} ?

@rmkaplan
Copy link
Contributor

I opened a separate issue on the renaming problem #1900

@rmkaplan
Copy link
Contributor

Apart from the fact that a rename shouldn't be necessary, I think I see why the COPYCHARS hit the low-level error. It appears to think that both the newly-created tmp pdf file and the destination in {DSK} are XCCS files, so it is trying to read characters as XCCS encoded. But there appear to be 255's strewn around the pdf in unholy ways, the XCCS INCCODE function doesn't quite know what to do, and it loses track of the byte count. The Unix PS-to-PDF utilities traffic only in utf8/unicode files, but RENAMEFILE doesn't know that--the external format can be specified at OPEN, but currently not through the generic RENAMEFILE function.

RENAMEFILE could be extended to take some optional parameters, like OPEN. But a more immediate fix may be to figure out why GETFILEINFO is saying that PDF files are TEXT.

@rmkaplan
Copy link
Contributor

It seems that the TYPE of both PS and PDF files is coming from the entry on DEFAULTFILETYPELIST, which says that they are text. Should those be changed to BINARY? That would turn off the attempted character conversions between file devices.

@nbriggs
Copy link
Contributor

nbriggs commented Dec 10, 2024

I think they should both be BINARY. PDF is for sure, PS may be text, but you can't guarantee that there isn't, say, a binary blob somewhere in there.

@nbriggs
Copy link
Contributor

nbriggs commented Dec 10, 2024

If the FDEVs for the source and destination of the rename operation are different then it is implemented via \GENERIC.RENAMEFILE. If they are on the same FDEV, then it tries the FDEV's rename method, and for either DSK or UNIX FDEVs, if it gets back a Unix ERRNO of 18 (EXDEV; cross-device link) it retries with \GENERIC.RENAMEFILE -- which presumably is what's doing the COPYCHARS/COPYBYTES you're seeing fail.

@rmkaplan
Copy link
Contributor

I think they should both be BINARY. PDF is for sure, PS may be text, but you can't guarantee that there isn't, say, a binary blob somewhere in there.

I'll change everything to BINARY. But it shouldn't be necessary even to specify this, since BINARY is the default if you don't say TEXT (#1902 )

@MattHeffron
Copy link
Contributor

I think they should both be BINARY. PDF is for sure, PS may be text, but you can't guarantee that there isn't, say, a binary blob somewhere in there.

The PS files generated by POSTSCRIPTSTREAM are TEXT. There are no binary objects in PostScript. (At least at the PostScript level when I first wrote POSTSCRIPTSTREAM almost 4 decades ago!)
That being said, I can't think of any reason the marking them as BINARY should cause any problems.

@rmkaplan
Copy link
Contributor

rmkaplan commented Dec 11, 2024 via email

@MattHeffron
Copy link
Contributor

MattHeffron commented Dec 11, 2024 via email

@rmkaplan
Copy link
Contributor

rmkaplan commented Dec 12, 2024 via email

@rmkaplan
Copy link
Contributor

Swapping CR and LF helps in correcting a few of the files so far in {NOTECARDS}/library (I'll do a Notecards PR). After swapping. converting unknown fonts of size 13 to size 10 makes a difference.

But there are 2 "known" fonts of size 13, Timesroman 13 MRR and Helvetica 13 MRR. Does anybody remember: are they for real, or should they be reduced to size 10 too?

@nbriggs
Copy link
Contributor

nbriggs commented Dec 12, 2024

Regarding the PS language character set --

There are three encodings for the PostScript language: ASCII, binary token, and binary object sequence. The ASCII encoding is preferred for expository purposes (such as this book), for archiving documents, and for transmission via communi- cations facilities, because it is easy to read and does not rely on any special charac- ters that might be reserved for communications use. The two binary encodings are usable in controlled environments to improve the efficiency of representation or execution; they are intended exclusively for machine generation. Detailed in- formation on the binary encodings is provided in Section 3.14, “Binary Encoding Details.”

@nbriggs
Copy link
Contributor

nbriggs commented Dec 12, 2024

I believe the two size 13 fonts are real -- they're not the same as size 10 renamed, for sure -- but I can't tell easily because character looks in the current TEdit, applied through the Char Looks menu, aren't working at all for me.

@rmkaplan
Copy link
Contributor

rmkaplan commented Dec 12, 2024 via email

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

No branches or pull requests

5 participants