You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2011/09/22 21:46:25 UTC
DO NOT REPLY [Bug 51874] New: IndexOutOfBoundsException in
PrimaryGridUnit
https://issues.apache.org/bugzilla/show_bug.cgi?id=51874
Bug #: 51874
Summary: IndexOutOfBoundsException in PrimaryGridUnit
Product: Fop
Version: 1.1dev
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: page-master/layout
AssignedTo: fop-dev@xmlgraphics.apache.org
ReportedBy: vlsergey@gmail.com
Classification: Unclassified
Created attachment 27568
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27568
Problematic file. Not intended to be distributed under ASL.
There is IndexOutOfBoundsException in PrimaryGridUnit.
Sorry, i can' provide file to include in test case, but "short" problematic
file (with single table) in attach.
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at
org.apache.fop.fo.flow.table.PrimaryGridUnit.getAfterBorderWidth(PrimaryGridUnit.java:220)
at
org.apache.fop.layoutmgr.table.TableCellLayoutManager.addAreas(TableCellLayoutManager.java:289)
at
org.apache.fop.layoutmgr.table.RowPainter.addAreasForCell(RowPainter.java:429)
at
org.apache.fop.layoutmgr.table.RowPainter.addAreasAndFlushRow(RowPainter.java:307)
at
org.apache.fop.layoutmgr.table.RowPainter.handleTableContentPosition(RowPainter.java:160)
at
org.apache.fop.layoutmgr.table.TableContentLayoutManager.addTablePartAreas(TableContentLayoutManager.java:494)
at
org.apache.fop.layoutmgr.table.TableContentLayoutManager.addBodyAreas(TableContentLayoutManager.java:481)
at
org.apache.fop.layoutmgr.table.TableContentLayoutManager.addAreas(TableContentLayoutManager.java:417)
at
org.apache.fop.layoutmgr.table.TableLayoutManager.addAreas(TableLayoutManager.java:363)
at
org.apache.fop.layoutmgr.AreaAdditionUtil.addAreas(AreaAdditionUtil.java:113)
at
org.apache.fop.layoutmgr.FlowLayoutManager.addAreas(FlowLayoutManager.java:364)
at org.apache.fop.layoutmgr.PageBreaker.addAreas(PageBreaker.java:286)
at
org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:607)
at
org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:481)
at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:314)
at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:436)
at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:90)
at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:107)
at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:244)
at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
...
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51874] IndexOutOfBoundsException in
PrimaryGridUnit
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51874
Sergey Vladimirov <vl...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vlsergey@gmail.com
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51874] IndexOutOfBoundsException in
PrimaryGridUnit
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51874
--- Comment #2 from Vincent Hennebert <vh...@gmail.com> 2011-10-12 16:34:13 UTC ---
Created attachment 27765
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27765
Simplified FO file showing the issue
Thanks for your bug report. After some investigation I managed to reduce the
size of the problematic table to just 3 rows and 2 columns.
What happens is that a table-cell spanning two columns overlaps with a cell
from the previous row that spans two rows.
There is a bug in the table code (package o.a.f.fo.flow.table) that doesn't
check for this kind of situation. It's not entirely clear what should be done:
either throw an error about the overlap, or move the cell to a later column
such that two consecutive slots are available; this would lead to a hole in the
table (a missing fo:table-cell element).
The bug shows up in o.a.f.layoutmgr.table.RowPainter.addAreasAndFlushRow. The
grid unit at row index 1 and col index 1 (corresponding to cell 1.2) is later
overridden by cell 2.1's grid unit. So cell 1.2 never gets a chance to properly
'shut down' and reset firstCellParts[1]. Which leads to the
AssertionFailedError when cell 3.2 tries to register its first cell part in
this variable.
As mentioned above the algorithm that places cells on the table grid must be
made more robust. However, this problem occurs with rather rare and complicated
tables, so fixing it would be considered low priority.
The best thing to do probably is to avoid the error by filling the holes in the
table with empty fo:table-cell elements (i.e., that contain an empty
<fo:block/>). This way, the cell placement algorithm cannot be confused. Or
maybe the table-cell is not actually meant to span two columns.
HTH,
Vincent
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51874] IndexOutOfBoundsException in
PrimaryGridUnit
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51874
Glenn Adams <gl...@skynav.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P3
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51874] IndexOutOfBoundsException in
PrimaryGridUnit
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51874
Glenn Adams <gl...@skynav.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
--- Comment #3 from Glenn Adams <gl...@skynav.com> 2012-04-07 01:37:17 UTC ---
resetting severity from major to normal pending further review
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51874] IndexOutOfBoundsException in
PrimaryGridUnit
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51874
--- Comment #4 from Glenn Adams <gl...@skynav.com> 2012-04-07 01:44:37 UTC ---
resetting P2 open bugs to P3 pending further review
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51874] IndexOutOfBoundsException in
PrimaryGridUnit
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51874
Sergey Vladimirov <vl...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #27568|0 |1
is obsolete| |
--- Comment #1 from Sergey Vladimirov <vl...@gmail.com> 2011-09-22 19:54:57 UTC ---
Created attachment 27569
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27569
Problematic file. Not intended to be distributed under ASL
a bit shorter file
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51874] IndexOutOfBoundsException in
PrimaryGridUnit
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51874
Glenn Adams <gl...@skynav.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.