hughkli / Lookin

Free macOS app for iOS view debugging.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

需要兼容一下 Xcode 15 和 iOS 17

LisonFan opened this issue · comments

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={0, 0}, scale=3.000000, bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert.'

使用 UIGraphicsBeginImageContext 生成图片时,size 不能输入 0,0

commented

好的,我尽快处理一下

+1,一用LookIn刷新到一半就崩溃,尽快适配一下吧

commented
截屏2023-09-21 00 14 40

@WFlame314 @LisonFan Crash 的堆栈是上图这个不?

commented

刚刚发了 LookinServer v1.2.1,应该修复了,你们试试

assert
看起来还是会被assert,端上有些视图会存在size为(0,0)的情况

commented

@WFlame314 这。。。这么奇怪吗?理论上应该可以被上面的 if (pixelWidth <= 0 || pixelHeight <= 0) { 给拦住才对呀
screenshot-20230921-133406

Snipaste_2023-09-21_13-46-42 po了一下,更奇怪了。。。
commented

可能是这个 CALayer 应用了一个 transform 导致 frame 和 bounds 不一样,我晚上有时间时加个额外的保护…

commented

发了 1.2.2,应该彻底修了这个,试试。