weex [iOS]iOS17闪退,WXComponent+Display.m objc_loadWeakRetained

a0zr77ik  于 4个月前  发布在  Weex
关注(0)|答案(3)|浏览(60)

iOS17上有个闪退:
0x106f411e8 <+52>: tbz w0, #0x0, 0x106f411f4 ; <+64> at WXComponent+Display.m:146:39
0x106f411ec <+56>: mov x20, #0x0
0x106f411f0 <+60>: b 0x106f41280 ; <+204> at WXComponent+Display.m:164:5
0x106f411f4 <+64>: add x0, x19, #0x20
0x106f411f8 <+68>: bl 0x1071ecd28 ; symbol stub for: objc_loadWeakRetained
0x106f411fc <+72>: mov x19, x0
0x106f41200 <+76>: cbz x0, 0x106f41278 ; <+196> at WXComponent+Display.m
0x106f41204 <+80>: fcmp d11, #0.0
0x106f41208 <+84>: fmov d0, #1 .00000000
0x106f4120c <+88>: fcsel d11, d11, d0, ne
0x106f41210 <+92>: fcmp d10, #0.0
0x106f41214 <+96>: fcsel d10, d10, d0, ne
0x106f41218 <+100>: mov x0, x19
0x106f4121c <+104>: fmov d0, d11
0x106f41220 <+108>: fmov d1, d10
0x106f41224 <+112>: bl 0x1071f9ae0 ; objc_msgSend$_bitmapOpaqueWithSize:
0x106f41228 <+116>: fmov d2, xzr
0x106f4122c <+120>: fmov d0, d11
0x106f41230 <+124>: fmov d1, d10
0x106f41234 <+128>: bl 0x1071eb2dc ; symbol stub for: UIGraphicsBeginImageContextWithOptions
-> 0x106f41238 <+132>: mov x0, x19
0x106f4123c <+136>: fmov d0, d9
0x106f41240 <+140>: fmov d1, d8
0x106f41244 <+144>: fmov d2, d11
0x106f41248 <+148>: fmov d3, d10
0x106f4124c <+152>: bl 0x10721f200 ; objc_msgSend$drawRect:
0x106f41250 <+156>: mov x29, x29
0x106f41254 <+160>: bl 0x1071ecdc4 ; symbol stub for: objc_retainAutoreleasedReturnValue
0x106f41258 <+164>: mov x20, x0
0x106f4125c <+168>: cbnz x0, 0x106f41270 ; <+188> at WXComponent+Display.m:157:13
0x106f41260 <+172>: bl 0x1071eb300 ; symbol stub for: UIGraphicsGetImageFromCurrentImageContext
0x106f41264 <+176>: mov x29, x29
0x106f41268 <+180>: bl 0x1071ecdc4 ; symbol stub for: objc_retainAutoreleasedReturnValue
0x106f4126c <+184>: mov x20, x0
0x106f41270 <+188>: bl 0x1071eb2e8 ; symbol stub for: UIGraphicsEndImageContext
0x106f41274 <+192>: b 0x106f4127c ; <+200> at WXComponent+Display.m
0x106f41278 <+196>: mov x20, #0x0
0x106f4127c <+200>: bl 0x106f44264 ; _OUTLINED_FUNCTION_18
0x106f41280 <+204>: mov x0, x20
0x106f41284 <+208>: ldp x29, x30, [sp, #0x30]
0x106f41288 <+212>: ldp x20, x19, [sp, #0x20]
0x106f4128c <+216>: ldp d9, d8, [sp, #0x10]
0x106f41290 <+220>: ldp d11, d10, [sp], #0x40
0x106f41294 <+224>: b 0x1071ecc2c ; symbol stub for: objc_autoreleaseReturnValue

升级到XCode15后,会闪退,后判断了size的width和height非零,iOS17之下就不闪退了:
CGFloat width = bounds.size.width ?: 1;
CGFloat height = bounds.size.height ?: 1;
CGSize size = CGSizeMake(width, height);
UIGraphicsBeginImageContextWithOptions(size, [self _bitmapOpaqueWithSize:size], 0.0);
但是iOS17上还会闪退
啥原因呢?

hrysbysz

hrysbysz1#

我是这么修改的。

imzjd6km

imzjd6km2#

我是这么修改的。

可以, 不崩溃了, 感谢分享

whhtz7ly

whhtz7ly3#

来信收悉,非常感谢!============ http://www.firekyrin.com

相关问题