Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App crashes with [ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke

Tags:

ios

swift

swiftui

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)

like image 456
Peter Pohlmann Avatar asked Jul 29 '20 10:07

Peter Pohlmann


1 Answers

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

like image 196
Ratneshwar Singh Avatar answered Sep 19 '22 12:09

Ratneshwar Singh