Issue 125578 - soffice.exe instances hang when started by program running by windows task scheduler in background
Summary: soffice.exe instances hang when started by program running by windows task sc...
Status: UNCONFIRMED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 4.1.2
Hardware: All Windows 7
: P3 Normal with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-04 14:04 UTC by matafagafo
Modified: 2016-12-22 01:41 UTC (History)
2 users (show)

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


Attachments
Simple VBS script file to reproduce the issue (390 bytes, text/x-vbscript)
2014-09-04 14:04 UTC, matafagafo
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description matafagafo 2014-09-04 14:04:58 UTC
Created attachment 83928 [details]
Simple VBS script file to reproduce the issue

I'm facing some odd problem running some scripts that use OO to convert files, when this scripts are running by Windows task scheduler after upgrade from OO 3.4.1 to OO 4.0.0.
We did a lot of tests and figured out that the problem happens when we set the 
"Run whether user is logged or not" option in the task scheduler.
With the "Run whether user is logged or not" on, the soffice.exe and soffice.bin are started but they appears to not responding to script.

I wrote a simple sample VBS script code (attached) that basically just create a ServiceManager and record the results in a log file, bellow the sequence of steps to show the problem:
1 save my script file in some temp directory
2 check/correct the log file path
3 create a simple task in Windows Task scheduler to run the script saved in step 1, be sure that the option "Run only when user is logged on" is on (it's the the default configuration for a new task)
4 run the task
5 look at the log file, the message "All OK!" shows that the ServiceManager instance creation was successful
6 update the task created in step 3, and set "Run whether user is logged or not" to on
7 run the task
8 look at the log file, the message "An error occurred" shows that the ServiceManager instance creation was NOT successful !

Running the task with "Run whether user is logged or not" several times result in many instances of soffice.exe and soffice.bin stuck in the system

We need use the "Run whether user is logged or not" option because we need to run this scripts on a server.
I can reproduce this behaviour in many computers running Windows 7 32 and 64 bits and Windows 2008 R2
I can reproduce the problem not only with VBS scripts, it happens using other programing languages too. 

The problem DON'T happens with OO 3.4.1, it begins with OO 4.0.0+
Comment 1 Oliver Brinzing 2014-09-04 16:58:17 UTC
.
Comment 2 matafagafo 2015-11-24 18:46:25 UTC
Just tested with 4.1.2 and the problem persist.

I tested running OO 4.1.2 in Windows and the problem is still there.
Comment 3 orcmid 2015-11-24 21:10:46 UTC
(In reply to matafagafo from comment #2)
> Just tested with 4.1.2 and the problem persist.
> 
> I tested running OO 4.1.2 in Windows and the problem is still there.

When it worked with AOO 3.4, was that on the same Windows 7 configuration?

(just checking)
Comment 4 matafagafo 2015-11-25 18:49:22 UTC
(In reply to orcmid from comment #3)
> When it worked with AOO 3.4, was that on the same Windows 7 configuration?
> 
> (just checking)

Yes, I installed a fresh 3.4 version and it worked (no problems running as a scheduled task). Then I removed the 3.4 version and installed a fresh 4.1 version on the same computer. In the 4.1 version the problem happens.

If you need more test, just ask, I'm available to help in this.
Comment 5 matafagafo 2016-12-21 19:21:12 UTC
The same still happens with AOO 4.1.3 on Windows 10
Comment 6 damjan 2016-12-22 01:41:54 UTC
The best way to narrow down the problem would be to attach a debugger to the hung OO instance and get a stack trace of all threads. Are you able to do that?