libpag icon indicating copy to clipboard operation
libpag copied to clipboard

iOS crash

Open weidongjiang opened this issue 2 years ago • 7 comments

【版本信息】

4.2.55

【平台信息】

iOS 原生

【crash堆栈】

Thread 48 Crashed:
5210   libsystem_kernel.dylib              0x00000001f132101c 0x1f1317000 + 40988
5221   libsystem_pthread.dylib             0x000000021386d680 0x213868000 + 22144
5232   libsystem_c.dylib                   0x00000001b1e81b90 0x1b1e0c000 + 482192
5243   AppleMetalGLRenderer                0x00000002409696fc 0x240965000 + 18172
5254   AppleMetalGLRenderer                0x000000024096b198 0x240965000 + 24984
5265   GLEngine                            0x000000022aad78dc 0x22aac0000 + 96476
5276   libpag                              0x000000010ee54d64 tgfx::OpsTask::execute(tgfx::Gpu*) + [wrap_iter.h : 108] 
5287   libpag                              0x000000010ede783c tgfx::DrawingManager::flush(tgfx::Semaphore*) + [wrap_iter.h : 108] 
5298   libpag                              0x000000010eeb79b8 tgfx::Surface::flush(tgfx::BackendSemaphore*) + [Surface.cpp : 0] 
5309   libpag                              0x000000010eeb7b54 tgfx::Surface::makeImageSnapshot() + [Surface.cpp : 188] 
53110  libpag                              0x000000010edf4ab4 pag::FeatherMask::draw(tgfx::Canvas*, pag::RenderCache*) const + [Paint.h : 210] 
53211  libpag                              0x000000010ee4e490 pag::MaskModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [shared_ptr.h : 589] 
53312  libpag                              0x000000010ee2e768 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 958] 
53413  libpag                              0x000000010ee2daf8 pag::MatrixGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [Graphic.cpp : 106] 
Thread 47 name:  ZQRTCPullThread
515Thread 47:
5160   libsystem_kernel.dylib              0x00000001f1318b7c 0x1f1317000 + 7036
5171   libsystem_pthread.dylib             0x0000000213868fd4 0x213868000 + 4052
5182   ZQMusic                             0x0000000103748db8 pullThreadLoop + [RTCAudioIOImpl.m : 95] 
5193   libsystem_pthread.dylib             0x000000021386a4d4 0x213868000 + 9428
520Thread 48 Crashed:
5210   libsystem_kernel.dylib              0x00000001f132101c 0x1f1317000 + 40988
5221   libsystem_pthread.dylib             0x000000021386d680 0x213868000 + 22144
5232   libsystem_c.dylib                   0x00000001b1e81b90 0x1b1e0c000 + 482192
5243   AppleMetalGLRenderer                0x00000002409696fc 0x240965000 + 18172
5254   AppleMetalGLRenderer                0x000000024096b198 0x240965000 + 24984
5265   GLEngine                            0x000000022aad78dc 0x22aac0000 + 96476
5276   libpag                              0x000000010ee54d64 tgfx::OpsTask::execute(tgfx::Gpu*) + [wrap_iter.h : 108] 
5287   libpag                              0x000000010ede783c tgfx::DrawingManager::flush(tgfx::Semaphore*) + [wrap_iter.h : 108] 
5298   libpag                              0x000000010eeb79b8 tgfx::Surface::flush(tgfx::BackendSemaphore*) + [Surface.cpp : 0] 
5309   libpag                              0x000000010eeb7b54 tgfx::Surface::makeImageSnapshot() + [Surface.cpp : 188] 
53110  libpag                              0x000000010edf4ab4 pag::FeatherMask::draw(tgfx::Canvas*, pag::RenderCache*) const + [Paint.h : 210] 
53211  libpag                              0x000000010ee4e490 pag::MaskModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [shared_ptr.h : 589] 
53312  libpag                              0x000000010ee2e768 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 958] 
53413  libpag                              0x000000010ee2daf8 pag::MatrixGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [Graphic.cpp : 106] 
53514  libpag                              0x000000010ee4de50 pag::BlendModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [Modifier.cpp : 185] 
53615  libpag                              0x000000010ee2e768 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 958] 
53716  libpag                              0x000000010ee2e254 pag::LayerGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [Graphic.cpp : 192] 
53817  libpag                              0x000000010ee4e050 pag::ClipModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [Modifier.cpp : 215] 
53918  libpag                              0x000000010ee2e768 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 958] 
54019  libpag                              0x000000010ee2daf8 pag::MatrixGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [Graphic.cpp : 106] 
54120  libpag                              0x000000010ee4e050 pag::ClipModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [Modifier.cpp : 215] 
54221  libpag                              0x000000010ee2e768 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 958] 
54322  libpag                              0x000000010ee2daf8 pag::MatrixGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [Graphic.cpp : 106] 
54423  libpag                              0x000000010ee4e050 pag::ClipModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [Modifier.cpp : 215] 
54524  libpag                              0x000000010ee2e768 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 958] 
54625  libpag                              0x000000010ee7b6f4 pag::PAGSurface::draw(pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>, pag::BackendSemaphore*, bool) + [shared_ptr.h : 958] 
54726  libpag                              0x000000010ee732bc pag::PAGPlayer::flushInternal(pag::BackendSemaphore*) + [PAGPlayer.cpp : 0] 
54827  libpag                              0x000000010ee731b4 pag::PAGPlayer::flush() + [PAGPlayer.cpp : 0] 
54928  libpag                              0x000000010ee822b4 -[PAGView flush] + [PAGView.mm : 0] 
55029  libpag                              0x000000010ee82588 __26-[PAGView updateViewAsync]_block_invoke + [PAGView.mm : 492]

问最新版本是否有修复相关的crash。从近期的表现看,iOS17系统的相关crash较多。

### Tasks

weidongjiang avatar Nov 29 '23 02:11 weidongjiang

新版是否针对iOS17有优化

weidongjiang avatar Nov 29 '23 02:11 weidongjiang

最新版(4.3.33),在iOS17系统上也会Crash。

zengke328 avatar Nov 29 '23 06:11 zengke328

新版是否针对iOS17有优化

请问是必现的还是偶现的,如果有复现路径,可以大幅加快这里的解决

根据历史使用情况,pag 渲染情况和 iOS 系统版本关系不大,iOS 的兼容性也足够好

kevingpqi123 avatar Nov 29 '23 06:11 kevingpqi123

新版是否针对iOS17有优化

请问是必现的还是偶现的,如果有复现路径,可以大幅加快这里的解决

根据历史使用情况,pag 渲染情况和 iOS 系统版本关系不大,iOS 的兼容性也足够好

没有找到必先路径,是线上用户crash堆栈抓到的。

weidongjiang avatar Nov 29 '23 13:11 weidongjiang

新版是否针对iOS17有优化

请问是必现的还是偶现的,如果有复现路径,可以大幅加快这里的解决

根据历史使用情况,pag 渲染情况和 iOS 系统版本关系不大,iOS 的兼容性也足够好

我遇到的情况类似, 全部为 iOS 17 上的崩溃(但打包环境为 Xcode 14.3.1), bugly 报如下崩溃原因: Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.

排查了展示页面的控制器堆栈后, 发现可能与用户输入有关, 因为在所有崩溃发生前的调用栈中都存在: UICompatibilityInputViewController

我本地尝试写 demo, 并没有复现崩溃

moonclock avatar Nov 30 '23 12:11 moonclock

新版是否针对iOS17有优化

请问是必现的还是偶现的,如果有复现路径,可以大幅加快这里的解决

根据历史使用情况,pag 渲染情况和 iOS 系统版本关系不大,iOS 的兼容性也足够好

xcode14.3.1打包。 SDK最新版本,4.3.33 还是会有此类型的crash。下面是对应的堆栈。希望能对定位问题有所帮助。期盼稳定的最新版本上线。

Thread 20 Crashed:
0   libpag                              0x000000010939115c pag::AnimatableProperty<std::__1::shared_ptr<pag::PathData> >::getValueAt(long long) + [File.h : 225] 
1   libpag                              0x000000010933efb4 pag::FeatherMask::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 801] 
2   libpag                              0x000000010933efb4 pag::FeatherMask::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 801] 
3   libpag                              0x00000001093961ec pag::MaskModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [shared_ptr.h : 815] 
4   libpag                              0x00000001093779f0 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 701] 
5   libpag                              0x0000000109395bf8 pag::BlendModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [Modifier.cpp : 185] 
6   libpag                              0x00000001093779f0 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 701] 
7   libpag                              0x0000000109377514 pag::LayerGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [Graphic.cpp : 192] 
8   libpag                              0x0000000109395dc8 pag::ClipModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [Modifier.cpp : 215] 
9   libpag                              0x00000001093779f0 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 701] 
10  libpag                              0x0000000109395bf8 pag::BlendModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [Modifier.cpp : 185] 
11  libpag                              0x00000001093779f0 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 701] 
12  libpag                              0x0000000109377514 pag::LayerGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [Graphic.cpp : 192] 
13  libpag                              0x0000000109395dc8 pag::ClipModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [Modifier.cpp : 215] 
14  libpag                              0x00000001093779f0 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 701] 
15  libpag                              0x0000000109376fe4 pag::MatrixGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [Graphic.cpp : 106] 
16  libpag                              0x0000000109395dc8 pag::ClipModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [Modifier.cpp : 215] 
17  libpag                              0x00000001093779f0 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 701] 
18  libpag                              0x0000000109376fe4 pag::MatrixGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [Graphic.cpp : 106] 
19  libpag                              0x0000000109395dc8 pag::ClipModifier::applyToGraphic(tgfx::Canvas*, pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>) const + [Modifier.cpp : 215] 
20  libpag                              0x00000001093779f0 pag::ModifierGraphic::draw(tgfx::Canvas*, pag::RenderCache*) const + [shared_ptr.h : 701] 
21  libpag                              0x00000001093c42d0 pag::PAGSurface::draw(pag::RenderCache*, std::__1::shared_ptr<pag::Graphic>, pag::BackendSemaphore*, bool) + [shared_ptr.h : 701] 
22  libpag                              0x00000001093bbaf8 pag::PAGPlayer::flushInternal(pag::BackendSemaphore*) + [PAGPlayer.cpp : 0] 
23  libpag                              0x00000001093bba20 pag::PAGPlayer::flush() + [PAGPlayer.cpp : 0] 
24  libpag                              0x00000001093a1778 pag::AnimatorListener::onAnimationUpdate(pag::PAGAnimator*) + [PAGAnimator.mm : 121] 
25  libpag                              0x000000010939ffbc pag::PAGAnimator::onFlush(bool) + [PAGAnimator.cpp : 0] 
26  libpag                              0x00000001093a0c84 std::__1::__function::__func<pag::PAGAnimator::doUpdate(bool)::$_0, std::__1::allocator<pag::PAGAnimator::doUpdate(bool)::$_0>, void ()>::operator()() + [shared_ptr.h : 173] 
27  libpag                              0x0000000109400d88 tgfx::Task::execute() + [__mutex_base : 94] 
28  libpag                              0x000000010940111c tgfx::TaskGroup::RunLoop(tgfx::TaskGroup*) + [shared_ptr.h : 701] 
29  libpag                              0x0000000109401b38 void* std::__1::__thread_proxy[abi:v15006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(tgfx::TaskGroup*), tgfx::TaskGroup*> >(void*) + [unique_ptr.h : 259] 
30  libsystem_pthread.dylib             0x00000001fb76e4d4 0x1fb76c000 + 9428

weidongjiang avatar Dec 04 '23 14:12 weidongjiang

新版是否针对iOS17有优化

请问是必现的还是偶现的,如果有复现路径,可以大幅加快这里的解决 根据历史使用情况,pag 渲染情况和 iOS 系统版本关系不大,iOS 的兼容性也足够好

我遇到的情况类似, 全部为 iOS 17 上的崩溃(但打包环境为 Xcode 14.3.1), bugly 报如下崩溃原因: Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.

排查了展示页面的控制器堆栈后, 发现可能与用户输入有关, 因为在所有崩溃发生前的调用栈中都存在: UICompatibilityInputViewController

我本地尝试写 demo, 并没有复现崩溃

这个在 4.3.43里已经修复。

domchen avatar Dec 29 '23 16:12 domchen