#32 new

endless-loop in module Prawn::Format format_wrapped_text

Reported by andreas | December 3rd, 2009 @ 07:43 AM


In certain conditions, while writing HTML formatted text to a bounding_box - we experience infinite loops(processes memory grows infinitely high, CPU usage 100%).
To be more specific: this happens as we try to create a huge text in a absolutely positioned, stretchy bounding box. The text exceeds the bounding box limits and thus will be split across several pages - but this works ok.

When we try to write the next small line of formatted text in the same bounding box the endless loop begins.

After a little bit of debugging I found out that the endless loop occurs in the file prawn-format-0.2.3/lib/prawn/format.rb - function format_wrapped_text - aprox. lines 188-204. an infinite amount of new pages are created, but for some reason or another bounds.absolute_top will return a never changing NEGATIVE value.

Keep up the great work,

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket