Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcode16 AddSubview crash #1557

Closed
yoferzhang opened this issue Jul 1, 2024 · 2 comments
Closed

xcode16 AddSubview crash #1557

yoferzhang opened this issue Jul 1, 2024 · 2 comments
Labels

Comments

@yoferzhang
Copy link

Bug 表现
调用方法

    QMUITips* tips = [QMUITips createTipsToView: view];

产生crash

Set `maskView` (<UIView: 0x1658d2f40; frame = (0 0; 0 0); backgroundColor = UIExtendedSRGBColorSpace 1 1 1 0, RGBA(255, 255, 255, 0.00), #00ffffff; layer = <CALayer: 0x300bbff40>>) to `nil` before adding it as a subview of <QMUITips: 0x168145b80; frame = (0 0; 414 896); alpha = 0; opaque = NO; tintColor = UIExtendedSRGBColorSpace 1 1 1 1, RGBA(255, 255, 255, 1.00), #ffffffff; backgroundColor = UIExtendedSRGBColorSpace 1 1 1 0, RGBA(255, 255, 255, 0.00), #00ffffff; layer = <CALayer: 0x300bb89a0>>
(
	0   CoreFoundation                      0x000000019a7ec134 096EAB6F-1E9F-3B50-B0CC-FF7C8266BF00 + 540980
	1   libobjc.A.dylib                     0x0000000197b0a698 objc_exception_throw + 76
	2   Foundation                          0x0000000199bc532c B0A62B66-B3EF-3FC2-8539-7593D6B0ED6A + 8487724
	3   UIKitCore                           0x000000019cf38d20 9D7C656A-A984-3A4B-9DE2-E6CA0A0946DE + 101664
	4   Runner.debug.dylib                  0x000000010c10a1c8 -[QMUIToastView didInitialize] + 740
	5   Runner.debug.dylib                  0x000000010c109e1c -[QMUIToastView initWithView:] + 340
	6   Runner.debug.dylib                  0x000000010c104c0c +[QMUITips createTipsToView:] + 76
	7   Runner.debug.dylib                  0x000000010ba71ff0 -[TDPlatformPlugin showNativeTips:result:] + 696
	8   Runner.debug.dylib                  0x000000010ba6f014 -[TDPlatformPlugin handleMethodCall:result:] + 264
	9   Runner.debug.dylib                  0x000000010ba801c4 __53+[NSObject(RightlySDK) swizzlingSetMethodCallHandler]_block_invoke_3 + 124
	10  Flutter                             0x00000001065cc020 __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 164
	11  Flutter                             0x0000000106041768 ___ZN7flutter25PlatformMessageHandlerIos21HandlePlatformMessageENSt3_fl10unique_ptrINS_15PlatformMessageENS1_14default_deleteIS3_EEEE_block_invoke + 116
	12  libdispatch.dylib                   0x0000000102d54a38 _dispatch_call_block_and_release + 32
	13  libdispatch.dylib                   0x0000000102d56724 _dispatch_client_callout + 20
	14  libdispatch.dylib                   0x0000000102d66df0 _dispatch_main_queue_drain + 1076
	15  libdispatch.dylib                   0x0000000102d669ac _dispatch_main_queue_callback_4CF + 44
	16  CoreFoundation                      0x000000019a7bee78 096EAB6F-1E9F-3B50-B0CC-FF7C8266BF00 + 355960
	17  CoreFoundation                      0x000000019a7bc098 096EAB6F-1E9F-3B50-B0CC-FF7C8266BF00 + 344216
	18  CoreFoundation                      0x000000019a7bb424 CFRunLoopRunSpecific + 608
	19  GraphicsServices                    0x00000001e69b91c4 GSEventRunModal + 164
	20  UIKitCore                           0x000000019d302130 9D7C656A-A984-3A4B-9DE2-E6CA0A0946DE + 4071728
	21  UIKitCore                           0x000000019d3b055c UIApplicationMain + 340
	22  Runner.debug.dylib                  0x000000010ba1f2bc __debug_main_executable_dylib_entry_point + 192
	23  dyld                                0x00000001c06f0a74 7CB524C7-AE23-36CA-B598-E9DE80851650 + 211572
)

截图
image

如何重现

  1. 使用XCode Version 16.0 beta 2 (16A5171r)
  2. 调用 createTipsToView

预期的表现
不会crash

其他信息

  • 设备: 真机
  • iOS 版本: [iOS 18.0]
  • Xcode 版本: [XCode Version 16.0 beta 2 (16A5171r)]
  • QMUI 版本: [4.7.0]
@MoLice
Copy link
Collaborator

MoLice commented Jul 1, 2024

iOS 18 对 UIView.maskView 增加了断言,导致如果业务代码里有同名属性可能导致触发该断言。修复方式是将业务代码里同名 maskView 重命名。内网版本 QMUI 已修复,Github 版本等更新。

@MoLice MoLice added the bug label Jul 1, 2024
@MoLice
Copy link
Collaborator

MoLice commented Sep 21, 2024

已发布 4.8.0 修复该问题。

@MoLice MoLice closed this as completed Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants