Created attachment 27105 [details] File to repro with Error was Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 70 at org.apache.poi.util.LittleEndian.getUShort(LittleEndian.java:59) at org.apache.poi.hpbf.model.qcbits.QCPLCBit$Type12.<init>(QCPLCBit.java:214) at org.apache.poi.hpbf.model.qcbits.QCPLCBit$Type12.<init>(QCPLCBit.java:182) at org.apache.poi.hpbf.model.qcbits.QCPLCBit.createQCPLCBit(QCPLCBit.java:89) at org.apache.poi.hpbf.model.QuillContents.<init>(QuillContents.java:69) at org.apache.poi.hpbf.HPBFDocument.<init>(HPBFDocument.java:63) at org.apache.poi.hpbf.HPBFDocument.<init>(HPBFDocument.java:47) at org.apache.poi.hpbf.extractor.PublisherTextExtractor.<init>(PublisherTextExtractor.java:48) at org.apache.poi.hpbf.extractor.PublisherTextExtractor.<init>(PublisherTextExtractor.java:51) at org.apache.poi.hpbf.extractor.PublisherTextExtractor.<init>(PublisherTextExtractor.java:56) at org.apache.poi.hpbf.extractor.PublisherTextExtractor.main(PublisherTextExtractor.java:136)
I don't have a copy of publisher 2010, but I suspect you may do? If so, could you try opening all the Sample files (Sample.pub -> Sample4.pub) from test-data/publisher and saving them as 2010 files? They're all quite simple files, where we know what the contents are, and what the older files look like. By comparing them we may be able to spot what's different. Plus, they're smaller to work with when debugging which is handy! FYI When we do have the files, using POIFSViewer may help spot the changes
Created attachment 27108 [details] Sample.pub saved-as with Publisher 2010
Created attachment 27109 [details] Sample2.pub saved-as with Publisher 2010
Created attachment 27110 [details] Sample3.pub saved-as with Publisher 2010.
Created attachment 27111 [details] Sample4.pub saved-as with Publisher 2010.
Nick, Attached all 4 files saved-as. They don't seem to be much different size-wise - not sure about the rest. Sample2_2010.pub worked for me. Also, another pub doc created purely with Publisher 2010 works. But that first one Publisher_2010.pub causes AIOOBE in LittleEndian.getUShort. It must be something very specific we hit, may not be a general 2010 issue...
All the samples now seem to work fine, therefore I am closing this. If you still see this then please test with the latest version 3.12-beta1 or newer and report new issues for anything still failing.