Clone Slide Problem

Dear team,

We are creating presentation using Aspose . In the process , we parse a sample presentation and maintain the title master of the presentation in Memory. We clone the title master and add it to every new presentation. After some iterations , the clone slide throws the following error :

com.aspose.slides.PptEditException: Slide cloning error.
at com.aspose.slides.Presentation.cloneSlide(SourceFile:1539)
at CloneSlide.main(CloneSlide.java:25)
Caused by: java.io.IOException: Read wrong number of bytes from Escher record.
at com.aspose.slides.gB.do(SourceFile:56)
at com.aspose.slides.fH.do(SourceFile:23)
at com.aspose.slides.gC.do(SourceFile:31)
at com.aspose.slides.bA.do(SourceFile:73)
at com.aspose.slides.gB.do(SourceFile:49)
at com.aspose.slides.fH.do(SourceFile:23)
at com.aspose.slides.dH.do(SourceFile:36)
at com.aspose.slides.aw.(SourceFile:42)
at com.aspose.slides.eT.(SourceFile:39)
at com.aspose.slides.dH.(SourceFile:24)
at com.aspose.slides.fm.do(SourceFile:126)
at com.aspose.slides.fm.do(SourceFile:60)
at com.aspose.slides.fm.do(SourceFile:41)
at com.aspose.slides.eT.do(SourceFile:55)
at com.aspose.slides.aw.(SourceFile:42)
at com.aspose.slides.eT.(SourceFile:39)
at com.aspose.slides.x.(SourceFile:38)
at com.aspose.slides.Slide.do(SourceFile:631)
at com.aspose.slides.Presentation.do(SourceFile:1330)
at com.aspose.slides.Presentation.cloneSlide(SourceFile:1520)

The sample code and the base presentation whose slide is cloned has been attached to reproduce the error. Please have a look into the problem and provide a solution.

Regards
J.Karthik

Hello,

It’s not possible to clone master slides. You can clone normal slides only.
Master will be cloned automatically, if necessary.

Hi Alcrus,

Do you mean that cloning a master slide will always cause an exception (or) you can’t guarantee whether it will work or not on the master slide.

Because , if you run the attached code , you will find that cloneSlide throws an exception only after working for a lot of times (for around 4000 times) successfully.

Regards
J.Karthik