Issue 41781 - closing loaded document with testtool doesn't terminate helper programs
Summary: closing loaded document with testtool doesn't terminate helper programs
Status: CONFIRMED
Alias: None
Product: utilities
Classification: Unclassified
Component: automation (show other issues)
Version: OOo 1.0.0
Hardware: All Windows XP
: P3 Trivial (vote)
Target Milestone: OOo Later
Assignee: AOO issues mailing list
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-01 10:53 UTC by b.osi.ooo
Modified: 2017-05-20 11:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
testcase (1.29 KB, text/txt)
2005-02-01 11:06 UTC, b.osi.ooo
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description b.osi.ooo 2005-02-01 10:53:05 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.
Comment 1 b.osi.ooo 2005-02-01 11:06:30 UTC
Created attachment 22084 [details]
testcase
Comment 2 gregor.hartmann 2005-02-11 08:43:30 UTC
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.
Comment 3 b.osi.ooo 2005-02-23 11:26:16 UTC
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

Comment 4 Mathias_Bauer 2005-02-23 12:41:25 UTC
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.
Comment 5 Mathias_Bauer 2005-02-23 12:44:07 UTC
BTW: you can use any version you want, the bug is reproducable in m80 also in
the way I described it.
Comment 6 Marcus 2017-05-20 11:33:15 UTC
Reset assigne to the default "issues@openoffice.apache.org".