I am trying to biff view one file and it threw the following exception. java.io.IOException: block[ 0 ] already removed at org.apache.poi.poifs.storage.BlockListImpl.remove (BlockListImpl.java:96) 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.filesystem.POIFSFileSystem.processProperties (POIFSFileSystem.java:405) at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init> (POIFSFileSystem.java:102) at org.apache.poi.hssf.dev.BiffViewer.run(BiffViewer.java:70) at org.apache.poi.hssf.dev.BiffViewer.main(BiffViewer.java:652)
Created attachment 13334 [details] input file for biff view.
guys , i could resolve this problem by putting a hack .Tell me if it is a valid solution but my assumption that i have resoved the problem as per bug#31979 is resolved is wrong..:( In POIFSFileSystem.java In processProperties method I added a check for size if(size > 0) { if (property.shouldUseSmallBlocks()) { document = new POIFSDocument(name, small_blocks .fetchBlocks(startBlock), size); } else { document = new POIFSDocument(name, big_blocks.fetchBlocks(startBlock), size); } parent.createDocument(document); }
Does this file open correctly in Excel? How is this file produced? We need to be careful about changes to POIFileSystem, since it might have wider repurcussions. At the very least, we need a testcase demonstrating the error and the fix. Also I dont understand your reference to bug 31979. Does this patch fix that one? Lets discuss this on the dev lists... bugzilla is rotten to have a conversation on.
Please try with the latest release and see if this is still trouble. If so then please provide the smallest file that recreates the problem and describe how it was created.
POIFS has had a number of fixes since this bug was opened. As nothing more has been heard in many years, assuming this has now been fixed