Tencent / libpag

The official rendering library for PAG (Portable Animated Graphics) files that renders After Effects animations natively across multiple platforms.
https://pag.art
Other
4.73k stars 437 forks source link

Android 首次进行动画,且替换动画内的文本 PGAView Crash #2196

Closed fei-ke closed 1 month ago

fei-ke commented 2 months ago

在首次进行动画,且替换动画内的文本 PGAView Crash。

4.2.55 版本正常,4.2.80 crash,最新 4.3.47 crash.

https://github.com/fei-ke/PagViewDemo demo 内有 pag 文件和 crash 代码

异常代码:

PAGView pagView = findViewById(R.id.pagView);
PAGFile pagFile = PAGFile.Load(getAssets(), "check_in.pag");

PAGText textData2 = pagFile.getTextData(2);
textData2.text = "xxxxxxxxxxxxxxx"
//替换文本,接下来 play 后动画快结束时 crash
pagFile.replaceText(2, textData2);

pagView.setComposition(pagFile);
pagView.play();
Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 15644 (tgfx_JNIEnviron), pid 15611 (example.pagview)
#00 pc 000000000004fbcc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: ba489d4985c0cf173209da67405662f9)
#01 pc 0000000000040364  /apex/com.android.runtime/lib64/bionic/libc.so (scudo::die()+8) (BuildId: ba489d4985c0cf173209da67405662f9)
#02 pc 0000000000040b00  /apex/com.android.runtime/lib64/bionic/libc.so (scudo::ScopedErrorReport::~ScopedErrorReport()+32) (BuildId: ba489d4985c0cf173209da67405662f9)
#03 pc 0000000000040bc8  /apex/com.android.runtime/lib64/bionic/libc.so (scudo::reportHeaderCorruption(void*)+60) (BuildId: ba489d4985c0cf173209da67405662f9)
#04 pc 0000000000042328  /apex/com.android.runtime/lib64/bionic/libc.so (scudo::Allocator<scudo::AndroidConfig, &(scudo_malloc_postinit)>::deallocate(void*, scudo::Chunk::Origi
n, unsigned long, unsigned long)+296) (BuildId: ba489d4985c0cf173209da67405662f9)
#05 pc 0000000000135398  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#06 pc 0000000000148ff0  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#07 pc 0000000000141d34  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#08 pc 000000000011b7c4  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#09 pc 0000000000119e24  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#10 pc 00000000001454c4  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#11 pc 00000000000a38a4  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (pag::PAGSurface::draw(pag::RenderCache*, std::__
ndk1::shared_ptr<pag::Graphic>, pag::BackendSemaphore*, bool)+664) (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb666)
#12 pc 00000000000a1bd0  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (pag::PAGPlayer::flushInternal(pag::BackendSemaph
ore*)+192) (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb666)
#13 pc 00000000000a1ad8  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (pag::PAGPlayer::flush()+88) (BuildId: c43d6dd036
7e51b4744d4c7eafb275d4782fb666)
#14 pc 000000000010c5b8  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (Java_org_libpag_PAGPlayer_flushAndFenceSync+204)
 (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb666)
#15 pc 00000000002d9a44  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#16 pc 000000000020a0a0  /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#17 pc 0000000000009e1e  [anon:dalvik-classes.dex extracted in memory from /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/base.apk]
#18 pc 000000000020a044  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#19 pc 000000000000a5e8  [anon:dalvik-classes.dex extracted in memory from /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/base.apk]
#20 pc 000000000020a044  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#21 pc 000000000000ad70  [anon:dalvik-classes.dex extracted in memory from /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/base.apk]
#22 pc 000000000020ae64  /apex/com.android.art/lib64/libart.so (nterp_helper+7540) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#23 pc 0000000000007a98  [anon:dalvik-classes.dex extracted in memory from /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/base.apk]
#24 pc 00000000002d0164  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#25 pc 000000000043c168  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable con
st&, _jobject*, art::ArtMethod*, std::__va_list)+880) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#26 pc 000000000043bdb0  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&,
 _jobject*, _jmethodID*, std::__va_list)+68) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#27 pc 00000000006149c0  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+276) (BuildId: 24eef23b1d12b66
e333db56056e4d3b3)
#28 pc 000000000057886c  /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::
__va_list, art::Primitive::Type, art::InvokeType)+1632) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#29 pc 000000000057aeac  /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list) (.llvm.9
316216051580410035)+72) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#30 pc 00000000001003b4  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#31 pc 0000000000103e28  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#32 pc 000000000009cc7c  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#33 pc 000000000009d7ac  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#34 pc 0000000000147940  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#35 pc 0000000000147c58  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#36 pc 00000000001483b8  /data/app/~~mk-brawuPPUvQ9Q2Gqlonw==/com.example.pagview-RE1LAv5ZqAT2PuEB8bPECw==/lib/arm64/libpag.so (BuildId: c43d6dd0367e51b4744d4c7eafb275d4782fb66
6)
#37 pc 00000000000b1910  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: ba489d4985c0cf173209da67405662f9)
#38 pc 00000000000513f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ba489d4985c0cf173209da67405662f9)
#00 pc 00000000004555c8  /apex/com.android.art/lib64/libart.so (art::FaultManager::HandleFault(int, siginfo*, void*)+68) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#01 pc 0000000000002324  /apex/com.android.art/lib64/libsigchain.so (art::SignalChain::Handler(int, siginfo*, void*)+664) (BuildId: 45f43e18dc6ff54eabb319365499f3f5)
#02 pc 000000000000089c  [vdso]
#03 pc 0000000000000000  <unknown>
#04 pc 000000000028ed04  /apex/com.android.art/lib64/libart.so (art::ClassLinker::FindClass(art::Thread*, char const*, art::Handle<art::mirror::ClassLoader>)+100) (BuildId: 24e
ef23b1d12b66e333db56056e4d3b3)
#05 pc 000000000030b178  /apex/com.android.art/lib64/libart.so (art::ClassLinker::ResolveType(art::dex::TypeIndex, art::Handle<art::mirror::DexCache>, art::Handle<art::mirror::
ClassLoader>)+284) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#06 pc 000000000030aaa8  /apex/com.android.art/lib64/libart.so (art::ArtMethod* art::ClassLinker::ResolveMethod<(art::ClassLinker::ResolveMode)0>(unsigned int, art::Handle<art:
:mirror::DexCache>, art::Handle<art::mirror::ClassLoader>, art::ArtMethod*, art::InvokeType)+144) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#07 pc 0000000000776028  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1392) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#08 pc 00000000002caa14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#09 pc 000000000045b930  /system/framework/framework.jar
#10 pc 0000000000776300  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+2120) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#11 pc 00000000002caa14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#12 pc 00000000003fc070  /system/framework/framework.jar
#13 pc 0000000000416f0c  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+3104) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#14 pc 00000000002ca994  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#15 pc 00000000003fbd88  /system/framework/framework.jar
#16 pc 00000000002c5c48  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+2292) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#17 pc 00000000002ca894  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#18 pc 000000000003ddae  /apex/com.android.art/javalib/core-libart.jar
#19 pc 000000000027dd74  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, 
bool) (.llvm.6649268296134209133)+644) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#20 pc 000000000027cf1c  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1176) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#21 pc 00000000002d9b78  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#22 pc 00000000002d03e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#23 pc 0000000000456c68  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmeth
odID*, std::__va_list)+464) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#24 pc 0000000000604e70  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticObjectMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+272) (BuildId: 24eef23b
1d12b66e333db56056e4d3b3)
#25 pc 0000000000578ac0  /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::
__va_list, art::Primitive::Type, art::InvokeType)+2228) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#26 pc 000000000057da28  /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallStaticObjectMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list) (
.llvm.9316216051580410035)+76) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#27 pc 00000000004baf34  /apex/com.android.art/lib64/libart.so (_JNIEnv::CallStaticObjectMethod(_jclass*, _jmethodID*, ...)+120) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#28 pc 00000000004b9f3c  /apex/com.android.art/lib64/libart.so (art::Dbg::DdmHandleChunk(_JNIEnv*, unsigned int, art::ArrayRef<signed char const> const&, unsigned int*, std::__
1::vector<unsigned char, std::__1::allocator<unsigned char> >*)+160) (BuildId: 24eef23b1d12b66e333db56056e4d3b3)
#29 pc 000000000000afd8  /apex/com.android.art/lib64/libadbconnection.so (adbconnection::AdbConnectionState::HandleDataWithoutAgent(art::Thread*)+1036) (BuildId: 39e315ec3ed25c
5ac44d3ad163086156)
#30 pc 000000000000a20c  /apex/com.android.art/lib64/libadbconnection.so (adbconnection::AdbConnectionState::RunPollLoop(art::Thread*)+1872) (BuildId: 39e315ec3ed25c5ac44d3ad16
3086156)
#31 pc 000000000000840c  /apex/com.android.art/lib64/libadbconnection.so (adbconnection::CallbackFunction(void*)+1484) (BuildId: 39e315ec3ed25c5ac44d3ad163086156)
#32 pc 00000000000b1910  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: ba489d4985c0cf173209da67405662f9)
#33 pc 00000000000513f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ba489d4985c0cf173209da67405662f9)

【版本信息】

4.2.80 crash,最新 4.3.47 crash,4.2.55 版本正常

【平台信息】

Android 原生

【预期的表现】

正常替换文本动画,不 crash

【实际的情况】

替换文本后,播放动画 crash

【Demo及附件】

https://github.com/fei-ke/PagViewDemo

kevingpqi123 commented 1 month ago

感谢反馈,问题我们已经复现到,预计近几天会提供一个修复

kevingpqi123 commented 1 month ago

该问题 4.3.51 版本已修复,可以通过 maven 拉取到

fei-ke commented 1 month ago

4.3.51 版本已确认正常