ArgumentOutOfRangeException when Saving PowerPoint Presentation

When we save a presentation that was edited, we get this:

Aspose slides version 22.2 on Linux / JDK16

com.aspose.slides.exceptions.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Value is too small or too big.
at com.aspose.slides.ms.System.ai.do(Unknown Source)
at com.aspose.slides.kw.do(Unknown Source)
at com.aspose.slides.in.this(Unknown Source)
at com.aspose.slides.in.al_(Unknown Source)
at com.aspose.slides.ks.case(Unknown Source)
at com.aspose.slides.ks.int(Unknown Source)
at com.aspose.slides.ml.try(Unknown Source)
at com.aspose.slides.ml.long(Unknown Source)
at com.aspose.slides.kk.do(Unknown Source)
at com.aspose.slides.ml.for(Unknown Source)
at com.aspose.slides.ml.long(Unknown Source)
at com.aspose.slides.ay4.do(Unknown Source)
at com.aspose.slides.ml.for(Unknown Source)
at com.aspose.slides.ml.long(Unknown Source)
at com.aspose.slides.an7.do(Unknown Source)
at com.aspose.slides.ml.for(Unknown Source)
at com.aspose.slides.ml.long(Unknown Source)
at com.aspose.slides.aia.do(Unknown Source)
at com.aspose.slides.ml.for(Unknown Source)
at com.aspose.slides.ml.long(Unknown Source)
at com.aspose.slides.ie.do(Unknown Source)
at com.aspose.slides.ml.for(Unknown Source)
at com.aspose.slides.ml.long(Unknown Source)
at com.aspose.slides.fr.try(Unknown Source)
at com.aspose.slides.fr.new(Unknown Source)
at com.aspose.slides.fw.do(Unknown Source)
at com.aspose.slides.aom.do(Unknown Source)
at com.aspose.slides.Shape.do(Unknown Source)
at com.aspose.slides.Shape.private(Unknown Source)
at com.aspose.slides.Chart.at_(Unknown Source)
at com.aspose.slides.tk.if(Unknown Source)
at com.aspose.slides.tk.do(Unknown Source)
at com.aspose.slides.tk.do(Unknown Source)
at com.aspose.slides.bv.do(Unknown Source)
at com.aspose.slides.apv.do(Unknown Source)
at com.aspose.slides.akb.do(Unknown Source)
at com.aspose.slides.akb.do(Unknown Source)
at com.aspose.slides.Presentation.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)

@roicarmel
Thank you for contacting support.
Could you please send us the original presentation and source code so that we can reproduce the error on our side?

I am afraid that this is hard/impossible todo. The application we have modifies the PPTX template we use using business data. It works fine on other inputs, but in this one specific case it does crashes during save. Is there a way that I can turn on more debugging of the , so you can get a better log of what it is doing?

@roicarmel
Have you tried the latest version of Aspose.Slides for Java 22.9 ? Perhaps this problem has already been fixed.

Tried the latest per your suggestion. Now I Get this

2022-10-02 19:51:59,548 ERROR [http-nio-8080-exec-5] c.s.d.s.r.GlobalExceptionHandler Api error occurred path=/v1/ui/BVA/export, exception=null
java.lang.NullPointerException: null
at com.aspose.slides.BaseSlide.getPresentation(Unknown Source)
at com.aspose.slides.Shape.getPresentation(Unknown Source)
at com.aspose.slides.Shape.getPresentation(Unknown Source)
at com.aspose.slides.Picture.getPresentation(Unknown Source)
at com.aspose.slides.Picture.setImage(Unknown Source)
at com.aspose.slides.PictureFrame.do(Unknown Source)
at com.aspose.slides.alh.do(Unknown Source)
at com.aspose.slides.aiq.do(Unknown Source)
at com.aspose.slides.aiq.do(Unknown Source)
at com.aspose.slides.aig.do(Unknown Source)
at com.aspose.slides.aim.do(Unknown Source)
at com.aspose.slides.ui.do(Unknown Source)
at com.aspose.slides.ui.do(Unknown Source)
at com.aspose.slides.b9.do(Unknown Source)
at com.aspose.slides.aq5.do(Unknown Source)
at com.aspose.slides.ali.do(Unknown Source)
at com.aspose.slides.ali.do(Unknown Source)
at com.aspose.slides.Presentation.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)

Copying Alec Belfer who is leading this issue on our end

@roicarmel
I added a ticket with ID SLIDESJAVA-38924 to our issue tracking system. We apologize for any inconvenience. Our development team will investigate the case. But to speed up the investigation we need a source presentation or/and code snippet to reproduce the problem.

[quote=“stanislav.miroshnichenko1, post:7, topic:252788”]
SLIDESJAVA

We managed to narrow down the problem. Attached is a program + file. just run the program with the
filename as parameter to get this exception.BeforeAndAfterCrash.zip (630.4 KB)

@roicarmel
Thank you for the additional information.
I passed the data to the development team.

Any news? Can you estimate when this issue will be addressed ?

@roicarmel
I have requested ETA from the development team.

@roicarmel,
A fix will be added to Aspose.Slides 22.11. This version will be published in the second half of November.

Hi Andrey, Thanks for the update. Since we have this problem with our clients, is there anything we can do with the template (change style, font, remove/add element etc), that will resolve this issue temporarily- so we don’t have to wait a month or so for the 22.11 release?

@roicarmel,
I need time to answer your question. I will return to you soon.

@roicarmel,
As far as I can see, the error in Aspose.Slides 22.9 is related to images. You can try to change something related to pictures in your presentation template.

The issues you have found earlier (filed as SLIDESJAVA-38924) have been fixed in Aspose.Slides for Java 22.11 (JAR).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.