Bug 42486

Summary: Failure parsing a seemingly valid PPT
Product: POI Reporter: Ivan Todoroski <grnch>
Component: HSLFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.0-dev   
Target Milestone: ---   
Hardware: Other   
OS: other   
URL: http://www.projectcounter.org/uksg_presentation.ppt
Attachments: copy of the file in case URL disappears

Description Ivan Todoroski 2007-05-21 20:48:53 UTC
To reproduce:

new SlideShow(new HSLFSlideShow("alterman_security.ppt"));

The file opens and displays fine in PowerPoint, but if you try the above 
you get this exception:

java.lang.RuntimeException: Couldn't instantiate the class for type with id 
1000 on class class org.apache.poi.hslf.record.Document : 
java.lang.reflect.InvocationTargetException
Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type 
with id 1033 on class class org.apache.poi.hslf.record.ExObjList : 
java.lang.reflect.InvocationTargetException
Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type 
with id 4055 on class class org.apache.poi.hslf.record.ExHyperlink : 
java.lang.reflect.InvocationTargetException
Cause was : java.lang.IllegalStateException: We need at least two child 
records, but we only had 1
	at 
org.apache.poi.hslf.record.Record.createRecordForType(Record.java:190)
	at 
org.apache.poi.hslf.record.Record.buildRecordAtOffset(Record.java:105)
	at 
org.apache.poi.hslf.EncryptedSlideShow.fetchDocumentEncryptionAtom(EncryptedSlideShow.java:121)
	at 
org.apache.poi.hslf.EncryptedSlideShow.checkIfEncrypted(EncryptedSlideShow.java:70)
	at org.apache.poi.hslf.HSLFSlideShow.<init>(HSLFSlideShow.java:121)
	at org.apache.poi.hslf.HSLFSlideShow.<init>(HSLFSlideShow.java:96)
Comment 1 Ivan Todoroski 2007-05-21 20:50:35 UTC
Sorry, copy paste error, here is correct way to reproduce:

new SlideShow(new HSLFSlideShow("uksg_presentation.ppt"));
Comment 2 Ivan Todoroski 2007-05-21 20:52:00 UTC
Created attachment 20234 [details]
copy of the file in case URL disappears
Comment 3 Yegor Kozlov 2007-05-25 06:05:31 UTC
Fixed

Some of the assertions in ExHyperlink record were too strong. I change the code
to log them instead of throwing exceptions.

Yegor