You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/06/15 16:27:07 UTC
DO NOT REPLY [Bug 51378] New: getDataFormatString crashes
https://issues.apache.org/bugzilla/show_bug.cgi?id=51378
Bug #: 51378
Summary: getDataFormatString crashes
Product: POI
Version: 3.8-dev
Platform: All
OS/Version: All
Status: NEW
Severity: critical
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: jxz164@hotmail.com
Classification: Unclassified
Created attachment 27159
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27159
Java code and Excel files to reproduce the getDataFormatString crash
The getDataFormatString method call crashes when reading the test file
test-data\spreadsheet\12561-1.xls
with the following stack trace.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array
index out of range: 56
at java.util.Vector.get(Vector.java:694)
at
org.apache.poi.hssf.usermodel.HSSFDataFormat.getFormat(HSSFDataFormat.java:146)
at
org.apache.poi.hssf.usermodel.HSSFCellStyle.getDataFormatString(HSSFCellStyle.java:133)
at
org.apache.poi.hssf.usermodel.HSSFCellStyle.getDataFormatString(HSSFCellStyle.java:110)
at
org.apache.poi.ss.examples.ReadDataFormat.getDataFormat(ReadDataFormat.java:15)
at org.apache.poi.ss.examples.ReadDataFormat.main(ReadDataFormat.java:34)
This happens in both poi-3.8-beta3 and poi-3.7.
I tested another Excel file and found that it failed with similar stack trace
in poi-3.8-beta3 but succeeded in poi-3.7. I believe there is a regression
here.
Please see attached source code and two Excel files to reproduce this issue.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 51378] getDataFormatString crashes
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51378
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Nick Burch <ni...@alfresco.com> 2011-06-15 14:39:21 UTC ---
Your style is claiming to be format 56, but POI can't find a format with that
ID
If you open the file in excel, and do a "save as", does that fix your problem?
What does OpenOffice make of the file?
How was your excel file generated?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 51378] getDataFormatString crashes
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51378
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |FIXED
--- Comment #3 from Yegor Kozlov <ye...@dinom.ru> 2011-06-16 10:18:06 UTC ---
Should be fixed in r1136352
Yegor
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 51378] getDataFormatString crashes
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51378
--- Comment #2 from jxz164@hotmail.com 2011-06-15 14:57:22 UTC ---
The attachment contains two files. The file 12561-1.xls is from shipped
poi-3.8-beta3 under the test-data directory. Both POI-3.8-beta3 and POI 3.7
have trouble reading it. Yes, if I save it in Excel again, it will read OK. I
don't have openoffice to test it.
The second file O_27272_2.xls was created by POI and resave it in Excel does
not help. The crash happens only in POI-3.8-beta3, but not POI 3.7.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org