10

My App crashes randomly with this error:

 [ServicesDaemonManager] interruptionHandler is called.
 -[FontServicesDaemonManager connection]_block_invoke

(didReceiveMemoryWarning fires before the error message)

It is a bit hard to post code because of the randomness. I use SwiftUI (UIHostingController), @ObserverObjects, async network calls, transitions to other views, etc.

It all works fine most of the time but sometimes i ran into this error. The memory is then increasing constantly until the app crashes.

I tried to fix all possible memory leaks (to deallocate all images, [weak self], ...) didn't help.

I'am not sure what the FontServicesDaemonManager is doing and in what way it is involved but all fonts are using the system font:

 .font(Font.system(size: 25 , weight: .regular))

Sometimes also this error appears right after the one from obove:

-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on <UIWindow: 0x10aab11a0; frame = (0 0; 375 812); gestureRecognizers = <NSArray: 0x10acb2510>; layer = <UIWindowLayer: 0x10aacbee0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.

Anyone ran into similar issues or has an idea how to fix this? (Xcode 11.6)

Update: This problem is usually related to Autolayout constraints. Please check your constraints of all related views.

Peter Pohlmann
  • 1,478
  • 15
  • 30
  • Have you fixed it? I have started facing it in XCode 13, iOS 15. I never had it in XCode 12.x, iOS 14.x – smoothBlue Oct 24 '21 at 20:14
  • --> The problem i had was related to Autolayout and some constraints that did work for fullscreen for a specific view. I changed the Autolayout constraints and since then i had no crashes related to this issue anymore.. – Peter Pohlmann Nov 10 '21 at 12:17

3 Answers3

1

Hope you got the answer, I am here describing my scenario:

I got the same error with Xcode 11.6, the issue was I had enabled the zoombie object on scheme & it was creating [ServicesDaemonManager] interruptionHandler. So please check it. Reason behind memory warning was loading of high resolution images on mail thread which was not good. Adding download image in background thread worked for me.

Thanks, Ratneshwar

0

The problem i had was related to Autolayout and some constraints that did work for fullscreen for a specific view. I changed the Autolayout constraints and since then i had no crashes related to this issue anymore..

Peter Pohlmann
  • 1,478
  • 15
  • 30
0

This problem is usually related to constraints, there must be some ambiguity with your constraints, that's why you are getting this error. Had the same issue with one of my collection views, because the constraints were not properly set for smaller screens. Check the constraints again and you will be good to go.

  • yes --->>, The problem i had was related to Autolayout and some constraints that did work for fullscreen for a specific view. I changed the Autolayout constraints and since then i had no crashes related to this issue anymore. – Peter Pohlmann Feb 16 '22 at 13:59