icerockdev / moko-widgets

Multiplatform UI DSL with screen management in common code for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev
Apache License 2.0
387 stars 32 forks source link

Crash on iOS 12 with system colors #36

Closed Dorofeev closed 4 years ago

Dorofeev commented 4 years ago

Demo Project crashed with exception on iOS 12

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIColor systemGray3Color]: unrecognized selector sent to class 0x117e6fd78'

full call stack


    0   CoreFoundation                      0x000000010fbd46fb __exceptionPreprocess + 331
    1   libobjc.A.dylib                     0x000000010d5baac5 objc_exception_throw + 48
    2   CoreFoundation                      0x000000010fbf29b4 +[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x000000010fbd9443 ___forwarding___ + 1443
    4   CoreFoundation                      0x000000010fbdb238 _CF_forwarding_prep_0 + 120
    5   MultiPlatformLibrary                0x000000010c973e96 kfun:dev.icerock.moko.widgets.factory.SystemInputViewFactory.InputWidgetView.<init>(padding:dev.icerock.moko.widgets.utils.Edges<kotlin.Double>)dev.icerock.moko.widgets.factory.SystemInputViewFactory.InputWidgetView + 4726
    6   MultiPlatformLibrary                0x000000010c97209d kfun:dev.icerock.moko.widgets.factory.SystemInputViewFactory.build(dev.icerock.moko.widgets.InputWidget<out_dev.icerock.moko.widgets.style.view.WidgetSize>;#GENERIC_dev.icerock.moko.widgets.style.view.WidgetSize;platform.UIKit.UIViewController)Generic + 2317
    7   MultiPlatformLibrary                0x000000010c91f796 kfun:dev.icerock.moko.widgets.InputWidget.buildView(platform.UIKit.UIViewController)dev.icerock.moko.widgets.core.ViewBundle<#GENERIC_dev.icerock.moko.widgets.style.view.WidgetSize> + 358
    8   MultiPlatformLibrary                0x000000010c941914 kfun:dev.icerock.moko.widgets.factory.ConstraintViewFactory.build(dev.icerock.moko.widgets.ConstraintWidget<out_dev.icerock.moko.widgets.style.view.WidgetSize>;#GENERIC_dev.icerock.moko.widgets.style.view.WidgetSize;platform.UIKit.UIViewController)Generic + 2628
    9   MultiPlatformLibrary                0x000000010c9192a6 kfun:dev.icerock.moko.widgets.ConstraintWidget.buildView(platform.UIKit.UIViewController)dev.icerock.moko.widgets.core.ViewBundle<#GENERIC_dev.icerock.moko.widgets.style.view.WidgetSize> + 358
    10  MultiPlatformLibrary                0x000000010c992fa8 kfun:dev.icerock.moko.widgets.screen.WidgetViewController.objc:viewDidLoad + 1880
    11  MultiPlatformLibrary                0x000000010c997c5e _knbridge838 + 142
    12  UIKitCore                           0x0000000116b6d43b -[UIViewController loadViewIfRequired] + 1183
    13  UIKitCore                           0x0000000116ad1004 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 68
    14  UIKitCore                           0x0000000116ad12f7 -[UINavigationController _startTransition:fromViewController:toViewController:] + 146
    15  UIKitCore                           0x0000000116ad23b5 -[UINavigationController _startDeferredTransitionIfNeeded:] + 896
    16  UIKitCore                           0x0000000116ad36a7 -[UINavigationController __viewWillLayoutSubviews] + 150
    17  UIKitCore                           0x0000000116ab438d -[UILayoutContainerView layoutSubviews] + 217
    18  UIKitCore                           0x000000011763d9c1 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1417
    19  QuartzCore                          0x000000010f8ffeae -[CALayer layoutSublayers] + 173
    20  QuartzCore                          0x000000010f904b88 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 396
    21  QuartzCore                          0x000000010f910ee4 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 72
    22  QuartzCore                          0x000000010f8803aa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 328
    23  QuartzCore                          0x000000010f8b7584 _ZN2CA11Transaction6commitEv + 608
    24  UIKitCore                           0x0000000117188ccb __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 128
    25  CoreFoundation                      0x000000010fb3baec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    26  CoreFoundation                      0x000000010fb3b2b0 __CFRunLoopDoBlocks + 336
    27  CoreFoundation                      0x000000010fb35b34 __CFRunLoopRun + 1252
    28  CoreFoundation                      0x000000010fb35302 CFRunLoopRunSpecific + 626
    29  GraphicsServices                    0x00000001135f92fe GSEventRunModal + 65
    30  UIKitCore                           0x000000011716fba2 UIApplicationMain + 140
    31  mokoApp                             0x000000010c4106f2 main + 82
    32  libdyld.dylib                       0x000000010ea4e541 start + 1
    33  ???                                 0x0000000000000001 0x0 + 1
)```
Alex009 commented 4 years ago

fixed, will be released in dev-8