Bug 42486 - Failure parsing a seemingly valid PPT
Summary: Failure parsing a seemingly valid PPT
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.0-dev
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL: http://www.projectcounter.org/uksg_pr...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-21 20:48 UTC by Ivan Todoroski
Modified: 2007-05-25 06:05 UTC (History)
0 users



Attachments
copy of the file in case URL disappears (436.00 KB, application/vnd.ms-powerpoint)
2007-05-21 20:52 UTC, Ivan Todoroski
Details

Note You need to log in before you can comment on or make changes to this bug.
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