boxer-project / boxer-sunrise

Sunrise on the Boxer Reconstruction Project
BSD 3-Clause "New" or "Revised" License
43 stars 2 forks source link

Calling `error` results in a Common Lisp REPL (can the REPL be used to get Boxer back into a usable state?) #86

Open rigdern opened 3 months ago

rigdern commented 3 months ago

With this issue, I'm actually more interested in this as an example of a case where Boxer brings up a Common Lisp REPL. In such a case, is it possible to get Boxer back into a usable state without quitting it and reopening it? If so, how?

The Common Lisp REPL is triggered when calling the error primitive procedure. I haven't found any documentation on it so I'm not sure what it's for or how to use it. Consequently, I suspect fixing error isn't a high priority. I discovered error via name-help.

Repro steps

I reproed this with Boxer 3.4.18 2024-05-26

  1. Create a data box.
  2. Make the data box fullscreen
  3. In the data box, type error [abc] (where [abc] means a data box containing abc)
  4. Eval this line.

Unexpected result: A Common Lisp REPL opens in Terminal.app. It shows this prompt:

Stack overflow (stack size 15998).
  1 (continue) Extend stack by 50%.
  2 Supply a new symbol name.
  3 --> Return to Boxer <--
  4 --> GOTO Top Level then return to Boxer <--
  5 (abort) Aborted

Type :b for backtrace or :c <option number> to proceed.
Type :bug-form "<subject>" for a bug report template or :? for other options.

I tried :c 4 ("GOTO Top Level then return to Boxer") but it seemed to me that, after that, Boxer didn't respond to anything I tried to do (e.g. typing characters) and instead the Common Lisp REPL was waiting for me to choose another option.

I ended up having to quit and reopen Boxer.

Alternatively, you can repro this with error repro.box.zip. Here's a screenshot of how it looks: image

sgithens commented 1 month ago

Sorry for the late response to this @rigdern . When we run into the common lisp repl popped open in an external terminal like this, you can try to stop the current operation from the error and return Boxer using: :c 4 followed by return, or whichever number is --> GOTO Top Level then return to Boxer <--.

Depending on the error you may be able to just carry on in Boxer.