mdbook-bib icon indicating copy to clipboard operation
mdbook-bib copied to clipboard

encountered fatal runtime error: stack overflow when trying to build mdbook

Open man-chi opened this issue 2 years ago • 3 comments

after installation of mdbook-bib, I have encountered fatal runtime error: stack overflow when trying to build mdbook.

bib file is an example as show below @BOOK{DUMMY:1, AUTHOR = "John Doe", TITLE = "The Book without Title", PUBLISHER = "Dummy Publisher", YEAR = "2100", }

in the markdown.md file, I just include the @@DUMMY:1 string but a fatal error is shown, please kindly help.

➜ docs git:(main) ✗ cargo install mdbook-bib

Updating crates.io index
 Ignored package `mdbook-bib v0.0.4` is already installed, use --force to override

➜ docs git:(main) ✗ mdbook build
2022-07-21 19:19:16 [INFO] (mdbook::book): Book building has started Warning: The bib plugin was built against version 0.4.20 of mdbook, but we're being called from version 0.4.18 2022-07-21 19:19:16 [INFO] (mdbook_bib): Processor Name: bib 2022-07-21 19:19:16 [INFO] (mdbook_bib::config): Using default HB template... 2022-07-21 19:19:16 [INFO] (mdbook_bib::config): Using default CSS template... 2022-07-21 19:19:16 [INFO] (mdbook_bib::config): Using default JS template... 2022-07-21 19:19:16 [INFO] (mdbook_bib): Bibliography file: biblio.bib 2022-07-21 19:19:16 [INFO] (mdbook_bib): Bibliography path: /Users/mac/Repo/waxctech.github.io/docs/src/biblio.bib 2022-07-21 19:19:16 [INFO] (mdbook_bib): Loading bibliography from "/Users/mac/Repo/waxctech.github.io/docs/src/biblio.bib"... 2022-07-21 19:19:16 [INFO] (mdbook_bib): Building bibliography...

thread 'main' has overflowed its stack fatal runtime error: stack overflow 2022-07-21 19:19:16 [ERROR] (mdbook::utils): Error: The "bib" preprocessor exited unsuccessfully with signal: 6 status ➜ docs git:(main) ✗

man-chi avatar Jul 21 '22 11:07 man-chi

I am having the same issue. Did you find a solution?

abel0b avatar Nov 23 '22 11:11 abel0b

The error comes from nom-bibtex. You can fix the problem by enclosing field values in {...}:


@book{DUMMY:1,
    AUTHOR = {"John Doe"},
    TITLE = {"The Book without Title"},
    PUBLISHER = {"Dummy Publisher"},
    YEAR = {"2100"},
}

~~According to the BibTex docs, quotes should also work. So this may be worth crating an issue in nom-bibtex.~~

Seems like the error is caused by mdbook-bib removing quotes, so braces are required here.

mlange-42 avatar Jan 17 '23 18:01 mlange-42

@man-chi Did the parentheses solve your problem with the references?