We're sorry Aspose doesn't work properply without JavaScript enabled.

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,

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.

Hello, now i can povide some PowerPoint files that reproduce the error.

The files broken-1.pptx, broken-2.pptx, and broken-3.pptx show the error.
The file works-1.pptx does not, while having simmilar content.

The second line of text under the fraction bar seems to be the problem.

In version 20.6 the error still occures.

Thank you

presentations-212902.zip (1.2 MB)

@uhubert,

I have created an issue with ID SLIDESJAVA-38146 in our issue tracking system to further investigate this issue after reproducing on my end. We will share feedback with you as soon as the issue will be fixed.

The issues you have found earlier (filed as SLIDESJAVA-38146) have been fixed in this update.