sumup / sumup-ios-sdk

Other
46 stars 24 forks source link

App crash since iOS 16 (not with iOS 15) #126

Closed Docgg closed 2 months ago

Docgg commented 1 year ago

Since iOS 16, I could not use sumup SDK. I have this fatal error when I try to launch VNDocumentCameraViewController let scannerViewController = VNDocumentCameraViewController() scannerViewController.delegate = self present(scannerViewController, animated: true)

fatal error each time

0 CoreFoundation 0x18add6248 exceptionPreprocess + 164 1 libobjc.A.dylib 0x1841a3a68 objc_exception_throw + 60 2 CoreFoundation 0x18af7a6d4 -[NSCFString characterAtIndex:].cold.1 + 0 3 CoreFoundation 0x18af77a74 -[NSPlaceholderArray initWithCapacity:].cold.1 + 0 4 CoreFoundation 0x18add1828 -[NSPlaceholderArray initWithObjects:count:] + 252 5 CoreFoundation 0x18add2b1c +[NSArray arrayWithObjects:count:] + 40 6 UIKitCore 0x18d387f5c +[UIImageSymbolConfiguration configurationWithHierarchicalColor:] + 124 7 UIKitCore 0x18d7ffd60 -[_UIImageCUIVectorGlyphContent _automaticSymbolConfiguration] + 104 8 UIKitCore 0x18cff6434 -[UIImageView _symbolConfigurationForImage:] + 72 9 UIKitCore 0x18cfc77cc -[UIImageView _resolvedImageFromImage:forTrait:] + 96 10 UIKitCore 0x18cf941fc -[UIImageView _resolvedImageFromImage:] + 152 11 UIKitCore 0x18cf92d5c -[UIButtonLegacyVisualProvider intrinsicSizeWithinSize:] + 132 12 UIKitCore 0x18cf92cb4 -[UIButton _intrinsicSizeWithinSize:] + 52 13 UIKitCore 0x18cfcd04c -[UIView(UIConstraintBasedLayout) intrinsicContentSize] + 120 14 UIKitCore 0x18cfcd598 -[UIButton intrinsicContentSize] + 148 15 UIKitCore 0x18cfccbe0 -[UIView _generateContentSizeConstraints] + 52 16 UIKitCore 0x18cfb74a8 -[UIView _updateContentSizeConstraints] + 244 17 UIKitCore 0x18d04b4a4 -[UIView(AdditionalLayoutSupport) _updateSystemConstraints] + 88 18 UIKitCore 0x18d0c9700 -[UIButton updateConstraints] + 72 19 UIKitCore 0x18d04b378 -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 348 20 UIKitCore 0x18d04b110 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 764 21 UIKitCore 0x18d04b02c -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 536 22 UIKitCore 0x18d04b02c -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 536 23 UIKitCore 0x18d04b02c -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 536 24 CoreAutoLayout 0x1a72a7e90 -[NSISEngine withBehaviors:performModifications:] + 84 25 UIKitCore 0x18d04ae08 100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 104 26 UIKitCore 0x18cfed6e8 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 96 27 UIKitCore 0x18cfed350 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 172 28 UIKitCore 0x18cfecf50 -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 388 29 UIKitCore 0x18d02cdec -[UIView(Hierarchy) layoutBelowIfNeeded] + 1064 30 DocumentCamera 0x1edf3c6c4 -[ICDocCamViewController initializeUserInterface] + 656 31 DocumentCamera 0x1edf3baa4 -[ICDocCamViewController viewDidLoad] + 1044 32 UIKitCore 0x18d2dd330 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 84 33 UIKitCore 0x18cf750a8 -[UIViewController loadViewIfRequired] + 712 34 UIKitCore 0x18d23c1bc -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 124 35 UIKitCore 0x18d1025ec -[UINavigationController _startTransition:fromViewController:toViewController:] + 196 36 UIKitCore 0x18d101aa4 -[UINavigationController _startDeferredTransitionIfNeeded:] + 608 37 UIKitCore 0x18d1010f4 -[UINavigationController viewWillLayoutSubviews] + 96 38 UIKitCore 0x18d101058 -[UILayoutContainerView layoutSubviews] + 172 39 UIKitCore 0x18cf5ecec -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1980 40 QuartzCore 0x18c43b4e8 CA::Layer::layout_if_needed(CA::Transaction) + 500 41 QuartzCore 0x18c44eb9c CA::Layer::layout_and_display_if_needed(CA::Transaction) + 148 42 QuartzCore 0x18c460098 CA::Context::commit_transaction(CA::Transaction, double, double) + 456 43 QuartzCore 0x18c4973c4 CA::Transaction::commit() + 652 44 QuartzCore 0x18c47e408 CA::Transaction::flush_as_runloop_observer(bool) + 88 45 CoreFoundation 0x18ae5e070 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 36 46 CoreFoundation 0x18ade6690 CFRunLoopDoObservers + 532 47 CoreFoundation 0x18ae47f8c CFRunLoopRun + 1048 48 CoreFoundation 0x18ae4d1e4 CFRunLoopRunSpecific + 612 49 GraphicsServices 0x1c3c6d368 GSEventRunModal + 164 50 UIKitCore 0x18d2fcd88 -[UIApplication _run] + 888 51 UIKitCore 0x18d2fc9ec UIApplicationMain + 340 52 digitrame 0x1019c8d88 main + 64 53 dyld 0x1a9171948 start + 2504`

Docgg commented 1 year ago

crash files 26-10-2022 08-08.txt

jadeburton-sumup commented 1 year ago

Hi Docgg, can you please confirm that this crash still occurs when 1) the SumUp SDK is not initialized or used in any way but is still linked in your app?

If it still crashes, can you 2) completely remove the linking to the SumUp framework and comment out any use of the framework to get your app to compile and run? And then confirm that it no longer crashes without the SumUp SDK

Docgg commented 1 year ago

yes I confirm, 3 days of search why my app crash....I remove all framework and sumUp was the source of it...

I check this morning with the new version and it crash again...I remove the framework, app work great.

Docgg commented 1 year ago

the crash is only when I use VNDocumentCameraViewController() present(scannerViewController, animated: true) = crash

jadeburton-sumup commented 1 year ago

I'm not sure what could be causing this. According to the stack trace you provided, the crash occurs in -[UIButton intrinsicContentSize]. As a last resort you could try swizzling that method before making the present call and then undoing the swizzle afterwards. But this would only treat the symptom and not the cause.

jadeburton-sumup commented 10 months ago

@Docgg could you please let us know if this issue is still there after release 4.3.4/4.4.0, which removed/renamed some problematic UIColor category methods.