On Feb 4, 7:45 am, "timeless" <[EMAIL PROTECTED]> wrote:
> > > nsresult path_result = NS_NewLocalFile(NS_LITERAL_STRING("."),
>
> It'd really help if you built with --enable-debug(ger-info-modules)
> and stepped through, or read the code using a web browser and followed
> the logic at e.g.http://mxr.mozilla.org/seamonkey
>
> or you could probably read the documentation for nsIFile.
>
> i believe you'll find that paths must start absolute and that for some
> reason '.' and '~' and '..' and friends just aren't absolute paths. I
> never quite understood why.
>
> http://mxr.mozilla.org/seamonkey/source/xpcom/io/nsLocalFileOSX.cpp#1286
>
> It looks like there's a bit of flexibility on macosx for ~, but the
> general rule applies.
I also tried an absolute path, but I don't think that's the issue.
XPCOMGlueStartup() is never called, so the string init fails.
Is there something that must be called before NS_InitEmbedding() ?
(gdb) b XPCOMGlueStartup
Breakpoint 1 at 0x482a: file nsXPCOMGlue.cpp, line 67.
(gdb) b NS_CStringContainerInit2
Breakpoint 2 at 0x4772: file nsXPCOMGlue.cpp, line 351.
(gdb) r
Starting program: /Users/sparks/test/mac/proto/proto
Reading symbols for shared
libraries ................................................................
done
Breakpoint 2, NS_CStringContainerInit2 ([EMAIL PROTECTED], aData=0x5fa0
"/Users/sparks/test/mac/proto", aDataLength=4294967295, aFlags=2) at
nsXPCOMGlue.cpp:351
351 if (!xpcomFunctions.cstringContainerInit2)
(gdb) where
#0 NS_CStringContainerInit2 ([EMAIL PROTECTED], aData=0x5fa0 "/Users/
sparks/test/mac/proto", aDataLength=4294967295, aFlags=2) at
nsXPCOMGlue.cpp:351
#1 0x0000655e in nsCString_external::nsCString_external
(this=0xbffff824, aData=0x5fa0 "/Users/sparks/test/mac/proto",
aLength=4294967295, aFlags=2) at mozilla/dist/sdk/include/
nsStringAPI.h:1247
#2 0x000065ad in
nsDependentCString_external::nsDependentCString_external
(this=0xbffff824, aData=0x5fa0 "/Users/sparks/test/mac/proto",
aLength=4294967295) at mozilla/dist/sdk/include/nsStringAPI.h:1288
#3 0x00002e8c in main () at proto.cpp:20
(gdb) list
346 NS_CStringContainerInit2(nsCStringContainer &aStr,
347 const char *aData,
348 PRUint32 aDataLength,
349 PRUint32 aFlags)
350 {
351 if (!xpcomFunctions.cstringContainerInit2)
352 return NS_ERROR_NOT_INITIALIZED;
353 return xpcomFunctions.cstringContainerInit2(aStr, aData,
aDataLength, aFlags);
354 }
355
(gdb) p xpcomFunctions.cstringContainerInit2
$1 = (CStringContainerInit2Func) 0
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding