My favorites | Sign in
Project Home Downloads
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 297: Stack space overflow when processing reStructuredText file
3 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----

Sign in to add a comment
Reported by, Apr 19, 2011
What steps will reproduce the problem?

1. curl | pandoc +RTS -K16m -RTS -f rst -

What is the expected output? What do you see instead?

Instead of a conversion, I get:
  Stack space overflow: current size 8388608 bytes.
  Use `+RTS -Ksize -RTS' to increase it.

Increasing the stack size does not help.

What version of the product are you using? On what operating system?
Latest installed from cabal:
  $ pandoc --version
  Compiled with citeproc support.
  Copyright (C) 2006-2011 John MacFarlane

  $ uname -a
  Linux traven 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 19:00:26 UTC 2011 i686 GNU/Linux
Apr 19, 2011
Oops, cut & paste errors. Stack overflow error message is from not increasing stack size. But it fails anyhow when I increase stack size to 16M.
Apr 20, 2011
Project Member #2
I've localized the problem to the footnote references inside footnotes.  Here's a minimal test case that causes the problem:



.. [*] Footnotes may also use symbols, specified with a "*" label.
   Here's a reference to the next footnote: [*]_.

.. [*] This footnote shows the next symbol in the sequence.

Status: Accepted
Apr 20, 2011
Project Member #3
Note:  You can get a similar infinite loop in markdown using



[^1]: my note.[^1]

A quick fix (though it would not implement the whole reST spec for footnotes) would be to forbid footnote refs inside footnotes.

Apr 20, 2011
Project Member #4
Partially resolved in b42c48e91918388e6b8eaaba36f4521441128a00
which disallows note references inside notes.

Apr 20, 2011
Thanks for looking into this!
Mar 13, 2012
I just encountered the same error running pandoc against a sequence of 15 moderately large html docs tmp/?.noimg.html (each ~200 K) with the following options

~/.cabal/bin/pandoc -S tmp/?.noimg.html -o $mediatargetpath$sku".epub" --toc --epub-cover-im
age="images/"$sku."png" --epub-metadata="tmp/"$sku".dc-metadata" --include-after-body=includ
es/ --include-after-body=includes/wikilicense.html

Mar 13, 2012
Project Member #7
Note:  This bug tracker is no longer active.  Use the github tracker instead.
The corresponding issue there is
Sign in to add a comment

Powered by Google Project Hosting