When I call SlideShow ppt = new SlideShow(new HSLFSlideShow(args[0])); In the org.apache.poi.hslf.extractor.ImageExtractor.java, an ArrayIndexOutOfBoundsException occurs, here is the stack trace: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -402645242 at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:491) at org.apache.poi.util.LittleEndian.getUShort(LittleEndian.java:64) at org.apache.poi.hslf.record.Record.findChildRecords(Record.java:112) at org.apache.poi.hslf.HSLFSlideShow.buildRecords(HSLFSlideShow.java:217) at org.apache.poi.hslf.HSLFSlideShow.<init>(HSLFSlideShow.java:126) at org.apache.poi.hslf.HSLFSlideShow.<init>(HSLFSlideShow.java:95) at org.apache.poi.hslf.HSLFSlideShow.<init>(HSLFSlideShow.java:82) at org.apache.poi.hslf.extractor.ImageExtractor.main(ImageExtractor.java:40) In some debug observations, I notice that: in the records creation, when the position is 2703, a record with type 4085 (UserEditAtom) is created. From this point, all the subsequent records are created with type 0 (zero). At some point, the getUShort parameter passed is wrong. This is what I observed, don't know if it will help. I don't know how to reproduce the bug again. I'll upload the file.
Created attachment 19415 [details] File for testing
Fixed. Tales, thank you for reporting it. Regards, Yegor