Bug 41503 - IndexOutOfBoundsException when missing fo:table-cell column-number and number-rows-spanned used in the same fo:table
Summary: IndexOutOfBoundsException when missing fo:table-cell column-number and number...
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.93
Hardware: PC Windows XP
: P2 regression
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-31 01:00 UTC by Guillaume Levrero
Modified: 2012-04-01 06:49 UTC (History)
0 users



Attachments
test FO to reproduce exception in fop-0.93 (1.43 KB, text/plain)
2007-01-31 01:03 UTC, Guillaume Levrero
Details
resulting PDF in fop-092 (2.23 KB, application/octet-stream)
2007-01-31 01:06 UTC, Guillaume Levrero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Levrero 2007-01-31 01:00:11 UTC
Platform: XP SP2, Java JDK 1.5.0_06.

Executing fop0.92 with the FO below produces the correct PDF.
Executing same FO with fop0.93 gives following run-time exception:

java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
	at java.util.ArrayList.RangeCheck(ArrayList.java:546)
	at java.util.ArrayList.set(ArrayList.java:337)
	at org.apache.fop.fo.flow.TableFObj.updateColumnIndex(TableFObj.java:160)
	.....

--- Sample FO -----
<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="content" page-width="210mm"
page-height="297mm">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="content">
    <fo:flow flow-name="xsl-region-body">
      <fo:table table-layout="fixed" width="100%">
        <fo:table-column column-width="proportional-column-width(1)"/>
        <fo:table-column column-width="100mm"/>
        <fo:table-column column-width="proportional-column-width(1)"/>
        <fo:table-body>
          <fo:table-row>
            <fo:table-cell border="1pt solid black" column-number="1">
              <fo:block>column 1</fo:block>
            </fo:table-cell>           
            <fo:table-cell border="1pt solid black" column-number="3"
number-rows-spanned="2">
              <fo:block>column 3</fo:block>
            </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
            <fo:table-cell border="1pt solid black" column-number="1">
              <fo:block>column 1</fo:block>
            </fo:table-cell>
            <fo:table-cell border="1pt solid black" column-number="2">
              <fo:block>column 2</fo:block>
            </fo:table-cell>
          </fo:table-row>
        </fo:table-body>
      </fo:table>
    </fo:flow>
  </fo:page-sequence>
</fo:root>
--- Sample FO -----
Comment 1 Guillaume Levrero 2007-01-31 01:03:03 UTC
Created attachment 19488 [details]
test FO to reproduce exception in fop-0.93
Comment 2 Guillaume Levrero 2007-01-31 01:06:05 UTC
Created attachment 19489 [details]
resulting PDF in fop-092
Comment 3 Andreas L. Delmelle 2007-01-31 12:40:53 UTC
Fixed in FOP Trunk.

Contrary to what Chris indicated on fop-users, the FO is valid. Nothing in the Rec forbids columns being 
empty in certain rows, or simply skipping a few column-numbers, or even the cells being placed in 
random order in the row...

see: http://svn.apache.org/viewvc?view=rev&rev=501977

Thanks for reporting.
Comment 4 Glenn Adams 2012-04-01 06:49:23 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed