HandyJSON icon indicating copy to clipboard operation
HandyJSON copied to clipboard

包含范型类型的对象写入时 crash

Open thisfin opened this issue 5 years ago • 8 comments

类的继承关系为 EndViewController : AbastractViewController<V: ViewModel> : PropertyViewController : BasicViewController: BaseViewController

之前使用 PropertyViewController 时写值时正常, 后来增加了 AbastractViewController<V> 一层后, 会偶尔写入时 crash, 崩在 AnyExtensions 中的 storage.assumingMemoryBound(to: self).pointee = this 这一行

demo: https://github.com/thisfin/StandardDemo 页面进入返回多点几次就能出现

thisfin avatar Mar 09 '20 07:03 thisfin

有同样的问题,在 iOS 13.4 上出现

iwecon avatar Mar 26 '20 07:03 iwecon

我也有同样的问题, 请问你们解决了吗

GFAndy avatar Mar 27 '20 06:03 GFAndy

你们都是用了范型么

lynnleelhl avatar Mar 27 '20 08:03 lynnleelhl

你们都是用了范型么

是的,已经用 5.0.2-beta 解决了

iwecon avatar Mar 28 '20 05:03 iwecon

类的继承关系为 EndViewController : AbastractViewController<V: ViewModel> : PropertyViewController : BasicViewController: BaseViewController

之前使用 PropertyViewController 时写值时正常, 后来增加了 AbastractViewController 一层后, 会偶尔写入时 crash, 崩在 AnyExtensions 中的 storage.assumingMemoryBound(to: self).pointee = this 这一行

demo: https://github.com/thisfin/StandardDemo 页面进入返回多点几次就能出现

你这个Demo 用5.0.2-beta还是crash 啊

zhangteng709 avatar May 19 '20 11:05 zhangteng709

me too, someone help?

shang1219178163 avatar May 25 '20 07:05 shang1219178163

me too, someone help?

aiquantong avatar May 30 '20 02:05 aiquantong

更新到5.0.3beta 解决. Update to 5.0.3 Beta resolved.

andy90s avatar May 27 '21 08:05 andy90s