adform / adform-ios-sdk

adform-ios-sdk
MIT License
8 stars 8 forks source link

Terminating app due to uncaught exception 'NSInvalidArgumentException' #31

Closed BozhkoAlexander closed 5 years ago

BozhkoAlexander commented 5 years ago

Hi! I get this exception every time when I try to load usual ad into AFAdInline view on iOS 13 beta.

Crash log: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot get value with size 32. The type encoded as {CGPoint=dd} is expected to be 16 bytes' First throw call stack: ( 0 CoreFoundation 0x00007fff23b60e3e exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff502f3b20 objc_exception_throw + 48 2 Foundation 0x00007fff256b3809 -[NSConcreteValue objCType] + 0 3 UIKitCore 0x00007fff4696c5dc _getNSValueBytes + 576 4 UIKitCore 0x00007fff4696c2bc -[NSValue(NSValueUIGeometryExtensions) CGRectValue] + 41 5 My app 0x00000001018d023b -[AFAdInline observeValueForKeyPath:ofObject:change:context:] + 160 6 Foundation 0x00007fff2564a4ee NSKeyValueNotifyObserver + 329 7 Foundation 0x00007fff2564dc0b NSKeyValueDidChange + 499 8 Foundation 0x00007fff2564d50e -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 741 9 Foundation 0x00007fff2564de07 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 68 10 Foundation 0x00007fff25648ec2 _NSSetPointValueAndNotify + 304 11 UIKitCore 0x00007fff471b6f2a -[UIScrollView _adjustContentOffsetIfNecessary] + 53 12 UIKitCore 0x00007fff47193056 -[UIScrollView setContentSize:] + 2192 13 UIKitCore 0x00007fff465552e7 -[UICollectionView setContentSize:] + 106 14 UIKitCore 0x00007fff46579644 -[UICollectionView _updateAnimationDidStop:finished:context:] + 2192 15 UIKitCore 0x00007fff46578c92 71-[UICollectionView _updateWithItems:tentativelyForReordering:animator:]_block_invoke_3 + 77 16 UIKitCore 0x00007fff465b4517 47-[UICollectionViewAnimation startWithAnimator:]_block_invoke.213 + 265 17 UIKitCore 0x00007fff472182bc -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 671 18 UIKitCore 0x00007fff471e916d -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 268 19 UIKitCore 0x00007fff471e96df -[UIViewAnimationState animationDidStop:finished:] + 259 20 QuartzCore 0x00007fff2b28e786 _ZN2CA5Layer23run_animation_callbacksEPv + 306 21 libdispatch.dylib 0x0000000104227d64 _dispatch_client_callout + 8 22 libdispatch.dylib 0x0000000104235e1c _dispatch_main_queue_callback_4CF + 1500 23 CoreFoundation 0x00007fff23ac3e19 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 24 CoreFoundation 0x00007fff23abea79 CFRunLoopRun + 2329 25 CoreFoundation 0x00007fff23abde36 CFRunLoopRunSpecific + 438 26 GraphicsServices 0x00007fff37f64bb0 GSEventRunModal + 65 27 UIKitCore 0x00007fff46d562a3 UIApplicationMain + 1621 28 My app 0x00000001010b4edb main + 75 29 libdyld.dylib 0x00007fff51175cf5 start + 1 30 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

NavPatrik commented 5 years ago

Got the same problem here, iOS 13 beta. (Not verified on older)

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot get value with size 32. The type encoded as {CGPoint=dd} is expected to be 16 bytes' First throw call stack: ( 0 CoreFoundation 0x00007fff23b60e3e exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff502f3b20 objc_exception_throw + 48 2 Foundation 0x00007fff256b3809 -[NSConcreteValue objCType] + 0 3 UIKitCore 0x00007fff4696c5dc _getNSValueBytes + 576 4 UIKitCore 0x00007fff4696c2bc -[NSValue(NSValueUIGeometryExtensions) CGRectValue] + 41 5 AdformService 0x00000001099f72f9 -[AFAdInline observeValueForKeyPath:ofObject:change:context:] + 160 6 Foundation 0x00007fff2564a4ee NSKeyValueNotifyObserver + 329 7 Foundation 0x00007fff2564dc0b NSKeyValueDidChange + 499 8 Foundation 0x00007fff2564d50e -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 741 9 Foundation 0x00007fff2564de07 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 68 10 Foundation 0x00007fff25648ec2 _NSSetPointValueAndNotify + 304 11 UIKitCore 0x00007fff471b6f2a -[UIScrollView _adjustContentOffsetIfNecessary] + 53 12 UIKitCore 0x00007fff47193056 -[UIScrollView setContentSize:] + 2192 13 UIKitCore 0x00007fff46f3f03f -[UITableView setContentSize:] + 42 14 UIKitCore 0x00007fff46f3f0b9 -[UITableView setContentSize:skipContentOffsetAdjustment:] + 99 15 UIKitCore 0x00007fff46f61187 -[UITableView _applyContentSizeDeltaImmediately:] + 248 16 UIKitCore 0x00007fff46f61263 -[UITableView _applyCoalescedContentSizeUpdates] + 48 17 UIKitCore 0x00007fff46f1ce2e -[UITableView _updateVisibleCellsNow:] + 4352 18 UIKitCore 0x00007fff46f3c53c -[UITableView layoutSubviews] + 163 19 UIKitCore 0x00007fff47224cb3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2478 20 QuartzCore 0x00007fff2b27c655 -[CALayer layoutSublayers] + 255 21 QuartzCore 0x00007fff2b28105b _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 517 22 QuartzCore 0x00007fff2b28d740 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 80 23 QuartzCore 0x00007fff2b1d5d98 _ZN2CA7Context18commit_transactionEPNS_11TransactionEd + 324 24 QuartzCore 0x00007fff2b20b3a3 _ZN2CA11Transaction6commitEv + 643 25 UIKitCore 0x00007fff46d6d975 34-[UIApplication _firstCommitBlock]_block_invoke_2 + 81 26 CoreFoundation 0x00007fff23ac406c CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12 27 CoreFoundation 0x00007fff23ac37d8 CFRunLoopDoBlocks + 312 28 CoreFoundation 0x00007fff23abe664 CFRunLoopRun + 1284 29 CoreFoundation 0x00007fff23abde36 CFRunLoopRunSpecific + 438 30 GraphicsServices 0x00007fff37f64bb0 GSEventRunModal + 65 31 UIKitCore 0x00007fff46d562a3 UIApplicationMain + 1621 32 AdformServiceExample 0x000000010945849b main + 75 33 libdyld.dylib 0x00007fff51175cf5 start + 1

NavPatrik commented 5 years ago

Also, I'm guessing that this could be related (thrown on earlier versions) [UIKit] Attempt to obtain CGRect from NSValue containing {CGPoint=dd}: NSPoint: {0, 3684.3333333333335}. In future versions this will throw an exception. Returning empty values.

vladasdrejeris commented 5 years ago

Hello,

This issue has been fixed in 2.13.5 SDK version.