Bug 34575

Summary: File in Bug 15556 now fails to read due to OBJ Record
Product: POI Reporter: Avik Sengupta <avik>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED DUPLICATE    
Severity: major    
Priority: P2    
Version: 2.5-FINAL   
Target Milestone: ---   
Hardware: All   
OS: other   

Description Avik Sengupta 2005-04-22 14:15:05 UTC
[junit] Caused by: java.lang.ArrayIndexOutOfBoundsException: 33
    [junit]     at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:491)
    [junit]     at org.apache.poi.util.LittleEndian.getShort(LittleEndian.java:52)
    [junit]     at
org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:98)
    [junit]     at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
    [junit]     at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
    [junit]     at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)

File is attached to bug 15556. To clarify, the double byte string issue
explained in that bug is still fixed, but since that file is complex, the OBJ re
cord bug shows up for that file.
Comment 1 Avik Sengupta 2005-04-22 14:16:40 UTC
If you are looking at fixing this, note that the file is already in POI CVS as
an existing testcase. 
Comment 2 Avik Sengupta 2005-04-22 17:08:14 UTC

*** This bug has been marked as a duplicate of 33082 ***
Comment 3 Avik Sengupta 2005-05-02 11:23:57 UTC
After the new images code, the file fails with a different exception:

    [junit] Unable to construct record instance, the following exception
occured: null
    [junit] org.apache.poi.hssf.record.RecordFormatException: Unable to
construct record instance, the following exception occured: null
    [junit]     at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:251)
    [junit]     at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:161)
    [junit]     at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:183)
    [junit]     at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:230)
    [junit]     at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:211)
    [junit]     at
org.apache.poi.hssf.usermodel.TestBugs.test15556(TestBugs.java:257)
Comment 4 Avik Sengupta 2005-05-02 11:43:25 UTC
Sorry, scratch the previous comment. The error continues to be

    [junit] Caused by: java.lang.ArrayIndexOutOfBoundsException: 33
    [junit]     at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:491)
    [junit]     at org.apache.poi.util.LittleEndian.getShort(LittleEndian.java:52)
    [junit]     at
org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:98)
    [junit]     at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
    [junit]     at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
    [junit]     at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
Comment 5 Avik Sengupta 2005-05-03 15:29:24 UTC
33082 is not a dup, since its been fixed, and this has NOT!
Comment 6 Amol Deshmukh 2005-07-08 17:02:29 UTC
Fix for 35527 has fixed this issue as well. See comments for 35527.

*** This bug has been marked as a duplicate of 35527 ***