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

Free Support Forum - aspose.com

Negative seek offset Error

Hi,



In an attempt to open a PPTX file the following baffling error comes up:



It throws the exception when this code is encountered pres = CreateObject(“java”, “com.aspose.slides.Presentation”).init(“E:\data\hall.pptx”);





java.io.IOException: Negative seek offset at java.io.RandomAccessFile.seek(Native Method) at com.aspose.slides.pa5e0ff62.pf4dd765c.p2cbca448.pa2137a2a.c.do(Unknown Source) at com.aspose.slides.pa5e0ff62.pf4dd765c.p2cbca448.pa2137a2a.c.if(Unknown Source) at com.aspose.slides.pa5e0ff62.pf4dd765c.p2cbca448.pa2137a2a.c.do(Unknown Source) at com.aspose.slides.pa5e0ff62.pbdb106a0.p7cce53cf.ac.seek(Unknown Source) at com.aspose.slides.Presentation.do(Unknown Source) at com.aspose.slides.Presentation.if(Unknown Source) at com.aspose.slides.Presentation.(Unknown Source) at com.aspose.slides.Presentation.(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source)



Many thanks,

Hi Adam,

I have observed the stack trace shared by you and request you to please try using Aspose.Slides for Java 15.4.0 on your end. If there is still an issue then please share the sample code and presentation file with us. I will investigate the issue further on my end to help you out.

Many Thanks,

Many thanks for your reply, I’ll download and get back to you.

Hi,



I’ve just upgraded to 15.4.0. I now get “Not enough data in stream” error. Details below: The file is attached, so I’ll keep it private.



My Code:







<!— First of all Initialize License —>



<cfset LicfileI = LicFile.init(JavaCast(“string”,"#application.asposeroot#Aspose.Slides.lic"))>



<cfset license.setLicense(LicfileI)>



<!— Create a reference to an aspose object —>



<!— Create the object and initialize —>



<!— call Tags Class to uniquely tag individual slides —>







/* scope the file name*/

variables.sFileName = application.filedisplay & “” & id & “” & RsGetFile.fileName;



pres = CreateObject(“java”, “com.aspose.slides.Presentation”).init("#variables.sFileName#");



slds=pres.getSlides();

sldsCnt=slds.size();

/* get_jmage(); starts from 0, so minust the total by 1 */

sldsCnt= Evaluate(sldsCnt-1);



//loop over by the number of slides and create large jpgs slds.get_Item(0,) starting from 0

for(i = 0; i <= sldsCnt; i++)

{



//Slide = slds.get_Item(javacast(“int”, i));



variables.slideTagValue = variables.DownloadTitleList;

variables.slideAddTag = Slide.tags.add(“GroupID”,"#variables.slideTagValue#");



//Then write to the new file

saveFormat=CreateObject(“java”, “com.aspose.slides.SaveFormat”);

//Write the presentation to disk

pres.save("#variables.sFileName#", saveFormat.Pptx);

}









Not enough data in stream.





lass com.aspose.slides.ms.core.System.Drawing.imagecodecs.pf4dd765c.pa5e0ff62.e: Not enough data in stream. com.aspose.slides.ms.core.System.Drawing.imagecodecs.pf4dd765c.pafdec700.a.for(Unknown Source) com.aspose.slides.ms.core.System.Drawing.imagecodecs.pf4dd765c.pafdec700.a.if(Unknown Source) com.aspose.slides.ms.core.System.Drawing.imagecodecs.pf4dd765c.pafdec700.a.do(Unknown Source) com.aspose.slides.ms.core.System.Drawing.imagecodecs.jpeg.b.do(Unknown Source) com.aspose.slides.ms.core.System.Drawing.imagecodecs.jpeg.b.getNumImages(Unknown Source) com.aspose.slides.ms.core.System.Drawing.pf4dd765c.a.if(Unknown Source) com.aspose.slides.ms.core.System.Drawing.pf4dd765c.a.do(Unknown Source) com.aspose.slides.ms.core.System.Drawing.pf4dd765c.a.try(Unknown Source) com.aspose.slides.ms.pbdb106a0.p6a2feef8.b.do(Unknown Source) com.aspose.slides.ms.pbdb106a0.p6a2feef8.b.(Unknown Source) com.aspose.slides.ms.pbdb106a0.p6a2feef8.b.(Unknown Source) com.aspose.slides.p883e881b.ak.do(Unknown Source) com.aspose.slides.ImageCollection.do(Unknown Source) com.aspose.slides.awc.do(Unknown Source) com.aspose.slides.awd.if(Unknown Source) com.aspose.slides.awd.do(Unknown Source) com.aspose.slides.Presentation.int(Unknown Source) com.aspose.slides.Presentation.if(Unknown Source) com.aspose.slides.Presentation.(Unknown Source) com.aspose.slides.Presentation.(Unknown Source) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) java.lang.reflect.Constructor.newInstance(Unknown Source) coldfusion.runtime.java.JavaProxy.CreateObject(JavaProxy.java:166) coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:80) coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2428) cfaction_flash_manager2ecfm1452580389._factor33(E:\WEBDEV\5022623_5_Etro_Slides\www\5022623_5_Etro_Slides\admin\includes\action_flash_manager.cfm:718) cfaction_flash_manager2ecfm1452580389._factor98(E:\WEBDEV\5022623_5_Etro_Slides\www\5022623_5_Etro_Slides\admin\includes\action_flash_manager.cfm:607) cfaction_flash_manager2ecfm1452580389.runPage(E:\WEBDEV\5022623_5_Etro_Slides\www\5022623_5_Etro_Slides\admin\includes\action_flash_manager.cfm:1) coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:446) coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2795) cfflash_manager2ecfm476431901.runPage(E:\WEBDEV\5022623_5_Etro_Slides\www\5022623_5_Etro_Slides\admin\flash_manager.cfm:9) coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:446) coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) coldfusion.filter.IpFilter.invoke(IpFilter.java:64) coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:430) coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) coldfusion.filter.PathFilter.invoke(PathFilter.java:112) coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58) coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:151) coldfusion.CfmServlet.service(CfmServlet.java:219) coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422) org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:199) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Unknown Source) at com.aspose.slides.ms.core.System.Drawing.imagecodecs.pf4dd765c.pafdec700.a.for(Unknown Source) at com.aspose.slides.ms.core.System.Drawing.imagecodecs.pf4dd765c.pafdec700.a.if(Unknown Source) at com.aspose.slides.ms.core.System.Drawing.imagecodecs.pf4dd765c.pafdec700.a.do(Unknown Source) at com.aspose.slides.ms.core.System.Drawing.imagecodecs.jpeg.b.do(Unknown Source) at com.aspose.slides.ms.core.System.Drawing.imagecodecs.jpeg.b.getNumImages(Unknown Source) at com.aspose.slides.ms.core.System.Drawing.pf4dd765c.a.if(Unknown Source) at com.aspose.slides.ms.core.System.Drawing.pf4dd765c.a.do(Unknown Source) at com.aspose.slides.ms.core.System.Drawing.pf4dd765c.a.try(Unknown Source) at com.aspose.slides.ms.pbdb106a0.p6a2feef8.b.do(Unknown Source) at com.aspose.slides.ms.pbdb106a0.p6a2feef8.b.(Unknown Source) at com.aspose.slides.ms.pbdb106a0.p6a2feef8.b.(Unknown Source) at com.aspose.slides.p883e881b.ak.do(Unknown Source) at com.aspose.slides.ImageCollection.do(Unknown Source) at com.aspose.slides.awc.do(Unknown Source) at com.aspose.slides.awd.if(Unknown Source) at com.aspose.slides.awd.do(Unknown Source) at com.aspose.slides.Presentation.int(Unknown Source) at com.aspose.slides.Presentation.if(Unknown Source) at com.aspose.slides.Presentation.(Unknown Source) at com.aspose.slides.Presentation.(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at coldfusion.runtime.java.JavaProxy.CreateObject(JavaProxy.java:166) at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:80) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2428) at cfaction_flash_manager2ecfm1452580389._factor33(E:\WEBDEV\5022623_5_Etro_Slides\www\5022623_5_Etro_Slides\admin\includes\action_flash_manager.cfm:718) at cfaction_flash_manager2ecfm1452580389._factor98(E:\WEBDEV\5022623_5_Etro_Slides\www\5022623_5_Etro_Slides\admin\includes\action_flash_manager.cfm:607) at cfaction_flash_manager2ecfm1452580389.runPage(E:\WEBDEV\5022623_5_Etro_Slides\www\5022623_5_Etro_Slides\admin\includes\action_flash_manager.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:446) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2795) at cfflash_manager2ecfm476431901.runPage(E:\WEBDEV\5022623_5_Etro_Slides\www\5022623_5_Etro_Slides\admin\flash_manager.cfm:9) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:446) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.IpFilter.invoke(IpFilter.java:64) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:430) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:151) at coldfusion.CfmServlet.service(CfmServlet.java:219) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:199) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)

Hi Adam,


I have worked with the presentation file shared by you and have been able to observe the issue specified. An issue with ID SLIDESJAVA-34901 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 resolved.

We are sorry for your inconvenience,

Hi Mudassir,

Many thanks for looking into this and being able to replicate the error. Do you have an estimate of when the issue might be solved or do you have an average time of when issues like these are solved? If I know a time estimate it’ll be much easier to manage expectations internally.

Thanks,

Adam

Hi Adam,

I like to share that the issue has just been created in our issue tracking system and is pending for investigation. Our product team will schedule the issue for investigation on its due turn and after that we will be able to to provide any estimation for resolution of the issue. I will really appreciate your patience till the time our product team will schedule and investigate the issue.

Many Thanks,

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


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