Closed Bug 485379 Opened 15 years ago Closed 15 years ago

nsIProcess.init()fails in the second execution

Categories

(Firefox :: Extension Compatibility, defect)

3.5 Branch
x86
Windows XP
defect
Not set
trivial

Tracking

()

RESOLVED WONTFIX

People

(Reporter: alice0775, Unassigned)

Details

(Keywords: regression)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090326 Firefox/3.5.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090326 Minefield/3.6a1pre ID:20090326050203

nsIProcess.init()fails in the second execution.

Using nsIProcess ( https://developer.mozilla.org/en/Code_snippets/Running_applications#Using_nsIProcess )
It fails in the second execution of "Using nsIProcess." 

IE View Lite 1.3.3 ( https://addons.mozilla.org/ja/firefox/addon/1429 )
It fails in the second execution of "View This Page in IE" also.

Reproducible: Always

Steps to Reproduce:
1.Start Minefield with NEW profile.
2.Install IE View Lite 1.3.3 ( https://addons.mozilla.org/ja/firefox/addon/1429 )
3.Execute "View This Page in IE" in the context menu.
4.Yoou confirm that IE executed.
5.Kill IE.
6.Execute "View This Page in IE" in the context menu AGAIN.

Actual Results:  
IE does not start. 

And you can see the following error message in error console.  
Error: Component returned failure code: 0xc1f30002 (NS_ERROR_ALREADY_INITIALIZED) [nsIProcess.init]
Source file: chrome://ieviewlite/content/ieview.js
Line: 48

Expected Results:  
IE should also start the second time. 
nsIProcess.init() should be performed also in the second time. 


Regression range of Tunk build:
Works fine:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090309 Firefox/3.2a1pre ID:20090309032542

Broken:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090310 Firefox/3.2a1pre ID:20090310044308

Changesets between the abobe range:
http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2009-03-09+03%3A25%3A42&enddate=2009-03-10+04%3A43%3A08


Regressio range of Branch build:

Works fine:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090324 Shiretoko/3.5b4pre ID:20090324045343

Broken:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090325 Shiretoko/3.5b4pre ID:20090325050941

Changesets between the abobe range:
http://hg.mozilla.org/releases/mozilla-1.9.1/pushloghtml?startdate=2009-03-24+04%3A53%3A43&enddate=2009-03-25+05%3A09%3A41

Doubtful check-in is Bug 442393.
Keywords: regression
Version: unspecified → 3.1 Branch
The following code will fail in second time.
(Such a code is used by IE ViewLite.  )
// create an nsIProcess
var process = Components.classes["@mozilla.org/process/util;1"]
                        .getService(Components.interfaces.nsIProcess);
process.init(file);

In following codes, the second time is also successful. 
// create an nsIProcess
var process = Components.classes["@mozilla.org/process/util;1"]
                        .createInstance(Components.interfaces.nsIProcess);
process.init(file);


Therefore, It may be the cause that the extentension does not meet a newest syntax.
(In comment #1)
Sorry
s/extentension/extension
Severity: major → trivial
Component: General → Extension Compatibility
QA Contact: general → extension.compatibility
This is by design, nsIProcess object cannot be reused any more.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
In the comment 1 by Alice, the code makes reference to getService and createInstance.  I assume that these should both be createInstance.  Either way, I have tried both and have been unable to kill and re-run a process.
You need to log in before you can comment on or make changes to this bug.