Hi!
I cannot make any custom component to be loaded in either Mozilla 1.7
release or Camino debug (built from yesterday's CVS). This includes my
own attempt as well as nsSample (@mozilla.org/sample;1).
This is what I do:
1) create symlinks for xpcomsample.xpt and libxpcomsample.dylib in
Mozilla/Contents/MacOS/components (or copy them, doesn't matter)
2) launch Mozilla
3) open xpconnect-sample.html
4) nothing happens as I press the buttons that are supposed to call
the sample code. If I add a try/catch block around the code, this is
what I get in onLoad:
[Exception... "Component returned failure code: 0x80570015
(NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.createInstance]"
nsresult:
"0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE)" location: "JS frame ::
file:///Volumes/Work/test.html :: OnLoad :: line 10" data: no]
I have tried deleting compreg.dat and xpti.dat and restarting the
browser. I have also tried loading the component from xpcshell (and
got the same error).
When I look at the components in question with Component Viewer, their
ContractIDs and interfaces are present, but seem to be not linked to
each other (i.e. if I click on the disclosure triangle near the
ContractID, nothing appears).
The component seems to get registered OK:
*** Registering nsSampleModule components (all right -- a generic
module!)
I tried running Camino in the debugger and found that the failure
occurs in XPCOMGlueStartup("."), called from:
#0 0x09b0b264 in nsGenericModule::Initialize(nsIComponentManager*) at
nsGenericFactory.cpp:285
#1 0x09b0b628 in nsGenericModule::GetClassObject(nsIComponentManager*,
nsID const&, nsID const&, void**) at nsGenericFactory.cpp:365
#2 0x03413080 in nsNativeComponentLoader::GetFactoryFromModule(nsDll*,
nsID const&, nsIFactory**) at nsNativeComponentLoader.cpp:1042
#3 0x034101a4 in nsNativeComponentLoader::GetFactory(nsID const&, char
const*, char const*, nsIFactory**) at nsNativeComponentLoader.cpp:127
#4 0x034cde20 in nsFactoryEntry::GetFactory(nsIFactory**,
nsComponentManagerImpl*) at nsComponentManager.h:292
#5 0x03408b30 in nsComponentManagerImpl::CreateInstance(nsID const&,
nsISupports*, nsID const&, void**) at nsComponentManager.cpp:1914
#6 0x0340f12c in nsComponentManager::CreateInstance(nsID const&,
nsISupports*, nsID const&, void**) at
nsComponentManagerObsolete.cpp:102
#7 0x05136104 in nsJSCID::CreateInstance(nsISupports**) at
xpcjsid.cpp:795
#8 0x03446a10 in _XPTC_InvokeByIndex at nsTObsoleteAStringThunk.cpp:51
#9 0x03445d48 in XPTC_InvokeByIndex at xptcinvoke_ppc_rhapsody.cpp:144
#10 0x051503fc in XPCWrappedNative::CallMethod(XPCCallContext&,
XPCWrappedNative::CallMode) at xpcwrappednative.cpp:2027
#11 0x051596c8 in XPC_WN_CallMethod(JSContext*, JSObject*, unsigned,
long*, long*) at xpcwrappednativejsops.cpp:1287
#12 0x03059644 in js_Invoke at jsinterp.c:941
#13 0x03069e60 in js_Interpret at jsinterp.c:2972
#14 0x0305a2ac in js_Execute at jsinterp.c:1159
#15 0x03016978 in JS_EvaluateUCScriptForPrincipals at jsapi.c:3558
#16 0x136ba510 in nsJSContext::EvaluateString(nsAString const&, void*,
nsIPrincipal*, char const*, unsigned, char const*, nsAString&, int*)
at nsJSEnvironment.cpp:939
#17 0x134f1ba0 in nsScriptLoader::EvaluateScript(nsScriptLoadRequest*,
nsString const&) at nsScriptLoader.cpp:656
#18 0x134f15e0 in nsScriptLoader::ProcessRequest(nsScriptLoadRequest*)
at nsScriptLoader.cpp:573
#19 0x134f1318 in nsScriptLoader::ProcessScriptElement(nsIDOMHTMLScriptElement*,
nsIScriptLoaderObserver*) at nsScriptLoader.cpp:519
#20 0x1357770c in nsHTMLScriptElement::MaybeProcessScript() at
nsHTMLScriptElement.cpp:652
#21 0x1357684c in nsHTMLScriptElement::SetDocument(nsIDocument*, int,
int) at nsHTMLScriptElement.cpp:469
#22 0x1348a038 in nsGenericElement::AppendChildTo(nsIContent*, int,
int) at nsGenericElement.cpp:2560
#23 0x135a4210 in HTMLContentSink::ProcessSCRIPTTag(nsIParserNode
const&) at nsHTMLContentSink.cpp:4334
#24 0x1359ff94 in HTMLContentSink::AddLeaf(nsIParserNode const&) at
nsHTMLContentSink.cpp:3192
#25 0x10947618 in CNavDTD::AddLeaf(nsIParserNode const*) at
CNavDTD.cpp:3787
#26 0x10943df0 in CNavDTD::HandleScriptToken(nsIParserNode const*) at
CNavDTD.cpp:2325
#27 0x10946970 in CNavDTD::OpenContainer(nsCParserNode const*,
nsHTMLTag, int, nsEntryStack*) at CNavDTD.cpp:3439
#28 0x10941708 in CNavDTD::HandleDefaultStartToken(CToken*, nsHTMLTag,
nsCParserNode*) at CNavDTD.cpp:1457
#29 0x1094284c in CNavDTD::HandleStartToken(CToken*) at
CNavDTD.cpp:1835
#30 0x10940590 in CNavDTD::HandleToken(CToken*, nsIParser*) at
CNavDTD.cpp:1019
#31 0x1093eee0 in CNavDTD::BuildModel(nsIParser*, nsITokenizer*,
nsITokenObserver*, nsIContentSink*) at CNavDTD.cpp:511
#32 0x109596c4 in nsParser::BuildModel() at nsParser.cpp:1894
#33 0x10959140 in nsParser::ResumeParse(int, int, int) at
nsParser.cpp:1761
#34 0x1095b220 in nsParser::OnDataAvailable(nsIRequest*, nsISupports*,
nsIInputStream*, unsigned, unsigned) at nsParser.cpp:2426
#35 0x09c832d4 in nsDocumentOpenInfo::OnDataAvailable(nsIRequest*,
nsISupports*, nsIInputStream*, unsigned, unsigned) at
nsURILoader.cpp:343
#36 0x07321c38 in nsFileChannel::OnDataAvailable(nsIRequest*,
nsISupports*, nsIInputStream*, unsigned, unsigned) at
nsFileChannel.cpp:594
#37 0x072932fc in nsInputStreamPump::OnStateTransfer() at
nsInputStreamPump.cpp:433
#38 0x07292dcc in nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*)
at nsInputStreamPump.cpp:336
#39 0x034c2e10 in nsInputStreamReadyEvent::EventHandler(PLEvent*) at
nsStreamUtils.cpp:118
#40 0x0341687c in PL_HandleEvent at plevent.c:673
#41 0x03416694 in PL_ProcessPendingEvents at plevent.c:608
#42 0x03419b54 in nsEventQueueImpl::ProcessPendingEvents() at
nsEventQueue.cpp:391
#43 0x0bd44e2c in -[EventQueueHandler eventTimer:] at nsToolkit.mm:175
It returns just 0x80004005 (NS_ERROR_FAILURE).
All components installed with Mozilla or Camino are loaded and
created just fine with the same code; it's just nsSample and my own
component that fail. What am i doing wrong?
- WBR, Alexey Proskuryakov
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom