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 2017/03/08 09:21:45 UTC

[Bug 60833] Initialisation of record 0x31 left 4 bytes remaining still to be read.

https://bz.apache.org/bugzilla/show_bug.cgi?id=60833

Javen O'Neal <on...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
                 OS|                            |All

--- Comment #1 from Javen O'Neal <on...@apache.org> ---
Thanks for the bug report and including the problematic file.

Before I spend time researching this, it would help us if you could answer a
few questions.

I'm assuming you get an exception (what exception class?) with the message
"Initialisation of record 0x31 left 4 bytes remaining still to be read" when
you open the workbook with
> Workbook wb = WorkbookFactory.create(new File("buzhengc.xls"));
If not, please include a stack trace and sample code so that we can reproduce
the problem.

What version of POI are you using?

Is there anything written to stderr or the POILogger, that would suggest why we
were 4 bytes short?

Does this file open without any errors in Microsoft Excel or other spreadsheet
application? If so, what version?

Thanks in advance for the info.

-- 
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


Re: [Bug 60833] Initialisation of record 0x31 left 4 bytes remaining still to be read.

Posted by hong_derek <ho...@qq.com>.
I have got the same problem with POI 3.15.
Exception LeftoverDataException was throw in RecordInputStream.java:

	public boolean hasNextRecord() throws LeftoverDataException {
		if (_currentDataLength != -1 && _currentDataLength != _currentDataOffset)
{
			throw new LeftoverDataException(_currentSid, remaining());
		}
		if (_currentDataLength != DATA_LEN_NEEDS_TO_BE_READ) {
			_nextSid = readNextSid();
		}
		return _nextSid != INVALID_SID_VALUE;
	}
While _currentDataLength is 24 and _currentDataOffset is 20.
And the error message as follow:
Exception in thread "main"
org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException:
Initialisation of record 0x31(FontRecord) left 4 bytes remaining still to be
read.
	at
org.apache.poi.hssf.record.RecordInputStream.hasNextRecord(RecordInputStream.java:174)
	at
org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:253)
	at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:494)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:341)
	at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:95)
	at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:178)
	at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:140)



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-60833-New-Initialisation-of-record-0x31-left-4-bytes-remaining-still-to-be-read-tp5726833p5726985.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org