DynamicBlurView
DynamicBlurView copied to clipboard
Crash within the Blur Layer
Exception Type: SIGSEGV Exception Codes: SEGV_ACCERR at 0x16904ee488 Crashed Thread: 0
Thread 0 Crashed:
0 CoreGraphics 0x00000001ed830ddc CGColorGetAlpha + 12
1 QuartzCore 0x00000001f0086bf4 -[CALayer _renderBorderInContext:] + 144
2 QuartzCore 0x00000001f0088b5c -[CALayer renderInContext:] + 1396
3 QuartzCore 0x00000001f0086ea4 -[CALayer _renderSublayersInContext:] + 368
4 QuartzCore 0x00000001f0088b48 -[CALayer renderInContext:] + 1376
5 QuartzCore 0x00000001f0086ea4 -[CALayer _renderSublayersInContext:] + 368
6 QuartzCore 0x00000001f0088b48 -[CALayer renderInContext:] + 1376
7 QuartzCore 0x00000001f0086ea4 -[CALayer _renderSublayersInContext:] + 368
8 QuartzCore 0x00000001f0088b48 -[CALayer renderInContext:] + 1376
9 QuartzCore 0x00000001f0086ea4 -[CALayer _renderSublayersInContext:] + 368
10 QuartzCore 0x00000001f0088b48 -[CALayer renderInContext:] + 1376
11 QuartzCore 0x00000001f0086ea4 -[CALayer _renderSublayersInContext:] + 368
12 QuartzCore 0x00000001f0088b48 -[CALayer renderInContext:] + 1376
13 QuartzCore 0x00000001f0086ea4 -[CALayer _renderSublayersInContext:] + 368
14 QuartzCore 0x00000001f0088b48 -[CALayer renderInContext:] + 1376
15 QuartzCore 0x00000001f0086ea4 -[CALayer _renderSublayersInContext:] + 368
16 QuartzCore 0x00000001f0088b48 -[CALayer renderInContext:] + 1376
17 QuartzCore 0x00000001f0086ea4 -[CALayer _renderSublayersInContext:] + 368
18 QuartzCore 0x00000001f0088b48 -[CALayer renderInContext:] + 1376
19 QuartzCore 0x00000001f0086ea4 -[CALayer _renderSublayersInContext:] + 368
20 QuartzCore 0x00000001f0088b48 -[CALayer renderInContext:] + 1376
21 QuartzCore 0x00000001f0086ea4 -[CALayer _renderSublayersInContext:] + 368
22 QuartzCore 0x00000001f0088b48 -[CALayer renderInContext:] + 1376
23 DynamicBlurView 0x00000001060da560 DynamicBlurView.BlurLayer.render(in: __C.CGContextRef, for: __C.CALayer) -> () (BlurLayer.swift:94)
24 DynamicBlurView 0x00000001060df684 DynamicBlurView.DynamicBlurView.(snapshotImage in _2044C6510BFEB36C5566C936E3D26E26)(for: __C.CALayer, conversion: Swift.Bool) -> __C.UIImage? (DynamicBlurView.swift:142)
25 DynamicBlurView 0x00000001060dffd8 function signature specialization <Arg[0] = Dead> of DynamicBlurView.DynamicBlurView.display(__C.CALayer) -> () (DynamicBlurView.swift:156)
26 DynamicBlurView 0x00000001060df7b4 @objc DynamicBlurView.DynamicBlurView.display(__C.CALayer) -> () (
crash report:
func render(in context: CGContext, for layer: CALayer) {
let layers = hideOverlappingLayers(layer.sublayers)
layer.render(in: context) <------------------------------ here
layers.forEach {
$0.isHidden = false
}
}
private func snapshotImage(for layer: CALayer, conversion: Bool) -> UIImage? {
let rect = blurLayerRect(to: layer, conversion: conversion)
guard let context = CGContext.imageContext(with: quality, rect: rect, opaque: isOpaque) else {
return nil
}
blurLayer.render(in: context, for: layer) <------------------------------ here
defer {
UIGraphicsEndImageContext()
}
return UIGraphicsGetImageFromCurrentImageContext()
}
extension DynamicBlurView {
open override func display(_ layer: CALayer) {
let blurRadius = blurLayer.presentationRadius
let isFixes = isDeepRendering && staticImage != nil
if let view = renderingTarget, let image = staticImage ?? snapshotImage(for: view.layer, conversion: !isFixes) { <------------------------------ here <Arg[0] = Dead> of DynamicBlurView.DynamicBlurView.display(__C.CALayer) -> () (DynamicBlurView.swift:156)
draw(image, blurRadius: blurRadius, fixes: isFixes, baseLayer: view.layer)
}
}
}
extension DynamicBlurView {
/// Remove cache of blur image then get it again.
open func refresh() {
blurLayer.refresh()
staticImage = nil
blurRatio = 1
display(layer) <------------------------------ here
}
Hope you can help me to fix it.
The crash only happens sometimes.
Another Crash Today:
Code Type: ARM-64 Parent Process: ??? [1]
Date/Time: 2019-08-26T15:02:54Z Launch Time: 2019-08-25T20:16:13Z OS Version: iPhone OS 12.4 (16G77) Report Version: 104
Exception Type: SIGSEGV Exception Codes: SEGV_ACCERR at 0x1691e8d7d8 Crashed Thread: 0
Thread 0 Crashed: 0 CoreGraphics 0x00000001ad268ddc CGColorGetAlpha + 12 1 QuartzCore 0x00000001afabebf4 -[CALayer _renderBorderInContext:] + 144 2 QuartzCore 0x00000001afac0b5c -[CALayer renderInContext:] + 1396 3 QuartzCore 0x00000001afabeea4 -[CALayer _renderSublayersInContext:] + 368 4 QuartzCore 0x00000001afac0b48 -[CALayer renderInContext:] + 1376 5 QuartzCore 0x00000001afabeea4 -[CALayer _renderSublayersInContext:] + 368 6 QuartzCore 0x00000001afac0b48 -[CALayer renderInContext:] + 1376 7 QuartzCore 0x00000001afabeea4 -[CALayer _renderSublayersInContext:] + 368 8 QuartzCore 0x00000001afac0b48 -[CALayer renderInContext:] + 1376 9 QuartzCore 0x00000001afabeea4 -[CALayer _renderSublayersInContext:] + 368 10 QuartzCore 0x00000001afac0b48 -[CALayer renderInContext:] + 1376 11 QuartzCore 0x00000001afabeea4 -[CALayer _renderSublayersInContext:] + 368 12 QuartzCore 0x00000001afac0b48 -[CALayer renderInContext:] + 1376 13 QuartzCore 0x00000001afabeea4 -[CALayer _renderSublayersInContext:] + 368 14 QuartzCore 0x00000001afac0b48 -[CALayer renderInContext:] + 1376 15 QuartzCore 0x00000001afabeea4 -[CALayer _renderSublayersInContext:] + 368 16 QuartzCore 0x00000001afac0b48 -[CALayer renderInContext:] + 1376 17 QuartzCore 0x00000001afabeea4 -[CALayer _renderSublayersInContext:] + 368 18 QuartzCore 0x00000001afac0b48 -[CALayer renderInContext:] + 1376 19 QuartzCore 0x00000001afabeea4 -[CALayer _renderSublayersInContext:] + 368 20 QuartzCore 0x00000001afac0b48 -[CALayer renderInContext:] + 1376 21 QuartzCore 0x00000001afabeea4 -[CALayer _renderSublayersInContext:] + 368 22 QuartzCore 0x00000001afac0b48 -[CALayer renderInContext:] + 1376 23 DynamicBlurView 0x0000de8103716bb4 0x103710000 + 27572 24 DynamicBlurView 0x000000010371de28 0x103710000 + 56872 25 DynamicBlurView 0x000000010371e32c 0x103710000 + 58156 26 DynamicBlurView 0x000000010371e484 0x103710000 + 58500 27 DynamicBlurView 0x000000010371e6d0 0x103710000 + 59088 28 PopupDialog 0x0000000107235330 0x107210000 + 152368 29 PopupDialog 0x0000000107235384 0x107210000 + 152452 30 UIKitCore 0x00000001d8dbefe4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1116 31 libobjc.A.dylib 0x00000001aa6e3454 -[NSObject performSelector:withObject:] + 64 32 QuartzCore 0x00000001afabbdb4 -[CALayer layoutSublayers] + 184 33 QuartzCore 0x00000001afabc0a0 CA::Layer::layout_if_needed(CA::Transaction*) + 332 34 QuartzCore 0x00000001afabbf1c -[CALayer layoutIfNeeded] + 228 35 QuartzCore 0x00000001afac0690 -[CALayer renderInContext:] + 168 36 DynamicBlurView 0x006d9b8103716bb4 0x103710000 + 27572 37 DynamicBlurView 0x000000010371de28 0x103710000 + 56872 38 DynamicBlurView 0x000000010371cbc8 0x103710000 + 52168 39 DynamicBlurView 0x000000010371cc30 0x103710000 + 52272 40 UIKitCore 0x00000001d8db6288 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1604 41 UIKitCore 0x00000001d8db5edc -[UIView(Internal) _didMoveFromWindow:toWindow:] + 664 42 UIKitCore 0x00000001d8da92ac __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 156 43 Foundation 0x00000001abe6f634 -[NSISEngine withBehaviors:performModifications:] + 112 44 UIKitCore 0x00000001d8da918c -[UIView(Hierarchy) _postMovedFromSuperview:] + 816 45 UIKitCore 0x00000001d8db8d20 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1740 46 PopupDialog 0x007ca581072349b4 0x107210000 + 149940 47 PopupDialog 0x0000000107234dec 0x107210000 + 151020 48 UIKitCore 0x00000001d8265c8c __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 2224 49 UIKitCore 0x00000001d82636e0 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 468 50 UIKitCore 0x00000001d8347a64 __40+[UIViewController _scheduleTransition:]_block_invoke + 24 51 UIKitCore 0x00000001d89151fc _runAfterCACommitDeferredBlocks + 300 52 UIKitCore 0x00000001d89033bc _cleanUpAfterCAFlushAndRunDeferredBlocks + 352 53 UIKitCore 0x00000001d8931a3c _afterCACommitHandler + 116 54 CoreFoundation 0x00000001ab4720e8 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 32 55 CoreFoundation 0x00000001ab46cbe0 __CFRunLoopDoObservers + 412 56 CoreFoundation 0x00000001ab46d140 __CFRunLoopRun + 1208 57 CoreFoundation 0x00000001ab46c964 CFRunLoopRunSpecific + 448 58 GraphicsServices 0x00000001ad6add8c GSEventRunModal + 104 59 UIKitCore 0x00000001d8909758 UIApplicationMain + 212 60 VW-R-CLUB Member APP 0x0040548102a583a0 0x1024c8000 + 5833632 61 libdyld.dylib 0x00000001aaf28fd8 start + 0
Maybee thispictures can help to find the bug:
![Bildschirmfoto 2019-09-02 um 16 07 04](https://user-images.githubusercontent.com/5628005/64120497-a8accd00-cd9c-11e9-9e44-47d792519a42.png)
![Bildschirmfoto 2019-09-02 um 16 06 46](https://user-images.githubusercontent.com/5628005/64120498-a9456380-cd9c-11e9-8204-810fbe5ffdc9.png)
@Skyb0rg I appreciate your cooperation.
Even i am getting crashes of same sort.
Device : iPhone XS MAX OS : 13.1.0 (17A5821e) - beta
Please did you find a fix for this for this? Currently faced with same issue in OS 13
I removed the blur layer
@Skyb0rg please how did you remove it? i tried commenting this part out addSubview(blurView)
in popupdialogueoverlay.swift but it didnt work
I wrote a manual for removing in issues of popupdialog.
Please can i get a link to the manual
Please can i get a link to the manual
https://github.com/Orderella/PopupDialog/issues/324#issuecomment-527160062
Ok. it works well man. Thanks
Hi @Skyb0rg @ehizokhai @talk2cerlin .
Can anybody try https://github.com/KyoheiG3/PopupDialog/tree/update-module ?
I tried updating DynamicBlurView
to fix https://github.com/Orderella/PopupDialog/issues/324 but I'm not sure if it was fixed. I couldn't get this problem to occur.
Changes your Podfile
following:
pod 'PopupDialog', :git => 'https://github.com/KyoheiG3/PopupDialog.git', :branch => 'update-module'
Thanks.
Hi @KyoheiG3 I tried your fork. It doesn't help :( The app still crashes with iOS 12. Steps to reproduce:
- show popup
- move app to background
- move back to app
Hi @KyoheiG3 Any updates here?
Hi @ivulyov90 Thank you for the details. I will check it.
Could you retry after git pull or pod update? When it, please check Podfile.lock
to see if DynamicBlurView
version is 5.0.3
.
Thank you for your time @ivulyov90.
I was able to reproduce the issue in Xcode 12 beta 6 on a Simulated iOS 14 device - however, when building on a physical device running iOS 14.0, there are no issues 🤷♂️
I've tested with the pointer set to the update-module
branch.
I am getting also random crashes in production ..