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

Free Support Forum - aspose.com

NullPointerExceptions on Linux

Hi,


We are seeing NullPointExceptions using Aspose Slides 7.8 in our Linux environments.

The exceptions happen using the following calls:
  • sourcePresentation.cloneSlide(sourceSlide, destSlidePosition, destinationPpt, sortedList);
  • presentationToSave.save(output, SaveFormat.Pdf, pdfOptions);
  • BufferedImage image = slide.getThumbnail(scaleParameters.getScaleX(), scaleParameters.getScaleY());
  • destinationSlides.addClone(sourceSlide, destMasters.get_Item(masterIndex));
The first 3 issues happen when dealing with PPT files and the last one with PPTX files.

I’ve attached a log file with the full stacktraces in them. All the calls seem to have same method calls at the end of the stacktrace:

at com.aspose.slides.pbdb106a0.p9f36407e.h.for(Unknown Source)
at com.aspose.slides.pbdb106a0.p9f36407e.h.case(Unknown Source)
at com.aspose.slides.pbdb106a0.p9f36407e.h.try(Unknown Source)
at com.aspose.slides.pbdb106a0.p9f36407e.h.do(Unknown Source)
at com.aspose.slides.pbdb106a0.p9f36407e.j.do(Unknown Source)
at com.aspose.slides.pbdb106a0.p9f36407e.j.do(Unknown Source)
at com.aspose.slides.pbdb106a0.p9f36407e.j.do(Unknown Source)
at com.aspose.slides.adv.do(Unknown Source)
at com.aspose.slides.adt.(Unknown Source)
at com.aspose.slides.bwm.do(Unknown Source)
at com.aspose.slides.bwm.do(Unknown Source)
at com.aspose.slides.bwm.for(Unknown Source)
at com.aspose.slides.bwm.try(Unknown Source)
at com.aspose.slides.bwm.do(Unknown Source)
at com.aspose.slides.bwm.do(Unknown Source)
at com.aspose.slides.bwm.(Unknown Source)


Thanks, Ian.

Hi Ian,


I have observed the exception stack trace shared by you and request you to please share the sample presentation files and code with us that I may use on my end to reproduce the issue. I will be able to investigate the issue on the basis of availability of requested information.

Many Thanks,

Hi,



I’ve attached both the PPT and the PTTX files we are using.



Ian.

Hi Ian,


I have worked with the presentation files shared by you using Aspose.Slides for Java 7.8.0 in Ubuntu 10.4 environment and have not obtained any issue while cloning, generating thumbnail and saving to PDF for given PPT. For, PPTX, I have also not been able to observe the issue in slide cloning. Can you please share the Java details, Linux details and sample java file used on your end to reproduce the issue I will try my best to reproduce the issue on my end to help you out. I have also observed that for PPTX, you are using master slide for cloning. Please share the complete sample for PPTX cloning and also sample master file if used.

Many Thanks,

Hi,


The Linux being used ins’t Ubuntu but Debian (Linux Mint Debian), with the Oracle JDK 1.7.0_40 and 1.7.0_45.

Here’s the information from the computer:

  • Linux lembata 3.10-2-amd64 #1 SMP Debian 3.10.5-1 (2013-08-07) x86_64 GNU/Linux
  • java version "1.7.0_45"
  • Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
  • Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
I've attached a ZIP file with the source code and the POTX file used to create the presentation, but that file is not used with our code.

Ian.

Hi Ian,

Thanks for sharing the sample code and POTX. I have worked with the sample code shared using Aspose.Slides for Java 7.8.0 with Oracle JDK 1.7_45 and have not been able to observe the issue related to PPT presentations. I have observed the issue in pptxCloneSlideTest() method and have made necessary correction. Please try using the following sample code on your end and share if there is any incurring issue.

private static void pptxCloneSlideTest() {
String path="/home/mudasir/workspace/PPT/Test/";
String filename = path+“Presentation1.pptx”;
try {
final InputStream input = new FileInputStream(filename);
PresentationEx sourcePresentation = new PresentationEx(input);
SlideExCollection slides = sourcePresentation.getSlides();
int totalSlides=slides.size();
System.out.println("Slide Count: " + slides.size());

PresentationEx destinationPptx = new PresentationEx();

for (int slideNumber = 0; slideNumber < totalSlides; slideNumber++)
{
SlideEx sourceSlide = sourcePresentation.getSlides().get_Item(slideNumber);
MasterSlideEx sourceMasterSlide = sourceSlide.getLayoutSlide().getMasterSlide();

MasterSlidesEx destMasters = destinationPptx.getMasters();
int masterIndex = destMasters.addClone(sourceMasterSlide);

SlidesEx destinationSlides = destinationPptx.getSlides();
destinationSlides.addClone(sourceSlide, destMasters.get_Item(masterIndex));
}
// the newly created presentation is created with a slide collection of 1, so we need to remove the original slide
destinationPptx.getSlides().removeAt(0);
destinationPptx.getMasters().removeUnused(true);
} catch (Exception x) {
x.printStackTrace();
}
}
Please share your feedback if the issue is still incurring for Presentation1.ppt cloning and thumbnail rendering issue. I will add the issue in our issue tracking system for that as I am unable to reproduce the issues with Presentation1.ppt in my Linux (ubuntu) environment with Oracle JDK 1.7_45.

Many Thanks,

Thanks, I will try your changes. We are still seeing the PPT cloning issue an getThumbnail issue on our version of Linux (Debian).


Do you know what the issue we are seeing is? The obfuscated stacktrace obviously doesn’t give us any information. Is there any way we can get a debug or other version of the aspose slides that will help us pinpoint the issue from our end?


Ian.

Hi Ian,

Thanks for sharing the further details. I have created an issue with ID SLIDESJAVA-34138 in our issue tracking system to investigate the issue with PPT thumbnail generation. A separate issue with ID SLIDESJAVA-34139 has been created in our issue tracking system to investigate the issue of PPT slide cloning. I have not been able to reproduce the issue in Windows and Ubuntu Linux with same JDK as used on your end. Our development team will verify the issue on their end to investigate the cause of issue. One suggestion that I like to make is to please verify the fonts installed. It may be possible that some font may be cause of the issue and removing that font may resolve the things on your end.

Many Thanks,

Hi,


I’m attaching a text file containing a list of fonts on the machine exhibiting the error.

Have you made any progress on these 2 issues. We were seeing it on Linux Mint not Ubuntu.

Thanks, Ian.

Hi Ian,


Thanks for sharing the information with us. I have updated the issues status with new information shared by you. I regret to inform that at present the shared issues are pending for investigation owing to already added enterprise and priority support issues. As soon as the mentioned priorities issues will be addressed we will try our best to resolve these issues as well.

Many Thanks,

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.