Bug 21641 - Infinit loop within too small areas using hyphenation
Summary: Infinit loop within too small areas using hyphenation
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.20.5
Hardware: PC other
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-16 09:39 UTC by Alexander Mehling
Modified: 2012-04-01 06:43 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Mehling 2003-07-16 09:39:46 UTC
Using hyphenate="true" rendering text within a too small area (e.g. a small 
table column) results in an inifite loop. The loop appeares in FOText.java 
line 280 ("while ( start != -1)") which never ends, because 
LineAread.addText(...) never returns -1. I think The bug should be fixed in 
LineAread.addText(...). Example document:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<fo:layout-master-set>
		<fo:simple-page-master margin="2cm" master-name="simple" 
page-height="29.7cm" page-width="21cm">
			<fo:region-body/>
			<fo:region-before extent="3cm"/>
			<fo:region-after extent="1.5cm"/>
		</fo:simple-page-master>
	</fo:layout-master-set>
	<fo:page-sequence master-reference="simple" hyphenate="true" 
language="en">
		<fo:flow flow-name="xsl-region-body">
			<fo:table table-layout="fixed">
			<fo:table-column column-width="4mm"/>
				<fo:table-body>
					<fo:table-row>
						<fo:table-cell 
border-color="black" border-style="solid" border-width="thin">
							<fo:block 
font-size="8pt" font-family="Times" margin="1mm">verylongword</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</fo:flow>
	</fo:page-sequence>
</fo:root>
Comment 1 J.Pietschmann 2003-07-16 17:40:43 UTC
Well, doing unpleasant things on invalid input isn't really a critical bug.
Comment 2 Simon Pepping 2003-12-21 19:01:45 UTC
OK in the development version.
Comment 3 Pascal Sancho 2007-11-20 00:24:57 UTC
Fixed in FOP 0.94 and probably earlier versions
Comment 4 Glenn Adams 2012-04-01 06:43:06 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed