when cloning slides containing certain types of hyperlinks into a new presentation a write error is encountered when trying to write the new presentation.
com.aspose.slides.PptWriteException: Error writing presentation to a stream. at com.aspose.slides.Presentation.write(SourceFile:739) at com.altuscorp.tests.PPTest.main(PPTest.java:87) Caused by: java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at com.aspose.slides.obfuscated.na.for(SourceFile:94) at com.aspose.slides.obfuscated.ig.try(SourceFile:154) at com.aspose.slides.obfuscated.mf.do(SourceFile:68) at com.aspose.slides.Presentation.write(SourceFile:712) ... 1 more
i am attaching a sample pres containing a problematic slide that when cloned into a new pres throws the error. this is a production blocker for us, so please let me know a good workaround or when we can expect a fix.
We also have this error, and it is not corrected by the very latest version (aspose-slides-2.1.0.0-20091222.jar). The stack trace we have is:
INFO: com.aspose.slides.PptWriteException: Error writing presentation to a stream. at com.aspose.slides.Presentation.write(SourceFile:739) at com.vivaxis.questionnaire.dataexplorer.tabulation.powerpoint.slideCloner.SlidesCloner.saveCloning(SlidesCloner.java:974) at com.vivaxis.dbfeeder.dbfeedergraph.ChartUtils$ChartDataSaver.closeSaveChartData(ChartUtils.java:474) at com.vivaxis.dbfeeder.dbfeedergraph.MBAChartsCalculation.computeDataforCharts(MBAChartsCalculation.java:1006) at com.vivaxis.dbfeeder.dbfeedergraph.MBAChartsCalculation.generateCharts(MBAChartsCalculation.java:1161) at com.vivaxis.dbfeeder.dbfeedergraph.DynamicChartsParameterGateway.generateNextStapeCharts(DynamicChartsParameterGateway.java:1172) at org.apache.jsp.tool.mba.generateCharts_jsp._jspService(generateCharts_jsp.java:1633) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:613) Caused by: java.lang.ArrayIndexOutOfBoundsException: 109 at com.aspose.slides.obfuscated.wb.try(SourceFile:111) at com.aspose.slides.obfuscated.wb.for(SourceFile:105) at com.aspose.slides.obfuscated.wb.int(SourceFile:175) at com.aspose.slides.obfuscated.ap.do(SourceFile:181) at com.aspose.slides.obfuscated.ap.do(SourceFile:113) at com.aspose.slides.Presentation.write(SourceFile:737)
Would it be possible to have a look quickly on this as we have currently some production tasks that can’t work because of this ?
I have been successfully able to verify the issue mentioned in this thread with the given presentation file. For reference the output PPT file is also attached. I have used Aspose.Slides for Java 2.1.1. Please share the source presentation file so that we can verify the issue further.
Thanks for your quick answer. You are speaking about a 2.1.1 version, but I can only see a 2.1.0 version on the web site: would it be possible to get this version and see if it corrects the problem for me ?
Also, what do you mean by “share the source presentation file” ? Is it the ppt file that we clone the slides from ? If yes, do you mean that the problem could lie in this file and not in the java code ?
First of all accept my apologies for mentioning the incorrect version of Aspose.Slides for Java. I have tested the presentation file given in first post of this thread with Aspose.Slides for Java 2.1.0 and I have also shared the resultant PPT file in my previous post.
For second part of your question, I am not sure whether it's a problem in code or presentation itself. I will need the original presentation from where slide was taken for cloning. Moreover, I will also request to provide me the code snippet that you are using for investigating the issue.
Attached is the ppt template we use to create our final presentation. I’m not sure I will be able to provide the code we are currently using to generate the presentation, as there is a lot, and lots of dependencies too I will let you know how it comes.
I have tried to access the PPT file that you have provided. I have been successfully able to open and clone each single slide of the file. Please share some more details about problem and also share the code snippet with us.
Test case 1: after some testings, we realized that when we didn’t setup the license we didn’t have the error, but when we did set the license we ended up with the error ! That is with the aspose-slides-1.9.3.2.jar version, for which we have a license.
Test case 2: when we try with aspose-slides-2.1.0.0-20091222.jar, we can only test without the license because the one we have for 1.9.3.2 doesn’t work with 2.1.0.0. And in that case too, we got the error.
Have you an explanation regarding test case 1 ? It seems very strange for us that using the license leads to the error, and not using it doesn’t (but in this case, of course, we have the “This is a demo” text added to all the slides).
I have worked on both of your mentioned scenarios and am successfully able to clone all the slides in your's provided presentation. I am able to generate PPT file with or without license setting for both Aspose.Slides for Java 1.9.3.2 and 2.1.0.0. For your kind reference, all the generated presentations are attached.
I am using JDK 1.6, so, please try this as well. If the problem persists then please share your license file, so that we may investigate the issue further. Please follow the guidelines for sharing license available here.