nsIProcess fails with error NS_ERROR_ALREADY_INITIALIZED

RESOLVED INVALID

Status

()

Core
XPCOM
--
major
RESOLVED INVALID
9 years ago
8 years ago

People

(Reporter: Mime Čuvalo, Unassigned)

Tracking

({regression, testcase})

Trunk
x86
Windows XP
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.31 Safari/530.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b99) Gecko/20090605 Firefox/3.5b99

Running a process once will work.  However, any subsequent tries will fail giving the error:
[Exception... "Component returned failure code: 0xc1f30002 (NS_ERROR_ALREADY_INITIALIZED) [nsIProcess.init]"  nsresult: "0xc1f30002 (NS_ERROR_ALREADY_INITIALIZED)"  location: "JS frame :: file:///C:/nsIProcess_test.html :: testProcess :: line 10"  data: no]

This is breaking key functionality right now in FireFTP.  In FireFTP, you can use "Open With" to open a file with an application of your choice.  This works fine in Firefox 3.0.11

I will submit a test case showing the problem in a sec.

Reproducible: Always
(Reporter)

Comment 1

9 years ago
Created attachment 382925 [details]
Test case showing the problem

1.) Click "Run Notepad".  Notepad will open.
2.) Close Notepad.
3.) Click "Run Notepad" again - nsIProcess will throw an exception.

This is a regression as this works as expected in Firefox 3.0
Regression range: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=57b3bf2ebce3&tochange=f2816d1a110d
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9.1?
Keywords: regression, testcase
Version: unspecified → Trunk
In the improvements to nsIProcess for 3.5 we made them non-reusable. You'll need to create a new instance to run a new process.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WONTFIX
Flags: blocking1.9.1?
(Reporter)

Comment 4

9 years ago
Ahh, I see - so instead of getService you have to use createInstance now.  Gotcha.  Thank you for clearing that up - sorry to raise an alarm.
Resolution: WONTFIX → INVALID
Actually you should have always been using createInstance
Duplicate of this bug: 541929
You need to log in before you can comment on or make changes to this bug.