Bug 28239 - java.io.IOException: Cannot remove block[ 330 ]; out of range
Summary: java.io.IOException: Cannot remove block[ 330 ]; out of range
Status: RESOLVED DUPLICATE of bug 44898
Alias: None
Product: POI
Classification: Unclassified
Component: POIFS (show other bugs)
Version: unspecified
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-06 19:25 UTC by Ryan Ackley
Modified: 2008-05-20 08:43 UTC (History)
1 user (show)



Attachments
Proposed fix (875 bytes, patch)
2008-04-29 17:27 UTC, Trejkaz (pen name)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Ackley 2004-04-06 19:25:36 UTC
I get the following stacktrace on a valid OLE file (MS Project): 

java.io.IOException: Cannot remove block[ 330 ]; out of range

	at org.apache.poi.poifs.storage.BlockListImpl.remove
(BlockListImpl.java:103)

	at org.apache.poi.poifs.storage.BlockAllocationTableReader.fetchBlocks
(BlockAllocationTableReader.java:190)

	at org.apache.poi.poifs.storage.BlockListImpl.fetchBlocks
(BlockListImpl.java:128)

	at org.apache.poi.poifs.eventfilesystem.POIFSReader.processProperties
(POIFSReader.java:275)

	at org.apache.poi.poifs.eventfilesystem.POIFSReader.processProperties
(POIFSReader.java:228)

	at org.apache.poi.poifs.eventfilesystem.POIFSReader.processProperties
(POIFSReader.java:228)

	at org.apache.poi.poifs.eventfilesystem.POIFSReader.read
(POIFSReader.java:95)
Comment 1 Trejkaz (pen name) 2008-04-29 17:27:37 UTC
Created attachment 21881 [details]
Proposed fix

It is as I thought, removing that one line makes all our files parse correctly.
Comment 2 Trejkaz (pen name) 2008-04-29 17:30:04 UTC
My apologies, the attachment I just put up was really for Bug 44898, but the bugs are very similar and it would be interesting to see if it fixes the problem.
Comment 3 Nick Burch 2008-05-20 08:43:09 UTC

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