Closed CatspersCoffee closed 1 year ago
[output.katex]
in your book.toml
as per #68.I have never seen this error using mdBook-KaTeX. It looks like an infinite recursion, but we don't use deep recursion any more.
Removing [output.katex]
unfortunately does not change the error:
$ mdbook serve
2023-05-30 11:27:32 [INFO] (mdbook::book): Book building has started
thread '<unknown>' has overflowed its stack
fatal runtime error: stack overflow
2023-05-30 11:27:32 [ERROR] (mdbook::utils): Error: The "katex" preprocessor exited unsuccessfully with signal: 6 (SIGABRT) (core dumped) status
$ mdbook-katex --version
mdbook-katex 0.5.2
So, you are using the latest version. Did the previous version work for you?
This error message does not point to any specific places in the code, unfortunately. So, it would be much easier to debug if you could provide the book that result in this error. Maybe I could try and reproduce it.
https://github.com/lzanini/mdbook-katex/blob/619e0882222fd96d6e6e1873d4449113d7fb45d5/src/scan.rs#L76 It seems that we do have recursion. I will create a hot fix.
I assume some of your chapters are very long, right?
Thank you, @CatspersCoffee, for reporting this stack overflow issue 🌮.
Please verify that v0.5.3 fixes this issue once it comes out: https://github.com/lzanini/mdbook-katex/actions/runs/5117413832
Can report that v0.5.3 fixes the issue.
Replaced package `mdbook-katex v0.5.2` with `mdbook-katex v0.5.3` (executable `mdbook-katex`)
Thankyou @SichangHe for the speedy reply and hotfix :-)
You are welcome, @CatspersCoffee. Your early report will save other users from experiencing my unfortunate mistake. And, you help me remember not to use tail recursion in Rust 😅.
mdbook failing to build, or serve
versions:
my
book.toml
: