Bug 61881

Summary: Regression in ppt parsing: typeface can't be null or empty
Product: POI Reporter: Tim Allison <tallison>
Component: HSLFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.17-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Tim Allison 2017-12-08 22:14:25 UTC
As Dominik pointed out in his regression tests in August [1], there's a regression in ppt parsing that we re-discovered over on Apache Tika during prep for the release of 1.17, TIKA-2523 [2], where I've placed a test file.


[1] https://lists.apache.org/thread.html/1250dd7950dc6ea320dee377c06905c6d2accf4b7710381616cd2485@%3Cdev.poi.apache.org%3E
[2] https://issues.apache.org/jira/browse/TIKA-2523

Caused by: org.apache.poi.hslf.exceptions.HSLFException: Couldn't instantiate the class for type with id 2005 on class class org.apache.poi.hslf.record.FontCollection : java.lang.reflect.InvocationTargetException
Cause was : java.lang.IllegalArgumentException: typeface can't be null nor empty
	at org.apache.poi.hslf.record.Record.createRecordForType(Record.java:186)
	at org.apache.poi.hslf.record.Record.findChildRecords(Record.java:129)
	at org.apache.poi.hslf.record.Environment.<init>(Environment.java:54)
	... 64 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at org.apache.poi.hslf.record.Record.createRecordForType(Record.java:182)
	... 66 more
Caused by: java.lang.IllegalArgumentException: typeface can't be null nor empty
	at org.apache.poi.hslf.usermodel.HSLFFontInfo.setTypeface(HSLFFontInfo.java:129)
	at org.apache.poi.hslf.usermodel.HSLFFontInfo.<init>(HSLFFontInfo.java:74)
	at org.apache.poi.hslf.record.FontCollection.<init>(FontCollection.java:47)
	... 71 more
Comment 1 Andreas Beeker 2017-12-09 11:46:24 UTC
Fixed via r1817599

I've tried to download Dominiks regression files too, but they seem to be deleted/moved ... so lets wait for the next regression run.