Apache OpenOffice (AOO) Bugzilla – Issue 41781
closing loaded document with testtool doesn't terminate helper programs
Last modified: 2017-05-20 11:33:15 UTC
On win32 systems, load a document that uses ole-objects of the kind, that mspaint.exe will get loaded. (Internaly document is called TIPS2.DOC) To reproduce the bug you need to use the TestTool application: run attached bug.bas - A UNO connection to OOo is opened - The document gets loaded with loadComponentFromUrl() In the Windows Task Manager you see 11 times mspain.exe The mspain.exe executeables remain in memory forever, even if TestTool and OOo get closed! You have to terminate mspaint.exe with tskill. mspaint.exe gets terminated, if the same is done from an OOo Macro.
Created attachment 22084 [details] testcase
Seems to be a remote uno problem, please try to reproduce with other prog (i.e. 2 StarOffices connecting via remote uno) MBA said that it might be related to opening the DOC in another thread than main thread. But just a guess.
reproduceable without TestTool application; start OOo with -accept=socket,host=localhost,port=4711;urp on your windows machine - needs to be a src680m74 - in m80 mspaint.exe isn't used anymore start another OOo on other machine with the macro: Sub Main a = createUnoService("com.sun.star.connection.Connector") b = a.connect("socket,host=tbo-1,port=4711") c = createUnoService("com.sun.star.bridge.BridgeFactory") d = c.createBridge("","urp",b,NULL) e = d.getInstance("StarOffice.ServiceManager") f = e.createInstance( "com.sun.star.frame.Desktop" ) oDoc = f.loadComponentFromUrl("file:///V:/qatesttool/sun_framework/benchmarq/input/Writer/TIPS2.DOC","_blank",0, dimArray()) oDoc.close(true) End Sub adjust the path of TIPS2.DOC run
Mikhail, you can reproduce it a little bit easier: Start your office with the command line "-accept=socket,host=localhost,port=4711;urp". Open/Create a Writer document with an MS Paint Object and activate the object by doubleclick. Start another office on your machine and execute the following macro there: Sub TestClose a = createUnoService("com.sun.star.connection.Connector") b = a.connect("socket,host=tbo-1,port=4711") c = createUnoService("com.sun.star.bridge.BridgeFactory") d = c.createBridge("","urp",b,NULL) e = d.getInstance("StarOffice.ServiceManager") f = e.createInstance( "com.sun.star.frame.Desktop" ) oDoc = f.currentComponent oDoc.close(true) End Sub You will find that the close() call is executed properly and you will see that the function "OleComponent::CloseObject()" is called and executed also properly, but to no avail: the MS Paint Window is not closed. I'm afraid that this might be a threading issue, the activation (creation of Window) and the deactivation (closing of Window) are done in different threads. I general I don't see this as an important issue, so I change the target.
BTW: you can use any version you want, the bug is reproducable in m80 also in the way I described it.
Reset assigne to the default "issues@openoffice.apache.org".