Free Support Forum - aspose.com

Aspose Slides for Java version 20.4 Introduced an error in Presentation.save()

Hello,

Aspose Slides for Java version 20.4 introduced an error in Presentation.save()
For one of my presentation files the following code throws an ArrayIndexOutOfBoundsException:

IPresentation presentation = new Presentation("untitled.pptx");
    System.out.println("Write to file");
    presentation.save("demo.pptx", SaveFormat.Pptx);
    System.out.println("Wrote to file");

The Output is:

Write to file
Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: 2
at com.aspose.slides.v.do(Unknown Source)
at com.aspose.slides.et.do(Unknown Source)
at com.aspose.slides.et.do(Unknown Source)
at com.aspose.slides.ev.do(Unknown Source)
at com.aspose.slides.e6.for(Unknown Source)
at com.aspose.slides.e6.do(Unknown Source)
at com.aspose.slides.q2.do(Unknown Source)
at com.aspose.slides.q2.do(Unknown Source)
at com.aspose.slides.bg.do(Unknown Source)
at com.aspose.slides.akc.do(Unknown Source)
at com.aspose.slides.afs.do(Unknown Source)
at com.aspose.slides.afs.do(Unknown Source)
at com.aspose.slides.Presentation.do(Unknown Source)
at com.aspose.slides.Presentation.do(Unknown Source)
at com.aspose.slides.Presentation.save(Unknown Source)
at de.demo.App.main(App.java:74)

Process de.demo.App exited abnormally with code 1

With Aspose Slides version 20.3 the output was as expected:

Write to file
Wrote to file

The same is true if the target is an output stream.

Kind regards

Uwe Hubert

@uhubert,

I have observed the issue shared by you and request you to please share the source file reproducing the issue on your end along with Java and Operating System details.,

The operating system is Linux Ubuntu 20.04 LTS.

java -version
openjdk version “1.8.0_252”
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1ubuntu1-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

App.zip (364 Bytes)

@uhubert,

I have observed the sample code but it is still missing the source file used to reproduce the issue.Please share the requested information

It seems, you do not mean the Java source file above in App.zip when you mention the “source file”.
At the moment it is not possible to send you the .pptx file since we do not own the copyright to it have to clear that issue first.

@uhubert,

I like to share that we need to have source presentation file in order to proceed further with investigation on our end. Without that, unfortunately it will not be possible for us to investigate the issue further.