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

[BUG] -[UIView(PAGUgenWidget) ugenLayoutSubviews] background thread crash #202

Open
liuxiaoxinxin opened this issue Mar 4, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@liuxiaoxinxin
Copy link

Describe the bug | 问题描述

PAGUgenWidget.m 在后台线程调用 layoutsubviews 导致崩溃

Environmental information | 环境信息

  • SDK name: Ads-Global/PAGAdSDK
  • SDK version: 5.7.0.7
  • Date and time:2024-0303 23:12:36
  • Device model: iPhone 14 Pro Max
  • iOS version: 17.3.1

To Reproduce | 如何复现

occasionally appear 偶现

Screenshots | 截图

Backtrace | 相关堆栈

Fatal Exception: NSInternalInconsistencyException
Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0xec678 (缺少 UUID 5a6c1f41bf7032f6a1d65b894dd21362)
1  libobjc.A.dylib                0x2bc80 objc_exception_throw
2  CoreAutoLayout                 0x56c8 (缺少 UUID 345fbfb5342b3f12a6ba6765e90b8d24)
3  CoreAutoLayout                 0xbadc (缺少 UUID 345fbfb5342b3f12a6ba6765e90b8d24)
4  CoreAutoLayout                 0xb7f0 (缺少 UUID 345fbfb5342b3f12a6ba6765e90b8d24)
5  CoreAutoLayout                 0xb57c (缺少 UUID 345fbfb5342b3f12a6ba6765e90b8d24)
6  UIKitCore                      0x344a8 (缺少 UUID 2d5384466e403c108a5f559c938077a0)
7  MYAPP                      0xbdd184 -[UIView(PAGUgenWidget) ugenLayoutSubviews] + 47 (PAGUgenWidget.m:47)
8  UIKitCore                      0x32c04 (缺少 UUID 2d5384466e403c108a5f559c938077a0)
9  QuartzCore                     0x667ec (缺少 UUID 5c3ee3d91aaa3052a6c7b957b454ad71)
10 QuartzCore                     0x66374 (缺少 UUID 5c3ee3d91aaa3052a6c7b957b454ad71)
11 QuartzCore                     0x6c860 (缺少 UUID 5c3ee3d91aaa3052a6c7b957b454ad71)
12 QuartzCore                     0x65b80 (缺少 UUID 5c3ee3d91aaa3052a6c7b957b454ad71)
13 QuartzCore                     0x65828 (缺少 UUID 5c3ee3d91aaa3052a6c7b957b454ad71)
14 CoreFoundation                 0x357bc (缺少 UUID 5a6c1f41bf7032f6a1d65b894dd21362)
15 CoreFoundation                 0x341c4 (缺少 UUID 5a6c1f41bf7032f6a1d65b894dd21362)
16 CoreFoundation                 0x338e0 (缺少 UUID 5a6c1f41bf7032f6a1d65b894dd21362)
17 CoreFoundation                 0x333f8 (缺少 UUID 5a6c1f41bf7032f6a1d65b894dd21362)
18 Flutter                        0x2f90cc (缺少 UUID 3adbf2891ee63561a26df1652313df7e)
19 Flutter                        0x2f8acc (缺少 UUID 3adbf2891ee63561a26df1652313df7e)
20 libsystem_pthread.dylib        0x24d4 (缺少 UUID 8f9c865b29f5346badd5fde40e008c66)
21 libsystem_pthread.dylib        0x1a10 (缺少 UUID 8f9c865b29f5346badd5fde40e008c66)
@liuxiaoxinxin liuxiaoxinxin added the bug Something isn't working label Mar 4, 2024
@goodsprite
Copy link

Hi. In our case it was Pangle sdk bug.

@skytoup
Copy link

skytoup commented Apr 7, 2024

Hi. In our case it was Pangle sdk bug.

ss.vendored_frameworks = ['SDK/PAGAdSDK.xcframework']

Isn't this your SDK?

PAGAdSDK.xcframework

+[UIView(PAGUgenWidget) load]
-[UIView ugenLayoutSubviews]

@zhangfurun
Copy link

同样也出现了, 循环调用

@zhangfurun
Copy link

经过查找, 发现 5.7.0.6.0 这个版本开始出现问题, 5.6.0.9.0这个没问题

@luckycherry
Copy link

我 5.8.0.8.0 也崩

@skytoup
Copy link

skytoup commented Jul 22, 2024

  • 6.1.0.5 stil crash
  • 6.1.0.4 still crash

@hapiii
Copy link

hapiii commented Aug 26, 2024

6.1.0.4 还在crash,都5个多月了。

@valougep
Copy link

valougep commented Sep 24, 2024

Reproduced when launching swiftUI previews in Xcode:
On 6.1 of SPM AdsGlobalPackage

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x000000016cdf3f90
Exception Codes: 0x0000000000000002, 0x000000016cdf3f90
Triggered by Thread:  0

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   MyApp        	       0x103c9f0cc -[UIView(PAGUgenWidget) ugenLayoutSubviews] + 4
1   MyApp        	       0x103c9f0e4 -[UIView(PAGUgenWidget) ugenLayoutSubviews] + 28
2   MyApp        	       0x103c9f0e4 -[UIView(PAGUgenWidget) ugenLayoutSubviews] + 28
3   MyApp        	       0x103c9f0e4 -[UIView(PAGUgenWidget) ugenLayoutSubviews] + 28
4   MyApp        	       0x103c9f0e4 -[UIView(PAGUgenWidget) ugenLayoutSubviews] + 28
5   MyApp        	       0x103c9f0e4 -[UIView(PAGUgenWidget) ugenLayoutSubviews] + 28
6   MyApp        	       0x103c9f0e4 -[UIView(PAGUgenWidget) ugenLayoutSubviews] + 28
7   MyApp        	       0x103c9f0e4 -[UIView(PAGUgenWidget) ugenLayoutSubviews] + 28
8   MyApp        	       0x103c9f0e4 -[UIView(PAGUgenWidget) ugenLayoutSubviews] + 28
9   MyApp        	       0x103c9f0e4 -[UIView(PAGUgenWidget) ugenLayoutSubviews] + 28
...

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x000000010c210820   x1: 0x0000000104bddf85   x2: 0x00000001ec289768   x3: 0x000000010c307a20
    x4: 0x00000000612e19a0   x5: 0x0000000000000020   x6: 0x0000000000000000   x7: 0x0000000000000403
    x8: 0x00000001ec31a000   x9: 0x0000000104bddf85  x10: 0x000000010b832400  x11: 0x00000000000000ff
   x12: 0x0000000000000085  x13: 0x000000010b832c40  x14: 0x03000001ec2a7835  x15: 0x00000001ec2a7830
   x16: 0x00000001ec2a7830  x17: 0x0000000103c9f0c8  x18: 0x0000000000000000  x19: 0x000000010c210820
   x20: 0x0000000000000000  x21: 0x0000000000000000  x22: 0x00000000000000da  x23: 0x0000000000000000
   x24: 0x0000000000000000  x25: 0x00000001ec09de28  x26: 0x00000001ec261000  x27: 0x0000000000000000
   x28: 0x000000016d5e9de0   fp: 0x000000016cdf4020   lr: 0x0000000103c9f0e4
    sp: 0x000000016cdf3f50   pc: 0x0000000103c9f0cc cpsr: 0x60001000
   far: 0x000000016cdf3f90  esr: 0x92000047 (Data Abort) byte write Translation fault

@Wtoto
Copy link

Wtoto commented Nov 4, 2024

遇到同一个问题, 感觉是flutter 问题?

@zhangbowen1234
Copy link

这个问题6.2.x.x及以上版本已经修复,可以升级更新到最新版本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants