Issue 72341 - OOo fails to detect mozilla/firefox/thunderbird profile dir (for certificates)
Summary: OOo fails to detect mozilla/firefox/thunderbird profile dir (for certificates)
Status: CONFIRMED
Alias: None
Product: porting
Classification: Code
Component: MacOSX (show other issues)
Version: 680m193
Hardware: All All
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-07 00:20 UTC by lohmaier
Modified: 2017-05-20 11:31 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
experimental patches (4.31 KB, patch)
2006-12-07 23:02 UTC, sparcmoz
no flags Details | Diff
bootstrap running in macro (62.41 KB, image/png)
2006-12-08 01:55 UTC, sparcmoz
no flags Details
Finds both Thunderbird and Firefox (90.96 KB, image/png)
2006-12-08 02:45 UTC, sparcmoz
no flags Details
Bootstrap paatches (3.96 KB, patch)
2006-12-08 02:46 UTC, sparcmoz
no flags Details | Diff
address book crash log (33.63 KB, text/plain)
2006-12-08 06:32 UTC, sparcmoz
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description lohmaier 2006-12-07 00:20:27 UTC
OOo on Mac fails to detect the profile dir of Mozilla/Firefox/Thunderbird.

When one wants to use certificates to digitally sign a document, the user is
forced to start OOo from a terminal and set an environment variable beforehand:

$ export MOZILLA_CERTIFICATE_FOLDER=/Users/buildslave/Library/Application\
Support/Firefox/Profiles/ggk3xm60.default/
$ /Users/buildslave/Desktop/m195/OpenOffice.org\
2.1.app/Contents/MacOS/program/soffice

The average user is not expected to know how to use the commandline or set
environment variables, thus the detection should be enhanced to find the profile
on Mac (the above is with firefox 2.0)
Comment 1 shaunmcdonald131 2006-12-07 00:24:05 UTC
Adding cc.
(Just for completeness, thanks to cloph for pointing this out)
Relevant code is at:
http://go-oo.org/lxr/source/xml/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx#114
Comment 2 lohmaier 2006-12-07 00:40:47 UTC
seems like com.sun.star.mozilla.MozillaBootstrap is not available on mac.

Dim oMozBootstrap as Object
oMozBootstrap = createUnoService( "com.sun.star.mozilla.MozillaBootstrap" )

-> oMozBootstrap is NULL on Mac, works on linux - maybe part of the problem

see http://wiki.services.openoffice.org/wiki/Certificate_Detection for the whole
macro
Comment 3 sparcmoz 2006-12-07 22:59:44 UTC
The attached patches will get the test macro running and makes a crash. It is only to help describe the 
problems, not a solution!
Comment 4 sparcmoz 2006-12-07 23:02:51 UTC
Created attachment 41220 [details]
experimental patches
Comment 5 sparcmoz 2006-12-08 01:55:55 UTC
Created attachment 41223 [details]
bootstrap running in macro
Comment 6 sparcmoz 2006-12-08 02:45:08 UTC
Created attachment 41224 [details]
Finds both Thunderbird and Firefox
Comment 7 sparcmoz 2006-12-08 02:46:06 UTC
Created attachment 41225 [details]
Bootstrap paatches
Comment 8 sparcmoz 2006-12-08 02:51:03 UTC
The macro now detects both Thunderbird and Firefox. (the crashes were only
caused by my fprintf statements.) This is only proof-of-concept because:
(a) The patch also enables the addressbook wizard but there is a crash in there
with Thunderbird addressbook.
(b) need to understand what should be the correct paths to Thunderbird and
Firefox profiles?

Comment 9 sparcmoz 2006-12-08 06:32:00 UTC
Created attachment 41227 [details]
address book crash log
Comment 10 sparcmoz 2006-12-08 06:39:33 UTC
The addressbook issue is seen both in (a) addressbook wizard, or (b) make a regular database with 
addressbook and try to access the table. A search of google suggests some Mac/Intel issue is involved 
- maybe someone can try these patches on PPC?

Thread 2 Crashed:
0   dyld                       	0x8fe12f84 stub_binding_helper_interface + 18
1   <<00000000>> 	0x00000000 0 + 0
2   libxpcom.dylib             	0x091ceb63 XPTC_InvokeByIndex + 435
3   libxpcom.dylib             	0x091cebc3 nsXPTCStubBase::Stub3() + 27
4   libmozabdrv2.dylib         	0x09086480 connectivity::mozab::MNSRunnable::StartProxy
(com::sun::star::uno::Reference<com::sun::star::mozilla::XCodeProxy> const&) + 94
Comment 11 lohmaier 2006-12-08 17:14:22 UTC
I applied parts of the patch and can confirm that detection of profiles work
(checked with Thunderbird and Firefox). 

I don't see a crash when accessing the address book (thunderbird), created using
the wizard. It also lists the dummy-entry I made. (PPC)

So your guess seems to be right and it really is a Intel only issue.

(with parts of the patch I mean:
MNSFolders.cxx as in the attached patch
makefile.mk only added the -DXP_MACOSX
file_library_ooo.scp as in the attached patch)
Comment 12 sparcmoz 2006-12-13 11:32:14 UTC
Looking for the crash identifier XPTC_InvokeByIndex
cd moz
grep -r XPTC_InvokeByIndex *
leads to various places, but including some mac assembler code here:
 moz/unxmacxi.pro/misc/build/mozilla/xpcom/reflect/xptcall/src/md/mac
xptcinvoke_mac.cpp  xptcinvoke_mac.s  xptcstubs_mac.cpp  xptcstubs_mac.s
Do I am wondering - is this code used? Does it need be modified for Intel?
Comment 13 Marcus 2017-05-20 11:31:08 UTC
Reset assigne to the default "issues@openoffice.apache.org".