RedCloth stack overflow
Brian C Young
splaestro at gmail.com
Tue May 22 16:22:04 EDT 2007
Hi all--
Has anyone encountered a stack overflow like the below when trying to
post a new entry? My entry gets YAML-ized OK, but then when Hobix tries
to apply the quick template to generate the HTML, it blows up.
This seems to start to happen when an entry approaches about 5K in size,
and has a fair amount of formatting--the one that is plaguing me at this
point is a long bulleted list of items. The only dependable workaround
I've found at this point is to make the entry shorter, or maybe remove
some formatting (I generally don't bother with this approach).
The root cause error is actually in RedCloth, as per the first part of
the stack trace. The regexp that is overflowing appears to be
BLOCKS_GROUP_RE (it shows up farther down the stack). I am using
RedCloth v3.04, with Hobix v0.3b and Ruby 1.8.2. I know these are not
the most recent version of either Hobix or Ruby, but Hobix v0.4 and
later won't run on Windows due to the addition of the Lockfile library.
This was the most stable setup to which I could revert.
Any thoughts, better workarounds, bug fixes for RedCloth?
Thanks. Brian
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/redcloth.rb:571:in `gsub!'
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/redcloth.rb:571:in `blocks'
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/redcloth.rb:276:in `to_html'
(erb):52:in `load'
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/out/quick.rb:59:in `load'
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:506:in `retouch'
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:476:in `each'
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:476:in `retouch'
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:474:in `each'
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:474:in `retouch'
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:470:in `regenerate'
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/commandline.rb:224:in
`post_action'
c:/ruby-1.8.2/bin/hobix:64:in `call'
c:/ruby-1.8.2/bin/hobix:64
c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/out/quick.rb:92:in `load':
Error `Sta
ck overflow in regexp matcher: /((?:^([#*>
])(?:[^\n]|\n+(?:\2|>)|\n(?!\n|\Z))+)
)|((?:[^\n]+|\n+ +|\n(?![#*\n]|\Z))+)/m' in erb
C:/Bri/ESR/ATST250EA/skel/entry.html.quick.
(Hobix::Out::QuickError)
from c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:506:in `retouch'
from c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:476:in `each'
from c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:476:in `retouch'
from c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:474:in `each'
from c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:474:in `retouch'
from c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/weblog.rb:470:in
`regenerate'
from c:/ruby-1.8.2/lib/ruby/site_ruby/1.8/hobix/commandline.rb:224:in
`post_action'
from c:/ruby-1.8.2/bin/hobix:64:in `call'
from c:/ruby-1.8.2/bin/hobix:64
--
------------------------------------------------------------------------
Brian C. Young
“Ignorance doesn't make stuff not exist.” --Bucky Katt
More information about the Hobix-is-the-way
mailing list