Bug 57037 - RecordFormatException - Leftover 486 bytes in subrecord data
Summary: RecordFormatException - Leftover 486 bytes in subrecord data
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.9-FINAL
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-29 08:41 UTC by Gorka Sanz
Modified: 2016-09-08 08:34 UTC (History)
1 user (show)



Attachments
sample saved with libreoffice 4.3 (33.00 KB, application/vnd.ms-excel)
2014-09-29 08:41 UTC, Gorka Sanz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gorka Sanz 2014-09-29 08:41:15 UTC
Created attachment 32069 [details]
sample saved with libreoffice 4.3

The following sample creates an exception wheh try to open it with POI

The sample was created with libreoffice 4.3
If I open and save the sample file with msoffice and libreoffice 4.2, the test works



I have tried versions 3.9, 3.10-final and 3.11-beta2


org.apache.poi.hssf.record.RecordFormatException: Leftover 486 bytes in subrecord data [15, 00, 12, 00, 19, 00, 01, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 99, DC, 1F, 7F, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, FF, FF, FF, FF, 00, 00, 00, 00, 00, 00, 00, 00, 02, 00, 00, 00, 03, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, FF, FF, FF, FF, 00, 00, 00, 00, 00, 00, 00, 00, FF, FF, FF, FF, FF, FF, FF, FF, 00, 00, 00, 00, FF, FF, FF, FF, E0, CF, 95, DC, 1F, 7F, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 77, EA, 07, 00, 00, 00, 04, 00, 02, 00, 00, 00, FF, FF, FF, FF, AC, A2, 85, 03, 00, 00, 00, 00, 00, 80, 01, 00, 00, 80, 00, 00, 00, 80, 01, 00, 00, 80, 13, 00, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, 01, 01, 00, 00, 00, 00, 00, 00, B8, 37, 79, EF, 1F, 7F, 00, 00, B8, 37, 79, EF, 1F, 7F, 00, 00, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF]
	at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:110)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:87)
	at org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:338)
	at org.apache.poi.hssf.record.RecordFactoryInputStream.readNextRecord(RecordFactoryInputStream.java:310)
	at org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:276)
	at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:480)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:315)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:278)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:213)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:361)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:342)
	at readers.xls.GenericXLSReader.open(GenericXLSReader.java:39)
Comment 1 Dominik Stadler 2014-10-21 10:54:37 UTC
It seems this file is actually corrupted, MS Excel also crashes when I try to open it, based on that this sounds more like a bug in LibreOffice...
Comment 2 Dominik Stadler 2014-10-21 11:04:51 UTC
For the records, Excel is not crashing always, but crashed once when I saved the file. I would expect that the file is not created 100% correctly by LibreOffice, but Excel can compensate usually, while POI actively refuses invalid content.
Comment 3 SasiKP 2014-11-21 06:32:18 UTC
We are also having the same problem and want to know how to fix the issue.

We have a excel template, and from our web application, we download the file (using POI) and enter data feed and submit for impor process.

Testers have Libre Office to download the template, enter data and save it in FTP folder.  When this process is done using LibreOffice 4.3.4.1, we get the above problem, where as with LibreOffice 3.7, this doesn't exist.

Also, with MS excel also we dont see this problem