Closed Bug 269895 Opened 15 years ago Closed 11 years ago

###!!! ASSERTION: You are calling CreateInstance "{a6cf9129-15b3-11d2-932e-00805f8add32}" when a service for this CID already exists!: 'Error', file r:/mozilla/xpcom/components/nsComponentManager.cpp, line 1881

Categories

(Core :: Printing: Output, defect)

x86
Windows XP
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: timeless, Assigned: timeless)

Details

(Keywords: assertion)

Attachments

(1 file, 2 obsolete files)

###!!! ASSERTION: You are calling CreateInstance
"{a6cf9129-15b3-11d2-932e-00805f8add32}" when a service for this CID already
exists!: 'Error', file r:/mozilla/xpcom/components/nsComponentManager.cpp, line 1881
Break: at file r:/mozilla/xpcom/components/nsComponentManager.cpp, line 1881

 	xpcom_core.dll!nsDebugImpl::Assertion(const char * aStr=0x038f0760, const char
* aExpr=0x0053d780, const char * aFile=0x0053d74c, int aLine=0x00000759)  Line
290	C++
 	xpcom_core.dll!nsDebug::Assertion(const char * aStr=0x038f0760, const char *
aExpr=0x0053d780, const char * aFile=0x0053d74c, int aLine=0x00000759)  Line 109	C++
 	xpcom_core.dll!nsComponentManagerImpl::CreateInstance(const nsID &
aClass={...}, nsISupports * aDelegate=0x00000000, const nsID & aIID={...}, void
* * aResult=0x0012e968)  Line 1881 + 0x20	C++
 	xpcom_core.dll!nsCreateInstanceByCID::operator()(const nsID & aIID={...}, void
* * aInstancePtr=0x0012e968)  Line 55 + 0x2d	C++
 	gkgfx.dll!nsCOMPtr<nsIPrinterEnumerator>::assign_from_helper(const
nsCOMPtr_helper & helper={...}, const nsID & aIID={...})  Line 1051 + 0x12	C++
 	gkgfx.dll!nsCOMPtr<nsIPrinterEnumerator>::operator=(const nsCOMPtr_helper &
rhs={...})  Line 644	C++
>	gkgfx.dll!nsPrinterListEnumerator::Init()  Line 199	C++
 	gkgfx.dll!nsPrintOptions::AvailablePrinters(nsISimpleEnumerator * *
aPrinterEnumerator=0x0012ea1c)  Line 888 + 0x17	C++
 	gklayout.dll!nsPrintEngine::CheckForPrinters(nsIPrintOptions *
aPrintOptions=0x034c0b40, nsIPrintSettings * aPrintSettings=0x03168a50)  Line
1525 + 0x24	C++
 	gklayout.dll!nsPrintEngine::PrintPreview(nsIPrintSettings *
aPrintSettings=0x03168a50, nsIDOMWindow * aChildDOMWin=0x00000000,
nsIWebProgressListener * aWebProgressListener=0x0340fd54)  Line 1071 + 0x26	C++
 	gklayout.dll!DocumentViewerImpl::PrintPreview(nsIPrintSettings *
aPrintSettings=0x03168a50, nsIDOMWindow * aChildDOMWin=0x00000000,
nsIWebProgressListener * aWebProgressListener=0x0340fd54)  Line 3132 + 0x1e	C++
 	xpcom_core.dll!XPTC_InvokeByIndex(nsISupports * that=0x0386b478, unsigned int
methodIndex=0x0000000e, unsigned int paramCount=0x00000003, nsXPTCVariant *
params=0x0012ecd0)  Line 102	C++
 	xpc3250.dll!XPCWrappedNative::CallMethod(XPCCallContext & ccx={...},
XPCWrappedNative::CallMode mode=CALL_METHOD)  Line 2037 + 0x1e	C++
 	xpc3250.dll!XPC_WN_CallMethod(JSContext * cx=0x02e5c8a8, JSObject *
obj=0x026f8838, unsigned int argc=0x00000003, long * argv=0x036c7300, long *
vp=0x0012ef9c)  Line 1287 + 0xb	C++
 	js3250.dll!js_Invoke(JSContext * cx=0x02e5c8a8, unsigned int argc=0x00000003,
unsigned int flags=0x00000000)  Line 1286 + 0x20	C
 	js3250.dll!js_Interpret(JSContext * cx=0x02e5c8a8, long * result=0x0012fa2c) 
Line 3509 + 0xf	C
 	js3250.dll!js_Invoke(JSContext * cx=0x02e5c8a8, unsigned int argc=0x00000001,
unsigned int flags=0x00000002)  Line 1306 + 0xd	C
 	js3250.dll!js_InternalInvoke(JSContext * cx=0x02e5c8a8, JSObject *
obj=0x01088e10, long fval=0x02f2ba60, unsigned int flags=0x00000000, unsigned
int argc=0x00000001, long * argv=0x037590f8, long * rval=0x0012fbbc)  Line
1430 + 0x14	C
 	js3250.dll!JS_CallFunctionValue(JSContext * cx=0x02e5c8a8, JSObject *
obj=0x01088e10, long fval=0x02f2ba60, unsigned int argc=0x00000001, long *
argv=0x037590f8, long * rval=0x0012fbbc)  Line 3783 + 0x1f	C
 	gklayout.dll!nsJSContext::CallEventHandler(JSObject * aTarget=0x01088e10,
JSObject * aHandler=0x02f2ba60, unsigned int argc=0x00000001, long *
argv=0x037590f8, long * rval=0x0012fbbc)  Line 1361 + 0x21	C++
 	gklayout.dll!GlobalWindowImpl::RunTimeout(nsTimeoutImpl * aTimeout=0x035bff00)
 Line 5062	C++
 	gklayout.dll!GlobalWindowImpl::TimerCallback(nsITimer * aTimer=0x035bffd0,
void * aClosure=0x035bff00)  Line 5428	C++
 	xpcom_core.dll!nsTimerImpl::Fire()  Line 383 + 0x11	C++
 	xpcom_core.dll!nsTimerManager::FireNextIdleTimer()  Line 617	C++
 	gkwidget.dll!nsAppShell::Run()  Line 142	C++
 	appcomps.dll!nsAppStartup::Run()  Line 221	C++
 	mozilla.exe!main1(int argc=0x00000001, char * * argv=0x00347b80, nsISupports *
nativeApp=0x0109ef38)  Line 1321 + 0x20	C++
 	mozilla.exe!main(int argc=0x00000001, char * * argv=0x00347b80)  Line 1813 +
0x25	C++
 	mozilla.exe!mainCRTStartup()  Line 400 + 0x11	C
 	kernel32.dll!TermsrvAppInstallMode()  + 0x269
Attached patch it seems to be a service (obsolete) — Splinter Review
Assignee: printing → timeless
Status: NEW → ASSIGNED
Attachment #177645 - Flags: superreview?(roc)
Attachment #177645 - Flags: review?(emaijala)
Comment on attachment 177645 [details] [diff] [review]
it seems to be a service

r- per irc discussion because of these:

> -    nsCOMPtr<nsIPrinterEnumerator> prtEnum = do_GetService(kPrinterEnumeratorCID, &rv);
> +    nsCOMPtr<nsIPrinterEnumerator> prtEnum = do_CreateInstance(kPrinterEnumeratorCID, &rv);
Attachment #177645 - Flags: superreview?(roc)
Attachment #177645 - Flags: review?(emaijala)
Attachment #177645 - Flags: review-
Attached patch it seems to be a service ... (obsolete) — Splinter Review
Attachment #177645 - Attachment is obsolete: true
Attachment #177752 - Flags: review?(emaijala)
Comment on attachment 177752 [details] [diff] [review]
it seems to be a service ...

Codewise looks good, but what's with the numerous indentation glitches?
Attachment #177752 - Flags: review?(emaijala) → review-
Comment on attachment 177752 [details] [diff] [review]
it seems to be a service ...

it's a -w patch, the whole file has messed up indentation (1/3 space?)
Attachment #177752 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #177752 - Flags: review?(emaijala)
Attachment #177752 - Flags: review-
Attachment #177752 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Comment on attachment 177752 [details] [diff] [review]
it seems to be a service ...

Right, good :)
Attachment #177752 - Flags: review?(emaijala) → review+
timeless, is this patch still needed? It appears that it never got applied. It has also bitrotten significantly.
Attachment #177752 - Attachment is obsolete: true
http://hg.mozilla.org/mozilla-central/rev/c873dcbffea9
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.