###!!! ASSERTION: You are calling CreateInstance "{b148eed2-236d-11d3-b35c-00a0cc3c1cde}" when a service for this CID already exists!: 'Error', file r:/mozilla/xpcom/components/nsComponentManager.cpp, line 1877

RESOLVED DUPLICATE of bug 277853

Status

SeaMonkey
UI Design
--
trivial
RESOLVED DUPLICATE of bug 277853
13 years ago
9 years ago

People

(Reporter: timeless, Assigned: ted)

Tracking

({assertion})

Trunk
x86
Windows XP
assertion

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
###!!! ASSERTION: You are calling CreateInstance
"{b148eed2-236d-11d3-b35c-00a0cc3c1cde}" when a service for this CID already
exists!: 'Error', file r:/mozilla/xpcom/components/nsComponentManager.cpp, line 1877

R:\mozilla\dbg-i586-pc-msvc\dist\bin\components>grep b148ee compreg.dat
{b148eed2-236d-11d3-b35c-00a0cc3c1cde},,,,rel:gkwidget.dll
@mozilla.org/sound;1,{b148eed2-236d-11d3-b35c-00a0cc3c1cde}

issue: components should generally be treated as either singletons or non
singletons. @mozilla.org/sound;1 is being used as both, the fix is to find all
instances of:

Components.classes["@mozilla.org/sound;1"].createInstance
Components.classes["@mozilla.org/sound;1"].getService
do_CreateInstance("@mozilla.org/sound;1")
do_GetService("@mozilla.org/sound;1")

and similar ilk and standardize on either createInstance or getService. Pick
createInstance if there is internal state which needs to be maintained per
instance and multiple instances can peacefully coexist. Pick getService if there
is no internal state or if multiple instances cannot peacefully coexist and the
object internally manages multiple requests.

this decission is left as an exercise for the bug owner. people on irc should be
willing to help with the decission if necessary.
Product: Core → Mozilla Application Suite
(Reporter)

Comment 1

13 years ago

*** This bug has been marked as a duplicate of 277853 ***
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
(Reporter)

Updated

9 years ago
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.