Free Support Forum - aspose.com

PptEditException: Slide cloning error

Hello,

I'm using the lastest version of Aspose.Slides for Java and receiving this message when attempting to clone a slide with the four parameter cloneSlide method:

com.aspose.slides.PptEditException: Slide cloning error.

What does this error mean? What can cause it?

The source presentation, that is being inserted, has a starting slide number of 22.

When I change the starting slide number to 1, the error goes away. Unfortunately, our end users create these presentations so I have no control about how they are created.

If you need more details, please let me know. I have not yet been able to recreate this in a small test program.

Thank you,
Randy Stegbauer.

Unfortunately, I can’t tell exactly what can cause it without stacktrace.
It would be great to have real ppt with slide number.

Alexey,

Below is the call stack that is printed by Exception.printStackTrace().

I've also attached a presentation that causes the problem. Notice that it's starting slide number is 22.

I discovered an acceptable workaround. I added the following line after I open the presentation and before the slides are cloned.

pres.setFirstSlideNumber((short) 1);

Since I have a workaround, I don't really need this fixed. I just thought you may still want to know about it.

Thank you,
Randy Stegbauer.

=========================
com.aspose.slides.PptEditException: Slide cloning error.
at com.aspose.slides.Presentation.cloneSlide(SourceFile:1519)
at com.ge.epcm.PPT.insertPresentation(PPT.java:323)
at com.ge.epcm.PPT.insertPresentations(PPT.java:282)
at com.ge.epcm.XMLSlide.updatePPT(XMLSlide.java:138)
at com.ge.epcm.PresentationCreator.processPPTDocument(PresentationCreator.java:612)
at com.ge.epcm.PresentationCreator.processRequest(PresentationCreator.java:216)
at com.ge.epcm.PresentationCreator.createPowerPoint(PresentationCreator.java:149)
at com.ge.epcm.PresentationCreator.main(PresentationCreator.java:59)
Caused by: java.lang.NullPointerException
at com.aspose.slides.Presentation.cloneSlide(SourceFile:1440)
... 7 more
=========================

Thank you for report.