Aspose latest jars are creating files in /tmp folder and does not remove them after completion of file conversion!

Hi,


The new Asponse jar creates file in /tmp folder and does not remove it after the conversion is completed and over time this grows and the disk runs out of space. Please fix the jar to delete the temp files after conversion is completed.


Hi Upendra,

Thanks for contacting support. Could you please share that which Aspose Java API are you using? It will help us to be specific. We're looking forward to helping you.

No Idea which api but here is the file /tmp/+~JF8397498278673084046.tmp

Hi Upendra,


OK can you please share which API’s you are using and what operations you are perform and may be we can try figuring out the reasons behind the creation of these Temp files.

Hi we are experiencing the same issue and we are using the following jars:


com.aspose:cells:8.3.1
com.aspose:pdf:9.7.0:jdk16
com.aspose:slides:14.10.0
com.aspose:words:14.11.0:jdk16

This was not happening in older versions. Some of these tmp files (if not all) appear to be font files extracted during the conversion process.

We believe these may be left when the application is not cleanly shut down - however, when these shutdowns occur, document conversion has well and truly finished (and we would expect these files to be removed at that stage).
This issue is still occuring with the latest libraries:

  • Slides: 15.1.0-jdk18
  • Words: 15.1.0-jdk16
  • Pdf: 15.1.0-jdk16
  • Cells: 8.3.2

We believe that when the application starts up, a number of files (i.e.fonts) are loaded into /tmp, possibly via the FontsLoader. Upon abnormal termination, these files are left behind, and are not cleaned up. When our application is restarted, there is no checking for the existence of these files. We don't believe this issue occurred with older versions of the library.

We do the following procedure when starting up the application to load the fonts:

val folderFontSource = new FolderFontSource(fontPath, true)
val fontSources = FontSettings.getFontsSources.toList
val updatedFontSources = (folderFontSource :: fontSources).toArray[FontSourceBase]
FontSettings.setFontsSources(updatedFontSources)
FontSettings.setDefaultFontName(defaultFontName)


Hi Upendra,


Thanks for sharing the details.

We are looking into this matter and will get back to you soon. We are sorry for your inconvenience.

Hi Upendra,


Thanks for your inquiry. Aspose.Words for Java does not check for existing temp files upon loading/saving a Word document. However, in case when any exception occurs (abnormal termination), you can explicitly call garbage collector GC in finally block to avoid any such problems. I hope, this helps.

Also, we have just release a new version of Aspose.Words for Java 15.2.0, can you please upgrade to the latest version and see how it goes on your end.
http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/default.aspx

Best regards,