1

My (foreground) app is getting evicted off an ios9 device (ipad mini 3 A1599) whenever I'm sitting on camera capture screen. I'm seeing this

SpringBoard[54] <Warning>: Communications error: <OS_xpc_error: <error: 0x19d654af0> { count = 1, contents =
        "XPCErrorDescription" => <string: 0x19d654e50> { length = 22, contents = "Connection interrupted" }
    }>

Shortly before "the final cut" manifested in these:

Sep 29 13:17:33 ipad-mini mediaserverd[25] <Notice>: '' (pid = 4278) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None
Sep 29 13:17:33 ipad-mini CommCenter[75] <Notice>: Connection interrupted!
Sep 29 13:17:33 ipad-mini UserEventAgent[23] <Notice>: jetsam: kernel termination snapshot being created

No crashes in Devices/View Device Logs No crashes in itunesconnect (seems to be a known issue in ios up to 9.0.1: Installations, Sessions, and Active Devices aren't currently being reported for iOS 9 users. This will be resolved soon in an upcoming iOS update.)

Any idea what are causing these bizarre "crashes"?

Very same issue on iphone 6 running 9.0.1 also

Sep 29 13:33:48 iPhone6minus yourId[465] <Warning>: Memory in use: 28 MB
Sep 29 13:33:49 iPhone6minus duetexpertd[481] <Warning>: Found bundle: file:///System/Library/DuetExpertCenter/Experts/AppPrediction.bundle/
Sep 29 13:33:49 iPhone6minus sharingd[194] <Error>: 13:33:49.078 : SDConnectionManager:: XPC connection invalidated
Sep 29 13:33:49 iPhone6minus ReportCrash[482] <Warning>: saved type '298' report (1 of max 25) as /var/mobile/Library/Logs/CrashReporter/JetsamEvent-2015-09-29-133348.ips

UPD 20150929: I've tracked this down to - (CGImageRef)CIContext::createCGImage:(CIImage *)image fromRect:(CGRect)fromRect

Meaning: when I pluck that call ios9 stops booting the app off the device (and performance skyrockets). Now all I need is to find a (working) alternative to that call :=[

UPD 20151001: removed memory references cause this is clearly not a memory pressure related eviction (see previous update)

Anton Tropashko
  • 5,486
  • 5
  • 41
  • 66

1 Answers1

3

Not an answer to your question but I've noticed some really bad things after updating to iOS 9. My app captures video and uses CIContext to filter, combine and render video frames. And after the update CIContext stopped working as it worked before. Now my app simply crashes after few seconds of running. As I can see this happens because of some memory overloading, especially the video memory. I use CIContext contextWithEAGLContext to create context and then render filtered image to CVPixelBuffer.

The only thing that 'helps' to avoid memory issue is creating and releasing the context every time I want to render the frame, and this is too expensive of course. (no ARC)

So until they fix it my app is practically dead. So is GPUImage by Brad Larson, so is RosyWriter - Apple's own example.

krafter
  • 1,425
  • 1
  • 15
  • 28
  • Yeah, I also plan to widen GPUImage useage in my project to the tasks that coreimage used to do just fine up until ios9. Removing coreimage->coregraphics path seems like an (undesirable but a) fix. Fyi: my CIContext is a global one untethered to GLES context. – Anton Tropashko Oct 06 '15 at 08:59
  • I give up. I switched to GPUImage gauss filter on ios9 and up :-[ The bounty is yours. – Anton Tropashko Oct 07 '15 at 12:01
  • ditched CIColorMatrix as well :-( – Anton Tropashko Oct 07 '15 at 12:53
  • Sorry, but I also give up here. I found a similar case on Apple forums and they say the problem is solved on iOS beta 9.1b3. So I just going to wait. – krafter Oct 07 '15 at 18:47
  • How do you plan to deal with 9.0.x support? Have two alternative code paths with GPUImage fallback on 9.0 or have a disclaimer that the app is likely to appear faulty on 9.0 and force the users to upgrade to 9.1 from 9 beta? – Anton Tropashko Oct 27 '15 at 07:24
  • Ask them to update to 9.1 and later versions. Not supporting 9.0, simply disable the faulty functionality and inform users about the problem. – krafter Oct 27 '15 at 15:50
  • https://github.com/BradLarson/GPUImage/issues/2093 check this may be related to our issue. – krafter Nov 17 '15 at 14:11
  • could not vouch for CoreImage related evictions without a trace but the random crashes in apple stack seem to be gone when using xcode 6.4. (knocking on wood) – Anton Tropashko Nov 18 '15 at 12:02