https://bz.apache.org/bugzilla/show_bug.cgi?id=65639
Bug ID: 65639 Summary: org.apache.poi.util.RecordFormatException: Tried to allocate an array of length 4276190, but 1000000 is the maximum for this record type Product: POI Version: 4.1.2-FINAL Hardware: PC Status: NEW Severity: normal Priority: P2 Component: HSLF Assignee: dev@poi.apache.org Reporter: redmanmale+apa...@gmail.com Target Milestone: --- I try to parse ppt document and get this error: <business logic> Caused by: org.apache.poi.hslf.exceptions.HSLFException: Couldn't instantiate the class for type with id 1000 on class org.apache.poi.hslf.record.RecordTypes$$Lambda$1302/2069825217@6c8f6293 : org.apache.poi.hslf.exceptions.HSLFException: Couldn't instantiate the class for type with id 1010 on class org.apache.poi.hslf.record.RecordTypes$$Lambda$1308/936605483@4abd8f87 : org.apache.poi.hslf.exceptions.HSLFException: Couldn't instantiate the class for type with id 2005 on class org.apache.poi.hslf.record.RecordTypes$$Lambda$1327/708554163@431de604 : org.apache.poi.hslf.exceptions.HSLFException: Couldn't instantiate the class for type with id 4024 on class org.apache.poi.hslf.record.RecordTypes$$Lambda$1345/56643443@5fd52ce1 : org.apache.poi.util.RecordFormatException: Tried to allocate an array of length 4276190, but 1000000 is the maximum for this record type. If the file is not corrupt, please open an issue on bugzilla to request increasing the maximum allowable size for this record type. As a temporary workaround, consider setting a higher override value with IOUtils.setByteArrayMaxOverride() at org.apache.poi.hslf.record.Record.createRecordForType(Record.java:190) at org.apache.poi.hslf.record.Record.buildRecordAtOffset(Record.java:118) at org.apache.poi.hslf.usermodel.HSLFSlideShowImpl.read(HSLFSlideShowImpl.java:270) at org.apache.poi.hslf.usermodel.HSLFSlideShowImpl.buildRecords(HSLFSlideShowImpl.java:251) at org.apache.poi.hslf.usermodel.HSLFSlideShowImpl.<init>(HSLFSlideShowImpl.java:150) at org.apache.poi.hslf.usermodel.HSLFSlideShow.<init>(HSLFSlideShow.java:163) at org.apache.tika.parser.microsoft.HSLFExtractor.parse(HSLFExtractor.java:83) at org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:178) at org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:131) at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:281) ... 11 more Caused by: org.apache.poi.hslf.exceptions.HSLFException: Couldn't instantiate the class for type with id 1010 on class org.apache.poi.hslf.record.RecordTypes$$Lambda$1308/936605483@4abd8f87 : org.apache.poi.hslf.exceptions.HSLFException: Couldn't instantiate the class for type with id 2005 on class org.apache.poi.hslf.record.RecordTypes$$Lambda$1327/708554163@431de604 : org.apache.poi.hslf.exceptions.HSLFException: Couldn't instantiate the class for type with id 4024 on class org.apache.poi.hslf.record.RecordTypes$$Lambda$1345/56643443@5fd52ce1 : org.apache.poi.util.RecordFormatException: Tried to allocate an array of length 4276190, but 1000000 is the maximum for this record type. If the file is not corrupt, please open an issue on bugzilla to request increasing the maximum allowable size for this record type. As a temporary workaround, consider setting a higher override value with IOUtils.setByteArrayMaxOverride() at org.apache.poi.hslf.record.Record.createRecordForType(Record.java:190) at org.apache.poi.hslf.record.Record.findChildRecords(Record.java:143) at org.apache.poi.hslf.record.Document.<init>(Document.java:133) at org.apache.poi.hslf.record.Record.createRecordForType(Record.java:181) ... 20 more Caused by: org.apache.poi.hslf.exceptions.HSLFException: Couldn't instantiate the class for type with id 2005 on class org.apache.poi.hslf.record.RecordTypes$$Lambda$1327/708554163@431de604 : org.apache.poi.hslf.exceptions.HSLFException: Couldn't instantiate the class for type with id 4024 on class org.apache.poi.hslf.record.RecordTypes$$Lambda$1345/56643443@5fd52ce1 : org.apache.poi.util.RecordFormatException: Tried to allocate an array of length 4276190, but 1000000 is the maximum for this record type. If the file is not corrupt, please open an issue on bugzilla to request increasing the maximum allowable size for this record type. As a temporary workaround, consider setting a higher override value with IOUtils.setByteArrayMaxOverride() at org.apache.poi.hslf.record.Record.createRecordForType(Record.java:190) at org.apache.poi.hslf.record.Record.findChildRecords(Record.java:143) at org.apache.poi.hslf.record.Environment.<init>(Environment.java:54) at org.apache.poi.hslf.record.Record.createRecordForType(Record.java:181) ... 23 more Caused by: org.apache.poi.hslf.exceptions.HSLFException: Couldn't instantiate the class for type with id 4024 on class org.apache.poi.hslf.record.RecordTypes$$Lambda$1345/56643443@5fd52ce1 : org.apache.poi.util.RecordFormatException: Tried to allocate an array of length 4276190, but 1000000 is the maximum for this record type. If the file is not corrupt, please open an issue on bugzilla to request increasing the maximum allowable size for this record type. As a temporary workaround, consider setting a higher override value with IOUtils.setByteArrayMaxOverride() at org.apache.poi.hslf.record.Record.createRecordForType(Record.java:190) at org.apache.poi.hslf.record.Record.findChildRecords(Record.java:143) at org.apache.poi.hslf.record.FontCollection.<init>(FontCollection.java:53) at org.apache.poi.hslf.record.Record.createRecordForType(Record.java:181) ... 26 more Caused by: org.apache.poi.util.RecordFormatException: Tried to allocate an array of length 4276190, but 1000000 is the maximum for this record type. If the file is not corrupt, please open an issue on bugzilla to request increasing the maximum allowable size for this record type. As a temporary workaround, consider setting a higher override value with IOUtils.setByteArrayMaxOverride() at org.apache.poi.util.IOUtils.throwRFE(IOUtils.java:630) at org.apache.poi.util.IOUtils.checkLength(IOUtils.java:208) at org.apache.poi.util.IOUtils.safelyAllocateCheck(IOUtils.java:610) at org.apache.poi.util.IOUtils.safelyAllocate(IOUtils.java:596) at org.apache.poi.hslf.record.FontEmbeddedData.<init>(FontEmbeddedData.java:70) at org.apache.poi.hslf.record.Record.createRecordForType(Record.java:181) ... 29 more Maybe we should bump the default max size for this record type. I could've attach a file but it's more than 1 Mb (around 5 Mb). If you need it I could upload and paste a link. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org