Details
-
Bug
-
Resolution: Duplicate
-
P3
-
9
-
x86_64
-
linux_ubuntu
Description
FULL PRODUCT VERSION :
oracle-java9-installer:
Installiert: 9b116+9b116arm-1~webupd8~1
Installationskandidat: 9b116+9b116arm-1~webupd8~1
/usr/lib/jvm/java-9-oracle/bin/java -version
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+116)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+116, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
uname -a
Linux dstathink 3.13.0-85-generic #129-Ubuntu SMP Thu Mar 17 20:50:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
This bug-report is created in response to the Quality Outreach effort on request from Rory from the OpenJDK Quality Group and dalibor.topic@oracle.com.
When compiling Apache POI using the Java 9 early access version I see unit-tests fail with "java.lang.ArrayIndexOutOfBoundsException at sun.font.ExtendedTextSourceLabel.createCharinfo()" whereas they run fine in previous versions of Java (at least 6, 7 and 8).
Probably related bugs (Rory asked to report a new one nevertheless): https://bugs.openjdk.java.net/browse/JDK-8151725, https://bugs.openjdk.java.net/browse/JDK-8145542, https://bugs.openjdk.java.net/browse/JDK-8041480
REGRESSION. Last worked in version 8u91
ADDITIONAL REGRESSION INFORMATION:
/usr/lib/jvm/java-8-oracle/bin/java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
* install Apache Ant >= 1.8.0
* install JDK 1.9.0 b116 or newer
* checkout current version of Apache POI from https://svn.apache.org/repos/asf/poi/trunk/
* Apply the following patch to build.xml
@@ -288,7 +288,11 @@ under the License.
<propertyref name="user.country"/>
<propertyref name="javax.xml.stream.XMLInputFactory"/>
<propertyref name="org.apache.commons.logging.Log"/>
+ <propertyref name="java.locale.providers"/> <!-- required for Java 9 compilation -->
</propertyset>
+
+ <!-- this can be overwriten to empty when running with Java 9 -->
+ <property name="maxpermsize" value="-XX:MaxPermSize=256m"/>
<path id="main.classpath">
<pathelement location="${main.commons-logging.jar}"/>
@@ -1361,7 +1365,7 @@ under the License.
failureproperty="ooxml.test.failed">
<classpath refid="@{classpath}"/>
<syspropertyset refid="junit.properties"/>
- <jvmarg value="-XX:MaxPermSize=256m"/>
+ <jvmarg value="${maxpermsize}"/>
<jvmarg value="-Xmx768M"/>
<jvmarg value="-ea"/>
<!-- jvmarg value="-Duser.timezone=UTC"/ -->
@@ -1433,7 +1437,7 @@ under the License.
failureproperty="ooxml.ss.test.failed">
<classpath refid="@{classpath}"/>
<syspropertyset refid="junit.properties"/>
- <jvmarg value="-XX:MaxPermSize=256m"/>
+ <jvmarg value="${maxpermsize}"/>
<jvmarg value="-Xmx768M"/>
<jvmarg value="-ea"/>
<!-- jvmarg value="-Duser.timezone=UTC"/ -->
@@ -1519,7 +1523,7 @@ under the License.
<classpath refid="test.ooxml.classpath"/>
<classpath refid="ooxml.xmlsec.classpath"/>
<syspropertyset refid="junit.properties"/>
- <jvmarg value="-XX:MaxPermSize=256m"/>
+ <jvmarg value="${maxpermsize}"/>
<jvmarg value="-Xmx512m"/>
<jvmarg value="${file.leak.detector}" />
<arg value="-ooxml"/>
* Compile with the following command
ant \
-Duser.language=en \
-Duser.country=US \
-Dmaxpermsize=-Dthis.is.a.dummy=true \
-Djava.locale.providers=JRE,CLDR \
-Dcoverage.enabled=true \
-Dorg.apache.poi.util.POILogger=org.apache.poi.util.NullLogger \
-Dhalt.on.test.failure=false \
compile-ooxml-lite
The compile output will show the failing tests
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compilation and execution of unit-tests should run fine.
ACTUAL -
[java] 1) render(org.apache.poi.xslf.usermodel.TestPPTX2PNG)
[java] java.lang.ArrayIndexOutOfBoundsException: 344
[java] at sun.font.ExtendedTextSourceLabel.createCharinfo(java.desktop@9-ea/ExtendedTextSourceLabel.java:814)
[java] at sun.font.ExtendedTextSourceLabel.getCharinfo(java.desktop@9-ea/ExtendedTextSourceLabel.java:548)
[java] at sun.font.ExtendedTextSourceLabel.getLineBreakIndex(java.desktop@9-ea/ExtendedTextSourceLabel.java:480)
[java] at java.awt.font.TextMeasurer.calcLineBreak(java.desktop@9-ea/TextMeasurer.java:330)
[java] at java.awt.font.TextMeasurer.getLineBreakIndex(java.desktop@9-ea/TextMeasurer.java:566)
[java] at java.awt.font.LineBreakMeasurer.nextOffset(java.desktop@9-ea/LineBreakMeasurer.java:359)
[java] at java.awt.font.LineBreakMeasurer.nextLayout(java.desktop@9-ea/LineBreakMeasurer.java:440)
[java] at org.apache.poi.sl.draw.DrawTextParagraph.breakText(DrawTextParagraph.java:247)
[java] at org.apache.poi.sl.draw.DrawTextShape.drawParagraphs(DrawTextShape.java:134)
[java] at org.apache.poi.sl.draw.DrawTextShape.getTextHeight(DrawTextShape.java:195)
[java] at org.apache.poi.sl.draw.DrawTextShape.drawContent(DrawTextShape.java:85)
[java] at org.apache.poi.sl.draw.DrawSimpleShape.draw(DrawSimpleShape.java:96)
[java] at org.apache.poi.sl.draw.DrawSheet.draw(DrawSheet.java:67)
[java] at org.apache.poi.sl.draw.DrawSlide.draw(DrawSlide.java:39)
[java] at org.apache.poi.xslf.usermodel.XSLFSlide.draw(XSLFSlide.java:301)
[java] at org.apache.poi.xslf.util.PPTX2PNG.main(PPTX2PNG.java:154)
[java] at org.apache.poi.xslf.usermodel.TestPPTX2PNG.render(TestPPTX2PNG.java:62)
...
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
See source of Apache POI at https://svn.apache.org/repos/asf/poi/trunk/
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
none found
oracle-java9-installer:
Installiert: 9b116+9b116arm-1~webupd8~1
Installationskandidat: 9b116+9b116arm-1~webupd8~1
/usr/lib/jvm/java-9-oracle/bin/java -version
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+116)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+116, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
uname -a
Linux dstathink 3.13.0-85-generic #129-Ubuntu SMP Thu Mar 17 20:50:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
This bug-report is created in response to the Quality Outreach effort on request from Rory from the OpenJDK Quality Group and dalibor.topic@oracle.com.
When compiling Apache POI using the Java 9 early access version I see unit-tests fail with "java.lang.ArrayIndexOutOfBoundsException at sun.font.ExtendedTextSourceLabel.createCharinfo()" whereas they run fine in previous versions of Java (at least 6, 7 and 8).
Probably related bugs (Rory asked to report a new one nevertheless): https://bugs.openjdk.java.net/browse/JDK-8151725, https://bugs.openjdk.java.net/browse/JDK-8145542, https://bugs.openjdk.java.net/browse/JDK-8041480
REGRESSION. Last worked in version 8u91
ADDITIONAL REGRESSION INFORMATION:
/usr/lib/jvm/java-8-oracle/bin/java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
* install Apache Ant >= 1.8.0
* install JDK 1.9.0 b116 or newer
* checkout current version of Apache POI from https://svn.apache.org/repos/asf/poi/trunk/
* Apply the following patch to build.xml
@@ -288,7 +288,11 @@ under the License.
<propertyref name="user.country"/>
<propertyref name="javax.xml.stream.XMLInputFactory"/>
<propertyref name="org.apache.commons.logging.Log"/>
+ <propertyref name="java.locale.providers"/> <!-- required for Java 9 compilation -->
</propertyset>
+
+ <!-- this can be overwriten to empty when running with Java 9 -->
+ <property name="maxpermsize" value="-XX:MaxPermSize=256m"/>
<path id="main.classpath">
<pathelement location="${main.commons-logging.jar}"/>
@@ -1361,7 +1365,7 @@ under the License.
failureproperty="ooxml.test.failed">
<classpath refid="@{classpath}"/>
<syspropertyset refid="junit.properties"/>
- <jvmarg value="-XX:MaxPermSize=256m"/>
+ <jvmarg value="${maxpermsize}"/>
<jvmarg value="-Xmx768M"/>
<jvmarg value="-ea"/>
<!-- jvmarg value="-Duser.timezone=UTC"/ -->
@@ -1433,7 +1437,7 @@ under the License.
failureproperty="ooxml.ss.test.failed">
<classpath refid="@{classpath}"/>
<syspropertyset refid="junit.properties"/>
- <jvmarg value="-XX:MaxPermSize=256m"/>
+ <jvmarg value="${maxpermsize}"/>
<jvmarg value="-Xmx768M"/>
<jvmarg value="-ea"/>
<!-- jvmarg value="-Duser.timezone=UTC"/ -->
@@ -1519,7 +1523,7 @@ under the License.
<classpath refid="test.ooxml.classpath"/>
<classpath refid="ooxml.xmlsec.classpath"/>
<syspropertyset refid="junit.properties"/>
- <jvmarg value="-XX:MaxPermSize=256m"/>
+ <jvmarg value="${maxpermsize}"/>
<jvmarg value="-Xmx512m"/>
<jvmarg value="${file.leak.detector}" />
<arg value="-ooxml"/>
* Compile with the following command
ant \
-Duser.language=en \
-Duser.country=US \
-Dmaxpermsize=-Dthis.is.a.dummy=true \
-Djava.locale.providers=JRE,CLDR \
-Dcoverage.enabled=true \
-Dorg.apache.poi.util.POILogger=org.apache.poi.util.NullLogger \
-Dhalt.on.test.failure=false \
compile-ooxml-lite
The compile output will show the failing tests
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compilation and execution of unit-tests should run fine.
ACTUAL -
[java] 1) render(org.apache.poi.xslf.usermodel.TestPPTX2PNG)
[java] java.lang.ArrayIndexOutOfBoundsException: 344
[java] at sun.font.ExtendedTextSourceLabel.createCharinfo(java.desktop@9-ea/ExtendedTextSourceLabel.java:814)
[java] at sun.font.ExtendedTextSourceLabel.getCharinfo(java.desktop@9-ea/ExtendedTextSourceLabel.java:548)
[java] at sun.font.ExtendedTextSourceLabel.getLineBreakIndex(java.desktop@9-ea/ExtendedTextSourceLabel.java:480)
[java] at java.awt.font.TextMeasurer.calcLineBreak(java.desktop@9-ea/TextMeasurer.java:330)
[java] at java.awt.font.TextMeasurer.getLineBreakIndex(java.desktop@9-ea/TextMeasurer.java:566)
[java] at java.awt.font.LineBreakMeasurer.nextOffset(java.desktop@9-ea/LineBreakMeasurer.java:359)
[java] at java.awt.font.LineBreakMeasurer.nextLayout(java.desktop@9-ea/LineBreakMeasurer.java:440)
[java] at org.apache.poi.sl.draw.DrawTextParagraph.breakText(DrawTextParagraph.java:247)
[java] at org.apache.poi.sl.draw.DrawTextShape.drawParagraphs(DrawTextShape.java:134)
[java] at org.apache.poi.sl.draw.DrawTextShape.getTextHeight(DrawTextShape.java:195)
[java] at org.apache.poi.sl.draw.DrawTextShape.drawContent(DrawTextShape.java:85)
[java] at org.apache.poi.sl.draw.DrawSimpleShape.draw(DrawSimpleShape.java:96)
[java] at org.apache.poi.sl.draw.DrawSheet.draw(DrawSheet.java:67)
[java] at org.apache.poi.sl.draw.DrawSlide.draw(DrawSlide.java:39)
[java] at org.apache.poi.xslf.usermodel.XSLFSlide.draw(XSLFSlide.java:301)
[java] at org.apache.poi.xslf.util.PPTX2PNG.main(PPTX2PNG.java:154)
[java] at org.apache.poi.xslf.usermodel.TestPPTX2PNG.render(TestPPTX2PNG.java:62)
...
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
See source of Apache POI at https://svn.apache.org/repos/asf/poi/trunk/
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
none found
Attachments
Issue Links
- duplicates
-
JDK-8145542 The case failed automatically and thrown java.lang.ArrayIndexOutOfBoundsException exception.
- Resolved