Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 10: "[App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction"

Tags:

ios

I sometimes get this message in the logs of Xcode 8b3 when running my app, everything seems to work, but I'd like to know where this comes from. Google did not help at all.

like image 522
swalkner Avatar asked Jul 19 '16 12:07

swalkner


4 Answers

in your Xcode:

  • Click on your active scheme name right next to the Stop button
  • Click on Edit Scheme....
  • in Run (Debug) select the Arguments tab
  • in Environment Variables click +
  • add variable: OS_ACTIVITY_MODE = disable

screenshot

like image 189
Ed. Avatar answered Nov 20 '22 02:11

Ed.


It comes from +[UIWindow _synchronizeDrawingAcrossProcessesOverPort:withPreCommitHandler:] via os_log API. It doesn't depend from another components/frameworks that you are using(only from UIKit) - it reproduces in clean single view application project on changing interface orientation.

This method consists from 2 parts:

  1. adding passed precommit handler to list of handlers;
  2. do some work, that depends on current finite state machine state.

When second part fails (looks like prohibited transition), it prints message above to error log. However, I think that this problem is not fatal: there are 2 additional assert cases in this method, that will lead to crash in debug.

Seems that radar is the best we can do.

like image 30
Roman Ermolov Avatar answered Nov 20 '22 03:11

Roman Ermolov


Try putting the following in the environment variables for the scheme under run(debug)

OS_ACTIVITY_MODE = disable
like image 83
Nick Peachey Avatar answered Nov 20 '22 03:11

Nick Peachey


We can mute it in this way (device and simulator need different values):

Add the Name OS_ACTIVITY_MODE and the Value ${DEBUG_ACTIVITY_MODE} and check it (in Product -> Scheme -> Edit Scheme -> Run -> Arguments -> Environment).

enter image description here

Add User-Defined Setting DEBUG_ACTIVITY_MODE, then add Any iOS Simulator SDK for Debug and set it's value to disable (in Project -> Build settings -> + -> User-Defined Setting)

enter image description here

like image 13
Igor Avatar answered Nov 20 '22 03:11

Igor