App Background refresh crashing on _updateSnapshotAndStateRestorationArchiveForBackgroundEvent

Our app is experiencing a lot of crashing with the same/similar stack trace (see below)


As this stack overflow article suggests, we added code to ensure our background refresh's completion handler was executing on the main thread but, to no avail, we're still having the issue -- arguably worse than ever.


http://stackoverflow.com/questions/18974251/app-crashes-after-executing-background-fetch-completionhandler


The problem seems to be predominiately in iOS 8 devices.

Has any one else seen this?




Date/Time: 2015-06-08T06:13:36Z OS Version: iPhone OS 8.3 (12F70) Report Version: 104 Exception Type: SIGBUS Exception Codes: BUS_ADRALN at 0x100a78000 Crashed Thread: 0 Thread 0 Crashed: 0 libsystem_platform.dylib 0x0000000197549378 _platform_memmove + 296 1 Foundation 0x00000001863305b0 -[NSData(NSData) getBytes:range:] + 504 2 ImageIO 0x0000000186719b68 CGImageReadGetBytesAtOffset + 568 3 ImageIO 0x000000018671990c CGImageReadSessionGetBytes + 32 4 ImageIO 0x00000001868b96f0 read_fn + 40 5 ImageIO 0x0000000186719828 png_read_sig + 64 6 ImageIO 0x0000000186719258 _cg_png_read_info + 52 7 ImageIO 0x00000001867247f0 copyImageBlockSetPNG + 2152 8 ImageIO 0x0000000186723748 ImageProviderCopyImageBlockSetCallback + 860 9 CoreGraphics 0x0000000185755bdc subImageProviderCopyImageBlockSet + 228 10 CoreGraphics 0x00000001857502e8 img_blocks_create + 372 11 CoreGraphics 0x0000000185741624 img_data_lock + 1288 12 CoreGraphics 0x000000018574070c CGSImageDataLock + 136 13 libRIP.A.dylib 0x0000000185af9730 ripc_AcquireImage + 768 14 libRIP.A.dylib 0x0000000185af8b04 ripc_DrawImage + 600 15 CoreGraphics 0x000000018574043c CGContextDrawImage + 404 16 WebCore 0x0000000193e841b0 WebCore::GraphicsContext::drawNativeImage(CGImage*, WebCore::FloatSize const&, WebCore::ColorSpace, WebCore::FloatRect const&, WebCore::FloatRect const&, float, WebCore::CompositeOperator, WebCore::BlendMode, WebCore::ImageOrientation) + 1172 17 WebCore 0x0000000193ff64b8 WebCore::BitmapImage::draw(WebCore::GraphicsContext*, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ColorSpace, WebCore::CompositeOperator, WebCore::BlendMode, WebCore::ImageOrientationDescription) + 544 18 WebCore 0x0000000193eb7ca0 WebCore::Image::drawTiled(WebCore::GraphicsContext*, WebCore::FloatRect const&, WebCore::FloatPoint const&, WebCore::FloatSize const&, WebCore::ColorSpace, WebCore::CompositeOperator, WebCore::BlendMode) + 696 19 WebCore 0x00000001948156bc WebCore::RenderBoxModelObject::paintFillLayerExtended(WebCore::PaintInfo const&, WebCore::Color const&, WebCore::FillLayer const*, WebCore::LayoutRect const&, WebCore::BackgroundBleedAvoidance, WebCore::InlineFlowBox*, WebCore::LayoutSize const&, WebCore::CompositeOperator, WebCore::RenderElement*, WebCore::BaseBackgroundColorUsage) + 4632 20 WebCore 0x000000019480ef40 WebCore::RenderBox::paintFillLayers(WebCore::PaintInfo const&, WebCore::Color const&, WebCore::FillLayer const*, WebCore::LayoutRect const&, WebCore::BackgroundBleedAvoidance, WebCore::CompositeOperator, WebCore::RenderElement*) + 828 21 WebCore 0x0000000193e0afd8 WebCore::RenderBox::paintBackground(WebCore::PaintInfo const&, WebCore::LayoutRect const&, WebCore::BackgroundBleedAvoidance) + 476 22 WebCore 0x0000000193e0a5ec WebCore::RenderBox::paintBoxDecorations(WebCore::PaintInfo&, WebCore::LayoutPoint const&) + 668 23 WebCore 0x0000000193e07f2c WebCore::RenderBlock::paintObject(WebCore::PaintInfo&, WebCore::LayoutPoint const&) + 276 24 WebCore 0x0000000193e09f48 WebCore::RenderBlock::paint(WebCore::PaintInfo&, WebCore::LayoutPoint const&) + 312 25 WebCore 0x0000000193e07ce0 WebCore::RenderLayer::paintBackgroundForFragments(***::Vector<WebCore::LayerFragment, 1ul, ***::CrashOnOverflow> const&, WebCore::GraphicsContext*, WebCore::GraphicsContext*, WebCore::LayoutRect const&, bool, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int, WebCore::RenderObject*) + 308 26 WebCore 0x0000000193e06e20 WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 1952 27 WebCore 0x0000000193e0646c WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 1068 28 WebCore 0x0000000193e07054 WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 2516 29 WebCore 0x0000000193e0646c WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 1068 30 WebCore 0x0000000193e07054 WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 2516 31 WebCore 0x0000000193e0646c WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) + 1068 32 WebCore 0x000000019484291c WebCore::RenderLayer::paint(WebCore::GraphicsContext*, WebCore::LayoutRect const&, unsigned int, WebCore::RenderObject*, unsigned int) + 136 33 WebCore 0x0000000193e05b68 WebCore::FrameView::paintContents(WebCore::GraphicsContext*, WebCore::IntRect const&) + 332 34 WebKitLegacy 0x0000000194c691f0 -[WebFrame(WebInternal) _drawRect:contentsOnly:] + 264 35 WebKitLegacy 0x0000000194c69080 -[WebHTMLView drawSingleRect:] + 84 36 WebKitLegacy 0x0000000194c68fc0 -[WebHTMLView drawRect:] + 32 37 WebCore 0x0000000193e0549c -[WAKView _drawRect:context:lockFocus:] + 288 38 WebCore 0x0000000193e05584 -[WAKView _drawRect:context:lockFocus:] + 520 39 WebCore 0x0000000193e05584 -[WAKView _drawRect:context:lockFocus:] + 520 40 WebCore 0x0000000193e05584 -[WAKView _drawRect:context:lockFocus:] + 520 41 WebCore 0x0000000193e05584 -[WAKView _drawRect:context:lockFocus:] + 520 42 WebCore 0x0000000194a558b8 WebCore::LegacyTileCache::drawWindowContent(LegacyTileLayer*, CGContext*, CGRect) + 616 43 WebCore 0x0000000194a55a48 WebCore::LegacyTileCache::drawLayer(LegacyTileLayer*, CGContext*) + 352 44 QuartzCore 0x000000018989ce04 CABackingStoreUpdate_ + 2576 45 QuartzCore 0x000000018989c3e0 x_blame_allocations + 104 46 QuartzCore 0x000000018989bf64 CA::Layer::display_() + 1272 47 QuartzCore 0x000000018987ca7c CA::Layer::display_if_needed(CA::Transaction*) + 240 48 QuartzCore 0x000000018987c734 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 40 49 QuartzCore 0x000000018987bebc CA::Context::commit_transaction(CA::Transaction*) + 272 50 QuartzCore 0x000000018987bc3c CA::Transaction::commit() + 524 51 UIKit 0x000000018a1a9d18 _UIWindowUpdateVisibleContextOrder + 236 52 UIKit 0x000000018a1a9b60 +[UIWindow _prepareWindowsPassingTestForAppResume:] + 28 53 UIKit 0x000000018a1d2780 -[UIApplication _updateSnapshotAndStateRestorationArchiveForBackgroundEvent:saveState:exitIfCouldNotRestoreState:] + 192 54 UIKit 0x000000018a1d1994 __80-[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:]_block_invoke_2 + 132 55 libdispatch.dylib 0x0000000197371994 _dispatch_call_block_and_release + 20 56 libdispatch.dylib 0x0000000197371954 _dispatch_client_callout + 12 57 libdispatch.dylib 0x000000019737620c _dispatch_main_queue_callback_4CF + 1604 58 CoreFoundation 0x00000001854b37f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8 59 CoreFoundation 0x00000001854b18a0 __CFRunLoopRun + 1488 60 CoreFoundation 0x00000001853dd2d4 CFRunLoopRunSpecific + 392 61 GraphicsServices 0x000000018ebf36fc GSEventRunModal + 164 62 UIKit 0x0000000189fa2fac UIApplicationMain + 1484 63 myApp 0x000000010008aeec main (main.m:16) 64 libdyld.dylib 0x000000019739ea08 start + 0

I'm having the same issue, 2,000 crashes related to this and no idea how to fix. Did you find a solution?

App Background refresh crashing on _updateSnapshotAndStateRestorationArchiveForBackgroundEvent
 
 
Q