Apache OpenOffice (AOO) Bugzilla – Issue 126131
Open office process not releasing file lock on temporary files.
Last modified: 2015-03-13 05:21:39 UTC
We recently upgraded to open office 4.0.1/4.1.1 version(Apache_OpenOffice_incubating_4.1.1_Win_x86_install_en-US.exe).We installed it and and connect to open office 4.1.1 with UNO Java API. We used to start the open office from commnad prompt by issue the below command. Our application used to embed image in word report(.doc file) using UNO Java API. Original image is copied to temporary location and after embedding to word report we used to delete the temporary file from temporary location. After upgrading open office version from 3.3.0 to 4.0.1/4.1.1. We observed that the open office process is holding lock on these temporary files. The problem started after upgrading open office version from 3.3.0. The issue happens in windows environment only. The below is the code snippet which we use to embed the images.Open office is holding lock on the file as soon as the below statement is executed.The file is delete-able only after killing the open office process.PFA for screenshot of file deletion. xBitmapContainer.insertByName("someID", url); Code Snippet: ******************************************** xBitmapContainer = (XNameContainer) UnoRuntime.queryInterface( XNameContainer.class, xMSF.createInstance( "com.sun.star.drawing.BitmapTable")); xImage = (XTextContent) UnoRuntime.queryInterface( XTextContent.class, xMSF.createInstance( "com.sun.star.text.TextGraphicObject")); XPropertySet xProps = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, xImage); xBitmapContainer.insertByName("someID", url); internalURL = AnyConverter.toString(xBitmapContainer .getByName("someID")); xProps.setPropertyValue("AnchorType", com.sun.star.text.TextContentAnchorType.AT_PARAGRAPH); xProps.setPropertyValue("GraphicURL", internalURL); textCursor.getText().insertTextContent(textCursor, xImage, false); XGraphic xGraphic = getGraphicFromURL(xRemoteContext.get("8100")==null?xRemoteContext.get("8600"):xRemoteContext.get("8600"), url); xProps.setPropertyValue("Graphic", xGraphic); // remove the helper-entry *** xBitmapContainer.removeByName("someID");
Created attachment 84538 [details] Lock screenshot Lock screenshot
I don't understand your problem. You shouldn't need to kill the AOO process. Lock file disappears if you close document properly. First, ask your question on support forum or API mailing list. Other users can be help you and confirm if you found a bug.
(In reply to oooforum from comment #2) > I don't understand your problem. You shouldn't need to kill the AOO process. > Lock file disappears if you close document properly. > > First, ask your question on support forum or API mailing list. > Other users can be help you and confirm if you found a bug. The temporary files usually deletable as soon as processing is finished in Open office 3.3 version. We just upgraded the open office version to 4.1.1 and observed that file delete operation failed as open office process holding the lock.In this case the temporary directory piling up with uncleared files ad occupying server space. It is problem with open office upgrade only. Killing open office process release the lock on temporary image files.
This issue is blocking our upgrade to 4.1.1 version of open office. Due to the below security issues, we are forced to upgrade to 4.1.1 version. CVE Details:- CVE-2012-2334 :https://www.openoffice.org/security/cves/CVE-2012-2334.html CVE-2012-2149 :https://www.openoffice.org/security/cves/CVE-2012-2149.html CVE-2012-1149 :https://www.openoffice.org/security/cves/CVE-2012-1149.html Please help us to resolve the issue.
We are ready to provide the more details or information to reproduce the issue. The file is under lock after executing the below statement . xBitmapContainer.insertByName("someID", url); After processing we are removing the someID by the below statement and it should remove the lock but retaining the lock. xBitmapContainer.removeByName("someID");