Download it now!
Bug 126961 - Cannot link to macOS address book - crashes and restarts
Summary: Cannot link to macOS address book - crashes and restarts
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: contrib (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: x86-64 (AMD64) Mac OS X (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, haveBacktrace, regression
: 131458 132745 133516 (view as bug list)
Depends on:
Blocks: Address-Source Crash
  Show dependency treegraph
 
Reported: 2019-08-16 07:54 UTC by EB
Modified: 2020-09-25 21:00 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Consecutive steps provoking the crash (569.05 KB, application/vnd.oasis.opendocument.graphics)
2019-08-16 07:56 UTC, EB
Details
Backtrace from lldb debug session (3.57 KB, text/plain)
2020-06-03 14:19 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description EB 2019-08-16 07:54:26 UTC
Description:
Impossible to link to the macOS address book either with the assistant or manually

Steps to Reproduce:
1.Select Assistants for address data
2.Select address book source
3.select macOS X

Actual Results:
LO reports an error, closes and reopens after a few seconds
see attachment


Expected Results:
Link to the macOS address book and continue to build database


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.3.0.4
Build-ID: 057fc023c990d676a43019934386b85b21a9ee99
CPU-Threads: 8; BS: Mac OS X 10.14.6; UI-Render: Standard; VCL: osx; 
Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE
Calc: threaded
Comment 1 EB 2019-08-16 07:56:47 UTC
Created attachment 153428 [details]
Consecutive steps provoking the crash
Comment 2 Alex Thurgood 2019-08-19 09:10:22 UTC
No repro for me I'm afraid with

Version: 6.2.5.2
Build ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159
Threads CPU : 4; OS : Mac OS X 10.14.6; UI Render : par défaut; VCL: osx; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded
Comment 3 Alex Thurgood 2019-08-19 09:30:53 UTC
No repro with 

Version: 6.3.0.4
Build ID: 057fc023c990d676a43019934386b85b21a9ee99
Threads CPU : 4; OS : Mac OS X 10.14.6; UI Render : par défaut; VCL: osx; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded
Comment 4 EB 2019-08-19 10:41:29 UTC
(In reply to Alex Thurgood from comment #3)
> No repro with 
> 
> Version: 6.3.0.4
> Build ID: 057fc023c990d676a43019934386b85b21a9ee99
> Threads CPU : 4; OS : Mac OS X 10.14.6; UI Render : par défaut; VCL: osx; 
> Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
> Calc: 

Something is screwy : I can use and open the address book with Thunderbird and I can link LO to the Thunderbird address book. Unfortunately TB imports only the email infos. But this means that the MAC address book is ok.
Comment 5 Alex Thurgood 2019-08-19 11:19:40 UTC
@EB: the only thing I can think of at the moment:

 - possible unicode support issues with certain German letters in the character strings of data within address book or likewise field names ?

Don't get me wrong, I've had crashes in previous, older versions when trying to connect to the Apple address book, but usually this only occurs the first time, and then afterwards, the crash doesn't happen anymore. Currently, I'm not seeing any crashes though and I tried creating a new ODB file each time, just in case it was that same issue.
Comment 6 EB 2019-08-21 08:26:36 UTC
(In reply to Alex Thurgood from comment #5)
> @EB: the only thing I can think of at the moment:
> 
>  - possible unicode support issues with certain German letters in the
> character strings of data within address book or likewise field names ?

I don't know. Thunderbird has no problems. I'm actually trying out 'Exporter for Contacts' but as I'm not very data-handling-savvy it's hit'n'try game.
  
> 
> Don't get me wrong, I've had crashes in previous, older versions when trying
> to connect to the Apple address book, but usually this only occurs the first
> time, and then afterwards, the crash doesn't happen anymore. Currently, I'm
> not seeing any crashes though and I tried creating a new ODB file each time,
> just in case it was that same issue.
Comment 7 Alex Thurgood 2019-10-04 06:08:59 UTC
@EB : did you authorise the Contacts.app to access LO (or is it the other way around, I don't remember) ? 

I seem to recall that the first time you try to access the contacts you get a message asking the user to authorise this before it can access the data stored in the Contacts.app.

Perhaps there is a security setting somewhere that you can unset/reset ?
Comment 8 EB 2019-10-04 14:34:50 UTC
(In reply to Alex Thurgood from comment #7)
> @EB : did you authorise the Contacts.app to access LO (or is it the other
> way around, I don't remember) ? 
> 
> I seem to recall that the first time you try to access the contacts you get
> a message asking the user to authorise this before it can access the data
> stored in the Contacts.app.
> 
> Perhaps there is a security setting somewhere that you can unset/reset ?

There are no access links or hints. Since Catalina is about to be dispatched I propose to call it a day and wait how LO and Catalina will fare. OK ? 
Have a nice weekend.
EB
Comment 9 Alex Thurgood 2019-10-25 07:27:24 UTC
Just created a new ODB file connecting to my Mac Contacts address on Catalina - no crash.

Version: 6.3.1.2
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
Threads CPU : 4; OS : Mac OS X 10.15; UI Render : par défaut; VCL: osx; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded
Comment 10 Xisco Faulí 2019-11-26 10:11:47 UTC
Hello EB,
To be certain the reported issue is not
related to corruption in the user profile, could you please reset your
Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and
re-test?

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the issue is still present
Comment 11 Alex Thurgood 2020-05-07 08:15:43 UTC
*** Bug 132745 has been marked as a duplicate of this bug. ***
Comment 12 Alex Thurgood 2020-05-07 08:19:39 UTC
I have set bug 132745 as a DUP of this bug report, as they both report a crash when attempting to connect to the macOS Address Book, albeit via different call mechanisms :

- this bug report - access via the Create DB wizard
- bug report 132745 - access via the Exchange Address datasource wizard
Comment 13 andrew@aehrlich.com 2020-05-07 16:06:08 UTC
Thank you Alex. I just tested the following:

1. System Preferences -> Security and Privacy -> Full Disk Access
2. Adding LibreOffice
3. Restart LibreOffice.

Libreoffice still crashes when trying to add the address book via the data source wizard.

Also, I see that in Security and Privacy, there is a Contacts category, where LibreOffice is NOT added.

When doing the address book data source wizard, there is no popup for a permissions request. 

If there is a way for me to grab a debug log from the crash, let me know and I would be happy to upload it.
Comment 14 Alex Thurgood 2020-05-07 16:39:03 UTC
(In reply to andrew@aehrlich.com from comment #13)


> If there is a way for me to grab a debug log from the crash, let me know and
> I would be happy to upload it.

The only way to get really useful debug information generally is by using a debug-enabled macOS build of LO. As these are not provided (at least I don't think they are) in the daily builds, the only other way is to build yourself from source code with the debug enabled switch.

Other than that, you might be able to find at least some kind of information via the Console.app, and searching through the log files. If LibreOffice crashes, there is usually some kind of log left behind in the system, which might contain information of use.
Comment 15 Alex Thurgood 2020-06-02 10:40:02 UTC
*** Bug 131458 has been marked as a duplicate of this bug. ***
Comment 16 Alex Thurgood 2020-06-02 10:40:17 UTC
*** Bug 133516 has been marked as a duplicate of this bug. ***
Comment 17 Alex Thurgood 2020-06-02 13:00:16 UTC
Confirming with 

Version : 6.4.4.2
Build ID : 3d775be2011f3886db32dfd395a6a6d1ca2630ff
Threads CPU : 4; OS : Mac OS X 10.15.4; UI Render : par défaut; VCL: osx; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded

When LO Vanilla crashes, I get an error message :

"LibreOffice Vanilla must unfortunately be manually restarted after installation or update" - unfortunately, I have done neither, so not sure where this message is coming from.
Comment 18 Alex Thurgood 2020-06-02 13:15:48 UTC
Don't know whether the following has anything to do with this particular problem, but in the system.log, I am seeing a whole bunch of :

com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.soffice.33660): Failed to bootstrap path: path = /Applications/LibreOffice.app/Contents/Frameworks/libuno_cppu.dylib.3

and similar entries for:
libuno_sal.dylib.3
libicudata.dylib.63
libicui18n.dylib.63
libuno_salhelpergcc3.dylib.3
libicuuc.dylib.63
libuno_cppuhelpergcc3.dylib.3
libuno_sal.dylib.3
libicudata.dylib.63
libuno_cppu.dylib.3
libicui18n.dylib.63
libuno_salhelpergcc3.dylib.3
libicuuc.dylib.63
libuno_cppuhelpergcc3.dylib.3

The same list appears for LOVanilla.
Comment 19 John Kopcke 2020-06-03 12:29:25 UTC
(In reply to andrew@aehrlich.com from comment #13)
> Thank you Alex. I just tested the following:
> 
> 1. System Preferences -> Security and Privacy -> Full Disk Access
> 2. Adding LibreOffice
> 3. Restart LibreOffice.
> 
> Libreoffice still crashes when trying to add the address book via the data
> source wizard.
> 
> Also, I see that in Security and Privacy, there is a Contacts category,
> where LibreOffice is NOT added.
> 
> When doing the address book data source wizard, there is no popup for a
> permissions request. 
> 
> If there is a way for me to grab a debug log from the crash, let me know and
> I would be happy to upload it.

I have just upgraded to 6.4.4.2 and still receive the same crash.  I believe that the key is the Security & Privacy Contacts access permission.  I don't see how it could work if LibreOffice app is not granted permission.  I use a third party database product called Ninox which accesses the Contacts.  It appears in the Contacts permission list and is granted access.  So my question is, why doesn't LibreOffice appear in the list of apps requesting Contacts access?  And, for those who cannot reproduce the error, do you see LibreOffice as having been granted access to Contacts?  If so, try taking away that permission and see if you get the crash.
Comment 20 Rainer Schaefer 2020-06-03 12:58:58 UTC
Well, I assure you that there is no use in this. I tried open office. OO is listed in "Contacts access" - and crashes also, when trying to access the MacOS-contacts.app

Even the new beta of LO 7 is crashing - and not listed in "system preferences - security - contacts access"

This seems to be a weird thing.

I tried a workaround. Exported the contacts to an Excel-sheet and tried to access this one from LO. Initially, this works fine - except you cannot add any contacts. And when toggling around with this Excel-Sheet a lot, after a while LO crashed again.
Comment 21 John Kopcke 2020-06-03 14:16:25 UTC
(In reply to Rainer Schaefer from comment #20)
> Well, I assure you that there is no use in this. I tried open office. OO is
> listed in "Contacts access" - and crashes also, when trying to access the
> MacOS-contacts.app
> 
> Even the new beta of LO 7 is crashing - and not listed in "system
> preferences - security - contacts access"
> 
> This seems to be a weird thing.
> 
> I tried a workaround. Exported the contacts to an Excel-sheet and tried to
> access this one from LO. Initially, this works fine - except you cannot add
> any contacts. And when toggling around with this Excel-Sheet a lot, after a
> while LO crashed again.

In order for an app on Mac to access the Contacts it must have NSContactsUsageDescription in the info.plist file.  I could not find this key in the info.plist.  I have scanned the source code LO and could not find any reference to it. I believe this needs to be added to the info.plist.
Comment 22 Alex Thurgood 2020-06-03 14:19:43 UTC
Created attachment 161576 [details]
Backtrace from lldb debug session