Interlisp / medley

The main repo for the Medley Interlisp project. Wiki, Issues are here. Other repositories include maiko (the VM implementation) and Interlisp.github.io (web site sources)
https://Interlisp.org
MIT License
376 stars 19 forks source link

TEDIT.HARDCOPY will hang forever if called from XCL EXEC but not so from INTERLISP EXEC #1781

Closed fghalasz closed 4 months ago

fghalasz commented 4 months ago

Weird bug!

This happens on certain (all) files with IM Image Objects (I think that's the trigger). My main test file has been internal>Peano.tedit. Another is lispusers/spy.tedit.

This happens on current Master as well as on RMK30--Another-Tedit-release

This happens whether outputing IP or PDF (and whether PDFSTREAM is loaded or not).

This happens whether you start Medley with or without greet.

From an XCL exec: (IL:TEDIT.HARDCOPY (IL:OPENTEXTSTREAM 'internal/peano.tedit) 'Foo.IP T) will hang forever (repeatedly calling \TEDIT.FORMATBOX, not recursively).

From an INTERLISP exec: (TEDIT.HARDCOPY (OPENTEXTSTREAM 'internal/peano.tedit) 'Foo.IP T) will finish quickly as expected.

FWIW: This bug is holding up the final implementation of HCFILES automation.

rmkaplan commented 4 months ago

The bug seems to be that the pageframes were being read from the file with the current readtable instead of the readtable that they were written with. So the atoms were showing up in XCL-USER instead of IL. I don’t quite understand why that would cause this particular behavior, but fixing that seems to make the problem go away. I’ll put up a PR.

Debugging Interlisp code under an XCL exec is cumbersome. If you open an Interlisp function with SEDIT under an Interlisp exec, then look at it in a break under XCL, all of the symbols are reprinted with IL: in front, but Sedit’s alignment doesn’t know that.

The command VALUE seems to exist in XCL, but the variable IT (set by VALUE and by INSPECT so you can get your hands on a the datum or selection) has to be qualified with IL:.

On Jul 10, 2024, at 4:23 PM, Frank Halasz @.***> wrote:

Weird bug!

This happens on certain (all) files with IM Image Objects (I think that's the trigger). My main test file has been internal>Peano.tedit. Another is lispusers/spy.tedit.

This happens on current Master as well as on RMK30--Another-Tedit-release

This happens whether outputing IP or PDF (and whether PDFSTREAM is loaded or not).

This happens whether you start Medley with or without greet.

From an XCL exec: (IL:TEDIT.HARDCOPY (IL:OPENTEXTSTREAM 'internal/peano.tedit) 'Foo.IP T) will hang forever (repeatedly calling \TEDIT.FORMATBOX, not recursively).

From an INTERLISP exec: (TEDIT.HARDCOPY (OPENTEXTSTREAM 'internal/peano.tedit) 'Foo.IP T) will finish quickly as expected.

FWIW: This bug is holding up the final implementation of HCFILES automation.

— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/1781, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJJNG63FZQJOQQ2RTCLZLW65XAVCNFSM6AAAAABKV3KXZ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYDCOJQGIZTIMI. You are receiving this because you were assigned.