iMessage app: _UIViewServiceInterfaceErrorDomain error code 3

My iMessage randomly crashes at runtime with following error message:


viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)"
UserInfo={Message=Service Connection Interrupted}
Program ended with exit code: 0


I wasn't able to narrow down the problem so I can't provide steps to reproduce, anyone else seeing the same thing? Should I file a radar anyway? My app is pretty CPU / IO - demanding, and crashes seem to happen at peak points, sometimes at app launch, sometimes when reading image from library with UIImagePickerController. I do image processing and use AV Foundation in my app.


This happens in iOS 10 beta 5 and happened in previous betas too. I don't remember seeing this problem in my another iMessage app which is less resource-demanding.

Replies

Have you found the problem? I'm experiencing the same but haven't found a resolution.

Same problem, no solution. Seems to have suddenly become more of a problem in GM XCode 8's simulator.

Please get bug reports written up with details and logs if you have available. Please look for any crash logs, and if you have apps that are exhibiting this it would be great to attach an .ipa to the bug report. Please post bug numbers here so we can track them.

I misread this report. I may have seen this problem but am not sure. I'll post a bug number if I duplicate it.

OK, this happens when I return to springboard from messages with my messages app open. It also happens whether I've any other message app open.


viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}

Program ended with exit code: 0



Some other log messages that showed up at same time, I'll file a radar.


[Application] Restoring application state. isComposingNew=NO groupID=<private>

2016-09-11 15:41:01.112380 MobileSMS[4047:888742] [Application] => Looking up conversation with group ID: <private>

2016-09-11 15:41:01.112797 MobileSMS[4047:888742] [Application] => Found conversation: <private>

2016-09-11 15:41:01.113052 MobileSMS[4047:888742] [Application] => Found composition: (null)

2016-09-11 15:41:01.113086 MobileSMS[4047:888742] [Application] => Found composition has non-whitespace: NO

2016-09-11 15:41:01.113102 MobileSMS[4047:888742] [Application] => Found composition has content: NO

2016-09-11 15:41:01.113162 MobileSMS[4047:888742] [Application] => Restoring to last conversation <private>

2016-09-11 15:41:03.329030 MobileSMS[4047:888742] [Warning] There is no place in heaven where the items can fit with the current collectionViewBounds {{0, 0}, {0, 0}} itemSize: {60, 58}

2016-09-11 15:41:03.447591 MobileSMS[4047:888742] [Warning] IMBalloonPluginManager. Did not find any plugin for id com.apple.messages.browser.RecentPlugin

2016-09-11 15:41:03.447691 MobileSMS[4047:888742] [Warning] IMBalloonPluginManager. Did not find any plugin for id com.apple.messages.browser.RecentPlugin

2016-09-11 15:41:03.450929 MobileSMS[4047:888742] [Warning] IMBalloonPluginManager. Did not find any plugin for id com.apple.messages.browser.RecentPlugin

2016-09-11 15:41:03.451019 MobileSMS[4047:888742] [Warning] IMBalloonPluginManager. Did not find any plugin for id com.apple.messages.browser.RecentPlugin

Radar #

28251921

I just started noticing this issue when I tested my Messages Extension on iPhone 7 Plus. I found that the following was problematic;


var scale: CGFloat = UIScreen.main.scale
UIGraphicsBeginImageContextWithOptions(inImage.size, false, scale)


In my testing, if I manually set scale to 2.0 (which it is on all devices exception iPhone 6/6s/7 Plus), the issue went away. Not sure if this will help your case, but could be worth investigating.

I'm experencing this crash as well when the iMessage app is in fullscreen and I call UIGraphicsBeginImageContextWithOptions. Remove that and the crash stops.


@brandonK212 Your fix doesn't seem to work for me 😟

Managed to fix this just then! Just had to wrap the context code inside a @autoreleasepool:


@autoreleasepool {
                UIGraphicsBeginImageContextWithOptions(image.size, NO, 1.0);
                // Your code
                UIGraphicsEndImageContext();
            }

Many thanks for this which seems to have solved isses we were having with our message extension terminating when composing a message. I am very curious as to *why* this works, but for now I'm just happy to have a solution 🙂