Bug 103808 - MacOS 10.12 deprecation notices
Summary: MacOS 10.12 deprecation notices
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.2.1.2 release
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-09 11:25 UTC by Telesto
Modified: 2017-09-15 16:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2016-11-09 11:25:24 UTC
Description:
When I was trying to debug I noticed some (deprecation) warnings. For example:
- 'NSShiftKeyMask' is deprecated: first deprecated in macOS 10.12
- 'NSAnyEventMask' is deprecated: first deprecated in macOS 10.12
-  @"WARNING: nextEventMatchingMask should only be called from the Main Thread! This will throw an exception in the future."

The deprecated API's should be relatively easy to find: "Fortunately, the compiler generates warnings whenever it spots the use of a deprecated API in your code. You can use those warnings to track down and remove all references to those APIs."

Actual Results:  
The use of deprecated API's

Expected Results:
The use of recent API's 


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Alex Thurgood 2016-11-09 13:34:12 UTC
Confirming
Comment 2 Alex Thurgood 2016-11-09 13:40:50 UTC
The NextEventMatchingMAsk tries to fire from a thread which is not main, or it tries to re-enter the main thread in this way, and which I am assuming, as Apple indicates in the warning notice, will trigger an exception in future releases of macOS that might not be handled particularly well by LibreOffice. I imagine that it would be advisable to try and avoid this before we are actually faced with the fait accompli.
Comment 3 Julien Nabet 2016-11-11 06:18:53 UTC
About deprecated things, perhaps https://cgit.freedesktop.org/libreoffice/core/commit/?id=a6c88e4bf1d148ac462c2bcd7061eff602b627d6 fixed them all?

Also perhaps a proper way should have been to make something similar to:
https://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00358.html ?

About nextEventMatchingMask, I noticed this patch:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=e44b034512551c09689edcecfa7401ecbb4af80e
Comment 4 Telesto 2016-11-11 10:15:29 UTC
It seems I'm totally wrong about seeing NSAnyEventMask/NSShiftKeyMask warnings; it weren't warnings but patch comments, sorry.

The WARNING: nextEventMatchingMask should only be called from the Main Thread! seems to be a real warning which isn't fixed by patch, as far I know. I did show in a LLDB backtrace of a recently compiled master (7 nov). See: https://bugs.documentfoundation.org/attachment.cgi?id=128576

I used: Version: 5.3.0.0.alpha1+
Build ID: 64a708cba9b954afe3331f63c58218eb53b3d0ce
CPU Threads: 4; OS Version: Mac OS X 10.12.1; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 5 Telesto 2017-09-15 16:32:59 UTC
The warnings are added on purpose (as I understand know). So not that helpful, I suppose -> Closing