I am embedding mozilla in my application. Initially I tried with
XULRunner release build from one of the nightlies and it failed at
nsIWebNavigation->LoadURI().
To debug into mozilla code I did a debug build of XULRunner on my
machine and used it for embedding. With this debug version XPCOM is
not being initialized properly. It is failing trying to register the
DBus module. Here is the stack trace leading to a segfault:
#0 0x434fb290 in pthread_mutex_lock () from /lib/libpthread.so.0
#1 0x0020120a in PR_Lock (lock=0x1) at /home/Shivaprasad/xulrunner/
mozilla/nsprpub/pr/src/pthreads/ptsynch.c:206
#2 0x0422b7d9 in XPCRootSetElem::AddToRootSet (this=0xb225850,
rt=0xb122e80, listHead=0xb1d30d8)
at /home/Shivaprasad/xulrunner/mozilla/js/src/xpconnect/src/
xpcjsruntime.cpp:1384
#3 0x04239861 in XPCJSRuntime::AddWrappedJSRoot (this=0xb1d3008,
wrappedJS=0xb225838)
at /home/Shivaprasad/xulrunner/mozilla/js/src/xpconnect/src/
xpcinlines.h:56
#4 0x042387dd in nsXPCWrappedJS::AddRef (this=0xb225838) at /home/
Shivaprasad/xulrunner/mozilla/js/src/xpconnect/src/xpcwrappedjs.cpp:
219
#5 0x04238915 in nsXPCWrappedJS (this=0xb225838, [EMAIL PROTECTED],
aJSObj=0xb22b120, aClass=0xb21caf8, root=0x0, aOuter=0x0)
at /home/Shivaprasad/xulrunner/mozilla/js/src/xpconnect/src/
xpcwrappedjs.cpp:435
#6 0x04238b20 in nsXPCWrappedJS::GetNewOrUsed ([EMAIL PROTECTED],
aJSObj=0xb22b120, [EMAIL PROTECTED], aOuter=0x0,
wrapperResult=0xbfcf8b90)
at /home/Shivaprasad/xulrunner/mozilla/js/src/xpconnect/src/
xpcwrappedjs.cpp:347
#7 0x0421d658 in XPCConvert::JSObject2NativeInterface
([EMAIL PROTECTED], dest=0xb1eb120, src=0xb22b120, iid=0x4282ae0,
aOuter=0x0, pErr=0xbfcf8c80)
at /home/Shivaprasad/xulrunner/mozilla/js/src/xpconnect/src/
xpcconvert.cpp:1339
#8 0x041fad18 in nsXPConnect::WrapJS (this=0xb1072c8,
aJSContext=0xb105f98, aJSObj=0xb22b120, [EMAIL PROTECTED],
result=0xb1eb120)
at /home/Shivaprasad/xulrunner/mozilla/js/src/xpconnect/src/
nsXPConnect.cpp:1289
#9 0x0426bacc in mozJSComponentLoader::LoadModule (this=0xb122a78,
aComponentFile=0xb13e5d8, aResult=0xbfcf8eb4)
at /home/Shivaprasad/xulrunner/mozilla/js/src/xpconnect/loader/
mozJSComponentLoader.cpp:719
#10 0x008c01ce in nsComponentManagerImpl::AutoRegisterComponent
(this=0xb1011a8, aComponentFile=0xb13e5d8, [EMAIL PROTECTED],
minLoader=0)
at /home/Shivaprasad/xulrunner/mozilla/xpcom/components/
nsComponentManager.cpp:2988
#11 0x008c04bb in nsComponentManagerImpl::LoadLeftoverComponents
(this=0xb1011a8, [EMAIL PROTECTED], [EMAIL PROTECTED],
minLoader=0)
at /home/Shivaprasad/xulrunner/mozilla/xpcom/components/
nsComponentManager.cpp:3043
#12 0x008c286b in nsComponentManagerImpl::AutoRegister
(this=0xb1011a8, aSpec=0x0)
at /home/Shivaprasad/xulrunner/mozilla/xpcom/components/
nsComponentManager.cpp:3304
#13 0x00865986 in NS_InitXPCOM3_P (result=0x0, binDirectory=0xb0f7ec0,
appFileLocationProvider=0xb0f7fe8, staticComponents=0xb0f80c0,
componentCount=1)
at /home/Shivaprasad/xulrunner/mozilla/xpcom/build/nsXPComInit.cpp:
655
#14 0x009db1f2 in XRE_InitEmbedding (aLibXULDirectory=0xb0f7ec0,
aAppDirectory=0xb0f7ec0, aAppDirProvider=0x0, aStaticComponents=0x0,
aStaticComponentCount=0) at /home/Shivaprasad/xulrunner/mozilla/
toolkit/xre/nsEmbedFunctions.cpp:124
#15 0x08cf144d in InitGeckoEngine (addRef=1) at gecko.cpp:112
Just before the seg fault I get this assert message:
###!!! ASSERTION: Uh, JS context w/o a thread?: 'cx->thread', file /
home/Shivaprasad/xulrunner/mozilla/js/src/xpconnect/src/xpcprivate.h,
line 3089
Please let me know what I am missing.
Regards,
Brahmana.
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding