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

Free Support Forum - aspose.com

Exception "Null Pointer" thrown when saving a PPTX using Aspose.Slides for Java

I have been using Aspose for over 3 months with no problems.

Today the presentation.save started throwing a ‘NullPointerException’. Normally the save exceptions are detailed and I can chase down the issues quickly.

  • I rolled back the latest changes
  • Commented out all chart processing so just to open and save
  • Checked the folder permissions
  • Created a blank presentation to save to an alternate location
  • Re-downloaded the maven packages
  • Tried the aspose slides examples (these previously worked)
  • Created an empty project with just creating and saving an empty project.
  • Tried versions from 18.1 to 18.11

All these produced the same Null Pointer Exception. Below is the stacked trace of the error from the aspose examples project:

image.png (87.9 KB)

Simple sample project:

SlidesTest.zip (6.8 KB)

Any help much appreciated.
Thanks

@rcooperstagwell,

I have observed the image shared by you as well as sample example. In your sample code you are simply creating empty presentation and saving it. Where as in image file shared you are performing some chart operations and then saving it. Please provide the same application that you are using to reproduce the issue. Please also share the Operating System and Java details on your end as well.

Thanks for replying quickly.

I am on a Windows 10 machine using Java 10.

Output from SlidesTest:
image.png (83.1 KB)

@rcooperstagwell,

I have worked with blank presentation and loaded that from one location and saved that to another but i am unable to observe any issue. I have performed this test on window 10 environment using Aspose.Slides for Java 18.11. Can you please share sample application as my colleague already requested to reproduce issue. I have also shared my generated result with you. Please check attachment.testsave.zip (20.5 KB)
testsave2.zip (20.8 KB)

Sure here is the project SlidesTest.zip (6.8 KB)

Thanks
Mark

@rcooperstagwell,

I have worked with sample project shared by you using Aspose.Slides both version 18.10 and 18.11 and unable to observe any issue. I have performed this test on Window 10 environment with Java 10. I have also shared my result which i have generated using your application. Please check attachment.Test.zip (20.7 KB)

Thanks for looking into this. I am certain the code correct, but I am still seeing the following error:

"C:\Program Files\Java\jdk-11.0.1\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:53219,suspend=y,server=n -javaagent:C:\Users\MARKCO~1\AppData\Local\Temp\captureAgentjars\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\SandBox\SlidesTest\target\classes;C:\SandBox\SlidesTest\lib\aspose-slides-18.11-jdk16.jar;C:\Users\Mark Cooper\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\183.4588.61\lib\idea_rt.jar" SlidesTestApplication
Connected to the target VM, address: '127.0.0.1:53219', transport: 'socket'
Exception in thread "main" java.lang.NullPointerException
	at com.aspose.slides.internal.j1.class.do(Unknown Source)
	at com.aspose.slides.internal.j1.class.new(Unknown Source)
	at com.aspose.slides.internal.j1.class.for(Unknown Source)
	at com.aspose.slides.internal.j1.class.do(Unknown Source)
	at com.aspose.slides.internal.j8.for.do(Unknown Source)
	at com.aspose.slides.internal.ey.long.if(Unknown Source)
	at com.aspose.slides.internal.ey.long.case(Unknown Source)
	at com.aspose.slides.internal.ey.goto.do(Unknown Source)
	at com.aspose.slides.internal.ey.goto.<init>(Unknown Source)
	at com.aspose.slides.internal.ey.goto.<init>(Unknown Source)
	at com.aspose.slides.internal.ey.goto.<init>(Unknown Source)
	at com.aspose.slides.internal.lw.public.do(Unknown Source)
	at com.aspose.slides.ns.do(Unknown Source)
	at com.aspose.slides.ns.do(Unknown Source)
	at com.aspose.slides.ns.do(Unknown Source)
	at com.aspose.slides.ai5.do(Unknown Source)
	at com.aspose.slides.nb.do(Unknown Source)
	at com.aspose.slides.ko.do(Unknown Source)
	at com.aspose.slides.ny.do(Unknown Source)
	at com.aspose.slides.akr.for(Unknown Source)
	at com.aspose.slides.akr.boolean(Unknown Source)
	at com.aspose.slides.c3.do(Unknown Source)
	at com.aspose.slides.BaseSlide.do(Unknown Source)
	at com.aspose.slides.Slide.do(Unknown Source)
	at com.aspose.slides.Slide.do(Unknown Source)
	at com.aspose.slides.acx.try(Unknown Source)
	at com.aspose.slides.acx.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 SlidesTestApplication.main(SlidesTestApplication.java:11)

Any light you can shine on why this might have started happening when it was working great, would be much appreciated.

All that is created is a PPT file with zero bytes.

Hi this error appears to have happened before: [URGENT] com.aspose.slides.Presentation.save() java.lang.ArrayIndexOutOfBoundsException: 33

There does not appear to be a solution. The link just goes to the downloads page, but considering this is happening with the latest version this does not appear to be solved.

@rcooperstagwell,

I have observed your comments. An issue with ID SLIDESJAVA-37457 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

Due to no response. I had to format my computer to solve this issue.

@rcooperstagwell,

I regret to share that the issue specified is not yet resolved because issue is added recently in our issue tracking system. Actually, in Aspose.Slides forum the issues are selected for investigation on first come first serve basis. Also the first priority for scheduling and resolution is given to paid Enterprise and priority support customers. Then Aspose.Slides normal or free support customers issues are scheduled and resolved on first come and first come serve basis. I will share the further information with you as soon as the issue will be resolved.

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