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]在某些Android设备上处理数据时崩溃 #2263

Open
DarkAdventurer93 opened this issue Feb 20, 2024 · 17 comments
Open

[BUG]在某些Android设备上处理数据时崩溃 #2263

DarkAdventurer93 opened this issue Feb 20, 2024 · 17 comments
Labels
bug Something isn't working
Milestone

Comments

@DarkAdventurer93
Copy link

问题描述

线上使用了fastjson兼容版本2.0.40之后发现部分Android设备上会发生闪退
后续使用了fastjson兼容版本2.0.46、fastjson2 2.0.46均可以复现闪退

环境信息

  • OS信息: Android 13
  • JDK信息: JDK 11
  • 版本信息:2.0.40/2.0.46

重现步骤

在接收到后端数据后使用JSON相关方法会发生闪退

期待的正确结果

不闪退

相关日志输出


backtrace:
#00 pc 0x00000000002fff9a /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (art_jni_trampoline+18)
#1 pc 0x0000000000330464 /apex/com.android.art/lib/libart.so (nterp_helper+5204)
#2 pc 0x0000000000365912 /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.vdex (com.alibaba.fastjson2.util.y.n+38)
#3 pc 0x000000000032f7ac /apex/com.android.art/lib/libart.so (nterp_helper+1948)
#4 pc 0x0000000000364a4a /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.vdex (com.alibaba.fastjson2.util.y.w+298)
#5 pc 0x000000000032f7ac /apex/com.android.art/lib/libart.so (nterp_helper+1948)
#6 pc 0x00000000003006f0 /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.vdex (com.alibaba.fastjson2.m0.a1+148)
#7 pc 0x000000000032fb00 /apex/com.android.art/lib/libart.so (nterp_helper+2800)
#8 pc 0x0000000000373a04 /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.vdex (com.alibaba.fastjson2.writer.r0.v+144)
#9 pc 0x000000000032fb00 /apex/com.android.art/lib/libart.so (nterp_helper+2800)
#10 pc 0x00000000003738dc /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.vdex (com.alibaba.fastjson2.writer.r0.n+100)
#11 pc 0x000000000032fb00 /apex/com.android.art/lib/libart.so (nterp_helper+2800)
#12 pc 0x000000000037a5fe /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.vdex (com.alibaba.fastjson2.writer.k2.write+318)
#13 pc 0x0000000000330bd8 /apex/com.android.art/lib/libart.so (nterp_helper+7112)
#14 pc 0x00000000002b2f0c /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.vdex (com.alibaba.fastjson.JSON.toJSONString+76)
#15 pc 0x00000000000a419d /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.odex (j6.a.m+420)
#16 pc 0x00000000000a67b9 /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.odex (s5.a.i+576)
#17 pc 0x000000000032f0bc /apex/com.android.art/lib/libart.so (nterp_helper+172)
#18 pc 0x000000000044fef4 /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.vdex (com.dragonpass.en.latam.activity.LoadingActivity.y0+244)
#19 pc 0x000000000032fb00 /apex/com.android.art/lib/libart.so (nterp_helper+2800)
#20 pc 0x000000000044fc60 /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.vdex (com.dragonpass.en.latam.activity.LoadingActivity.n0)
#21 pc 0x000000000032f048 /apex/com.android.art/lib/libart.so (nterp_helper+56)
#22 pc 0x000000000044f948 /data/app/~~gefk1pQ6rWbnVEinDLAsKw==/com.dragonpass.en.latam-DJfXOUyE9nqpEUdhmr1cKg==/oat/arm/base.vdex (com.dragonpass.en.latam.activity.b.run+4)
#23 pc 0x0000000000411957 /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (java.util.concurrent.Executors$RunnableAdapter.call+62)
#24 pc 0x0000000000496bab /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (java.util.concurrent.FutureTask.run+178)
#25 pc 0x00000000004e885d /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+828)
#26 pc 0x00000000004e5e27 /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+62)
#27 pc 0x00000000003c41af /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (java.lang.Thread.run+70)
#28 pc 0x00000000001419d5 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68)
#29 pc 0x00000000001baceb /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+466)
#30 pc 0x00000000002302e3 /apex/com.android.art/lib/libart.so (art::Thread::CreateCallback(void*)+2070)
#31 pc 0x00000000000ad2a3 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40)
#32 pc 0x000000000006435d /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)

附加信息

在使用fastjson 1.2.73版本时此设备正常使用

@DarkAdventurer93 DarkAdventurer93 added the bug Something isn't working label Feb 20, 2024
@DarkAdventurer93 DarkAdventurer93 changed the title [BUG]在某些Android设备上解析数据时崩溃 [BUG]在某些Android设备上处理数据时崩溃 Feb 20, 2024
@wenshao
Copy link
Member

wenshao commented Feb 20, 2024

能帮忙提供更多信息帮忙我做诊断原因么?比如数据的内容,或者更完整的堆栈信息

@DarkAdventurer93
Copy link
Author

DarkAdventurer93 commented Feb 20, 2024

能帮忙提供更多信息帮忙我做诊断原因么?比如数据的内容,或者更完整的堆栈信息
感谢支持,下面是一些信息(基于我身边能重现此闪退问题的设备)
手机信息:
型号: Samsung Galaxy A10s(SM-A107M)
系统版本: Android 11
SOC: MT6762

堆栈信息:
02-20 16:06:13.417
24914
libc
Fatal signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xcd4f5432 in tid 24990 (pass.com.cn/...), pid 24914 (onpass.en.latam)
02-20 16:06:13.628
25060
DEBUG
02-20 16:06:13.628
25060
DEBUG
Build fingerprint: 'samsung/a10sub/a10s:11/RP1A.200720.012/A107MUBU6CVB1:user/release-keys'
02-20 16:06:13.628
25060
DEBUG
Revision: '0'
02-20 16:06:13.629
25060
DEBUG
ABI: 'arm'
02-20 16:06:13.630
25060
DEBUG
Timestamp: 2024-02-20 16:06:13+0800
02-20 16:06:13.630
25060
DEBUG
pid: 24914, tid: 24990, name: pass.com.cn/... >>> com.dragonpass.en.latam <<<
02-20 16:06:13.630
25060
DEBUG
uid: 10432
02-20 16:06:13.630
25060
DEBUG
signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xcd4f5432
02-20 16:06:13.630
25060
DEBUG
r0 00310030 r1 00370033 r2 cd4f5000 r3 00000432
02-20 16:06:13.635
25060
DEBUG
r4 00000432 r5 00000000 r6 eab8ca3c r7 00000004
02-20 16:06:13.635
25060
DEBUG
r8 00000000 r9 ce641400 r10 b5cdb980 r11 b5cdb944
02-20 16:06:13.635
25060
DEBUG
ip cd4f5432 sp b5cdb8f0 lr ead3f7d7 pc 6ff0e3ca
02-20 16:06:14.202
25060
DEBUG
backtrace:
02-20 16:06:14.202
25060
DEBUG
#00 pc 000803ca /apex/com.android.art/javalib/arm/boot.oat (art_jni_trampoline+18) (BuildId: 94604a8991efe3af11995fa130bcfae6e7d4248c)
02-20 16:06:14.202
25060
DEBUG
#1 pc 000d47d5 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.202
25060
DEBUG
#2 pc 004f2427 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub+282) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.202
25060
DEBUG
#3 pc 0012cb2d /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+148) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.202
25060
DEBUG
#4 pc 00245c97 /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+254) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.203
25060
DEBUG
#5 pc 0023e611 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+564) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.203
25060
DEBUG
#6 pc 004e6ce3 /apex/com.android.art/lib/libart.so (MterpInvokeVirtualRange+630) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.203
25060
DEBUG
#7 pc 000cf514 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual_range+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.203
25060
DEBUG
#8 pc 004bdbdc /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.util.IOUtils.putLong+40)
02-20 16:06:14.203
25060
DEBUG
#9 pc 00236951 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+248) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.203
25060
DEBUG
#10 pc 0023d18d /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+144) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.203
25060
DEBUG
#11 pc 0023d941 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+716) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.203
25060
DEBUG
#12 pc 004e63eb /apex/com.android.art/lib/libart.so (MterpInvokeStatic+490) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.203
25060
DEBUG
#13 pc 000cf394 /apex/com.android.art/lib/libart.so (mterp_op_invoke_static+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.203
25060
DEBUG
#14 pc 004bc39a /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.util.IOUtils.writeInt32+270)
02-20 16:06:14.204
25060
DEBUG
#15 pc 00236951 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+248) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.204
25060
DEBUG
#16 pc 0023d18d /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+144) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.204
25060
DEBUG
#17 pc 0023d941 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+716) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.204
25060
DEBUG
#18 pc 004e63eb /apex/com.android.art/lib/libart.so (MterpInvokeStatic+490) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.204
25060
DEBUG
#19 pc 000cf394 /apex/com.android.art/lib/libart.so (mterp_op_invoke_static+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.204
25060
DEBUG
#20 pc 00425aba /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.JSONWriterUTF16.writeInt32+82)
02-20 16:06:14.204
25060
DEBUG
#21 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.204
25060
DEBUG
#22 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.204
25060
DEBUG
#23 pc 00425bd4 /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.JSONWriterUTF16.writeInt32+20)
02-20 16:06:14.204
25060
DEBUG
#24 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.204
25060
DEBUG
#25 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.204
25060
DEBUG
#26 pc 004eb530 /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.writer.ObjectWriterImplMap.write+900)
02-20 16:06:14.204
25060
DEBUG
#27 pc 004e825d /apex/com.android.art/lib/libart.so (MterpInvokeInterfaceRange+1196) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.204
25060
DEBUG
#28 pc 000cf714 /apex/com.android.art/lib/libart.so (mterp_op_invoke_interface_range+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.204
25060
DEBUG
#29 pc 004ea168 /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.writer.ObjectWriterImplList.write+1040)
02-20 16:06:14.205
25060
DEBUG
#30 pc 004e825d /apex/com.android.art/lib/libart.so (MterpInvokeInterfaceRange+1196) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.205
25060
DEBUG
#31 pc 000cf714 /apex/com.android.art/lib/libart.so (mterp_op_invoke_interface_range+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.205
25060
DEBUG
#32 pc 0042f26a /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.JSONWriter.writeAny+46)
02-20 16:06:14.205
25060
DEBUG
#33 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.205
25060
DEBUG
#34 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.205
25060
DEBUG
#35 pc 0042f214 /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.JSONWriter.write+216)
02-20 16:06:14.205
25060
DEBUG
#36 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.205
25060
DEBUG
#37 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.205
25060
DEBUG
#38 pc 0041a2f2 /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.JSONReader.toString+14)
02-20 16:06:14.205
25060
DEBUG
#39 pc 00236951 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+248) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.205
25060
DEBUG
#40 pc 0023d18d /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+144) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.205
25060
DEBUG
#41 pc 0023e0c7 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1486) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.205
25060
DEBUG
#42 pc 001047db /apex/com.android.art/lib/libart.so (void art::interpreter::ExecuteSwitchImplCpp<true, false>(art::interpreter::SwitchImplContext*)+39026) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.205
25060
DEBUG
#43 pc 000d9e75 /apex/com.android.art/lib/libart.so (ExecuteSwitchImplAsm+4) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.205
25060
DEBUG
#44 pc 003fee20 /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.JSONReaderUTF16.readString)
02-20 16:06:14.206
25060
DEBUG
#45 pc 0023690d /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+180) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.206
25060
DEBUG
#46 pc 0023d18d /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+144) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.206
25060
DEBUG
#47 pc 0023d941 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+716) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.206
25060
DEBUG
#48 pc 004e39f5 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+728) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.206
25060
DEBUG
#49 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.206
25060
DEBUG
#50 pc 00478784 /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.reader.ObjectReaderImplString.readObject)
02-20 16:06:14.206
25060
DEBUG
#51 pc 004e825d /apex/com.android.art/lib/libart.so (MterpInvokeInterfaceRange+1196) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.206
25060
DEBUG
#52 pc 000cf714 /apex/com.android.art/lib/libart.so (mterp_op_invoke_interface_range+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.206
25060
DEBUG
#53 pc 00434a64 /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x174f000) (com.alibaba.fastjson2.JSON.parseObject+96)
02-20 16:06:14.206
25060
DEBUG
#54 pc 004e6649 /apex/com.android.art/lib/libart.so (MterpInvokeStatic+1096) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.206
25060
DEBUG
#55 pc 000cf394 /apex/com.android.art/lib/libart.so (mterp_op_invoke_static+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.207
25060
DEBUG
#56 pc 0000c3ee /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x638000) (com.example.dpnetword.callback.HttpCallBack.jsonToBean+46)
02-20 16:06:14.207
25060
DEBUG
#57 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.207
25060
DEBUG
#58 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.207
25060
DEBUG
#59 pc 0000bc7a /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x638000) (com.example.dpnetword.callback.HttpCallBack$MiddleHttpCallBackAdapter.onNextSuccess+2)
02-20 16:06:14.207
25060
DEBUG
#60 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.207
25060
DEBUG
#61 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.207
25060
DEBUG
#62 pc 0000bf70 /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x638000) (com.example.dpnetword.callback.HttpCallBack$ParseHttpCallBackAdapter.onSuccess+76)
02-20 16:06:14.207
25060
DEBUG
#63 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.207
25060
DEBUG
#64 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.207
25060
DEBUG
#65 pc 0000c7d2 /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x638000) (com.example.dpnetword.callback.HttpCallBack.onSuccess+18)
02-20 16:06:14.207
25060
DEBUG
#66 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.207
25060
DEBUG
#67 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.208
25060
DEBUG
#68 pc 0000a16e /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x447000) (com.example.dpnetword.OkHttpAdapter$1.onResponse+54)
02-20 16:06:14.208
25060
DEBUG
#69 pc 004e52e5 /apex/com.android.art/lib/libart.so (MterpInvokeInterface+1524) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.208
25060
DEBUG
#70 pc 000cf414 /apex/com.android.art/lib/libart.so (mterp_op_invoke_interface+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.208
25060
DEBUG
#71 pc 003ac740 /data/app/~~KYLZe_mLba1_D4qG9Cms9g==/com.dragonpass.en.latam-JcGJ2U_tqLIjYT9Y5cM5Nw==/base.apk (offset 0x8c6000) (okhttp3.internal.connection.RealCall$AsyncCall.run+136)
02-20 16:06:14.208
25060
DEBUG
#72 pc 004e52e5 /apex/com.android.art/lib/libart.so (MterpInvokeInterface+1524) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.208
25060
DEBUG
#73 pc 000cf414 /apex/com.android.art/lib/libart.so (mterp_op_invoke_interface+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.209
25060
DEBUG
#74 pc 001fa0ee /apex/com.android.art/javalib/core-oj.jar (java.util.concurrent.ThreadPoolExecutor.runWorker+158)
02-20 16:06:14.209
25060
DEBUG
#75 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.209
25060
DEBUG
#76 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.209
25060
DEBUG
#77 pc 001f8eb0 /apex/com.android.art/javalib/core-oj.jar (java.util.concurrent.ThreadPoolExecutor$Worker.run+4)
02-20 16:06:14.209
25060
DEBUG
#78 pc 004e52e5 /apex/com.android.art/lib/libart.so (MterpInvokeInterface+1524) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.209
25060
DEBUG
#79 pc 000cf414 /apex/com.android.art/lib/libart.so (mterp_op_invoke_interface+20) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.209
25060
DEBUG
#80 pc 000eb858 /apex/com.android.art/javalib/core-oj.jar (java.lang.Thread.run+8)
02-20 16:06:14.209
25060
DEBUG
#81 pc 00236951 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+248) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.210
25060
DEBUG
#82 pc 0023d0c1 /apex/com.android.art/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+120) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.210
25060
DEBUG
#83 pc 004d5233 /apex/com.android.art/lib/libart.so (artQuickToInterpreterBridge+698) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.210
25060
DEBUG
#84 pc 000d9361 /apex/com.android.art/lib/libart.so (art_quick_to_interpreter_bridge+32) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.210
25060
DEBUG
#85 pc 000d47d5 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.210
25060
DEBUG
#86 pc 004f2427 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub+282) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.210
25060
DEBUG
#87 pc 0012cb2d /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+148) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.210
25060
DEBUG
#88 pc 003ff4df /apex/com.android.art/lib/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValuesart::ArtMethod*(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+374) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.210
25060
DEBUG
#89 pc 003ff5ef /apex/com.android.art/lib/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+42) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.210
25060
DEBUG
#90 pc 00440b35 /apex/com.android.art/lib/libart.so (art::Thread::CreateCallback(void*)+1056) (BuildId: cd812b963d209beb082034b283665d20)
02-20 16:06:14.210
25060
DEBUG
#91 pc 000aad13 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40) (BuildId: 3e89c4cee7649aff711c0a2b7f4346dd)
02-20 16:06:14.210
25060
DEBUG
#92 pc 00064193 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 3e89c4cee7649aff711c0a2b7f4346dd)

数据结构:
{
"list": [
{
"abroad": 2,
"airportCode": "A10005",
"cityId": "100748",
"cityName": "Lahore",
"continemt": "Asia",
"countryName": "Pakistan",
"countryid": "100230",
"hot": 0,
"iataCode": "LHE",
"id": 100005,
"iso2": "PK",
"lang": "en",
"latitude": "32.2383",
"longitude": "74.1316",
"name": "Allama Iqbal International Airport",
"needDistrict": false,
"sort": "L",
"type": 1
}
],
"note": "ok",
"state": "11"
}

另外我这边还有一份发生闪退的SOC的列表,也许可以对您有帮助
Spreadtrum SC9863A
Mediatek MT6762
Mediatek MT6765
Mediatek MT6739WW
Qualcomm SDM450
Qualcomm SDM439
Samsung Exynos 850
Samsung Exynos 7884B
Mediatek MT6761
Mediatek MT6762d
Samsung Exynos 7904
Spreadtrum T606

@wenshao
Copy link
Member

wenshao commented Feb 20, 2024

这个堆栈是什么版本?是所有设备都有这个问题还是部分设备?

@DarkAdventurer93
Copy link
Author

这个堆栈是什么版本?是所有设备都有这个问题还是部分设备?
这个堆栈的fastjson版本是2.0.46,是部分设备有这个问题(我在使用Samsung Z Flip4或者Samsung Z Fold4时无此问题),从Android 10到Android 13的系统都有,闪退主要集中于下面这个SOC的设备上:

Spreadtrum SC9863A
Mediatek MT6762
Mediatek MT6765
Mediatek MT6739WW
Qualcomm SDM450
Qualcomm SDM439
Samsung Exynos 850
Samsung Exynos 7884B
Mediatek MT6761
Mediatek MT6762d
Samsung Exynos 7904
Spreadtrum T606

产生上面的堆栈信息的手机信息为:
型号: Samsung Galaxy A10s(SM-A107M)
系统版本: Android 11
SOC: MT6762

@wenshao
Copy link
Member

wenshao commented Feb 21, 2024

是偶发还是必现的?

@DarkAdventurer93
Copy link
Author

是偶发还是必现的?
在上面这个手机Samsung Galaxy A10s(SM-A107M)
上使用2.0.46版本是必现的,我尝试过10多次,均会闪退
当降级到1.2.73版本之后此设备恢复正常

@wenshao
Copy link
Member

wenshao commented Feb 21, 2024

在writeInt32方法中,已经做了ensureCapacity off + 13,不会越界,这个崩溃好奇怪!

 @Override
    public void writeInt32(int i) {
        boolean writeAsString = (context.features & Feature.WriteNonStringValueAsString.mask) != 0;

        int off = this.off;
        int minCapacity = off + 13;
        if (minCapacity >= chars.length) {
            ensureCapacity(minCapacity);
        }

        final char[] chars = this.chars;
        if (writeAsString) {
            chars[off++] = quote;
        }
        off = IOUtils.writeInt32(chars, off, i);
        if (writeAsString) {
            chars[off++] = quote;
        }
        this.off = off;
    }

@wenshao
Copy link
Member

wenshao commented Feb 21, 2024

可以帮忙用android版本验证么?

  • 2.0.46.android5 最低兼容android5
  • 2.0.46.android8 最低兼容android8,支持java.time, Optional

@wenshao wenshao added the fixed label Feb 24, 2024
@wenshao wenshao added this to the 2.0.47 milestone Feb 24, 2024
@wenshao
Copy link
Member

wenshao commented Feb 24, 2024

https://github.com/alibaba/fastjson2/releases/tag/2.0.47
问题已修复,请用新版本

@wenshao wenshao closed this as completed Feb 24, 2024
@DarkAdventurer93
Copy link
Author

https://github.com/alibaba/fastjson2/releases/tag/2.0.47 问题已修复,请用新版本

你好,感谢回复!我在使用了最新的2.0.47版本之后仍然闪退,遂尝试新建了一个Example程序(为排除我们代码问题),引入2.0.47版本,仍然发生了闪退,代码如下:
class TestActivity : AppCompatActivity() {
companion object {
const val TAG = "TestActivity"
}

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_test)
    runCatching {
        val airport = Airport(100001L, "白云机场", 100)
        val toJSON = JSON.toJSON(airport)
        Log.e(TAG, "onCreate: $toJSON")
    }.onFailure {
        it.printStackTrace()
    }
}

}

data class Airport(
var id: Long,
var name: String?,
var cityId: Int
)

堆栈日志如下:
03-01 18:30:08.479 12793 12793 F DEBUG : backtrace:
03-01 18:30:08.479 12793 12793 F DEBUG : #00 pc 000803ca /apex/com.android.art/javalib/arm/boot.oat (art_jni_trampoline+18) (BuildId: 94604a8991efe3af11995fa130bcfae6e7d4248c)
03-01 18:30:08.479 12793 12793 F DEBUG : #1 pc 000d47d5 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.479 12793 12793 F DEBUG : #2 pc 004f2427 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub+282) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.479 12793 12793 F DEBUG : #3 pc 0012cb2d /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+148) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #4 pc 00245c97 /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+254) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #5 pc 0023e611 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+564) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #6 pc 004e6ce3 /apex/com.android.art/lib/libart.so (MterpInvokeVirtualRange+630) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #7 pc 000cf514 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual_range+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #8 pc 002dd388 [anon:dalvik-classes.dex extracted in memory from /data/app/~~CSbDhEaxOFamjVM9W4FsWQ==/com.example.androidx.viewpager2--e3FJJMOmXsQR03Vx75-qA==/base.apk] (com.alibaba.fastjson2.util.IOUtils.putLong+40)
03-01 18:30:08.480 12793 12793 F DEBUG : #9 pc 00236951 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+248) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #10 pc 0023d18d /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+144) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #11 pc 0023d941 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+716) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #12 pc 004e63eb /apex/com.android.art/lib/libart.so (MterpInvokeStatic+490) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #13 pc 000cf394 /apex/com.android.art/lib/libart.so (mterp_op_invoke_static+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #14 pc 002dc1dc [anon:dalvik-classes.dex extracted in memory from /data/app/~~CSbDhEaxOFamjVM9W4FsWQ==/com.example.androidx.viewpager2--e3FJJMOmXsQR03Vx75-qA==/base.apk] (com.alibaba.fastjson2.util.IOUtils.writeInt64+312)
03-01 18:30:08.480 12793 12793 F DEBUG : #15 pc 00236951 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+248) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #16 pc 0023d18d /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+144) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.480 12793 12793 F DEBUG : #17 pc 0023d941 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+716) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.481 12793 12793 F DEBUG : #18 pc 004e63eb /apex/com.android.art/lib/libart.so (MterpInvokeStatic+490) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.481 12793 12793 F DEBUG : #19 pc 000cf394 /apex/com.android.art/lib/libart.so (mterp_op_invoke_static+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.481 12793 12793 F DEBUG : #20 pc 0024490e [anon:dalvik-classes.dex extracted in memory from /data/app/~~CSbDhEaxOFamjVM9W4FsWQ==/com.example.androidx.viewpager2--e3FJJMOmXsQR03Vx75-qA==/base.apk] (com.alibaba.fastjson2.JSONWriterUTF16.writeInt64+62)
03-01 18:30:08.481 12793 12793 F DEBUG : #21 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.481 12793 12793 F DEBUG : #22 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.481 12793 12793 F DEBUG : #23 pc 002448b8 [anon:dalvik-classes.dex extracted in memory from /data/app/~~CSbDhEaxOFamjVM9W4FsWQ==/com.example.androidx.viewpager2--e3FJJMOmXsQR03Vx75-qA==/base.apk] (com.alibaba.fastjson2.JSONWriterUTF16.writeInt64+20)
03-01 18:30:08.481 12793 12793 F DEBUG : #24 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.481 12793 12793 F DEBUG : #25 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.481 12793 12793 F DEBUG : #26 pc 002430d6 [anon:dalvik-classes.dex extracted in memory from /data/app/~~CSbDhEaxOFamjVM9W4FsWQ==/com.example.androidx.viewpager2--e3FJJMOmXsQR03Vx75-qA==/base.apk] (com.alibaba.fastjson2.JSONWriterUTF16.write+486)
03-01 18:30:08.481 12793 12793 F DEBUG : #27 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.481 12793 12793 F DEBUG : #28 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.481 12793 12793 F DEBUG : #29 pc 001f5aa6 [anon:dalvik-classes.dex extracted in memory from /data/app/~~CSbDhEaxOFamjVM9W4FsWQ==/com.example.androidx.viewpager2--e3FJJMOmXsQR03Vx75-qA==/base.apk] (com.alibaba.fastjson2.JSONObject.toString+14)
03-01 18:30:08.481 12793 12793 F DEBUG : #30 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.481 12793 12793 F DEBUG : #31 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.482 12793 12793 F DEBUG : #32 pc 000e7902 /apex/com.android.art/javalib/core-oj.jar (java.lang.String.valueOf+10)
03-01 18:30:08.482 12793 12793 F DEBUG : #33 pc 004e6649 /apex/com.android.art/lib/libart.so (MterpInvokeStatic+1096) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.482 12793 12793 F DEBUG : #34 pc 000cf394 /apex/com.android.art/lib/libart.so (mterp_op_invoke_static+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.482 12793 12793 F DEBUG : #35 pc 000e62cc /apex/com.android.art/javalib/core-oj.jar (java.lang.StringBuilder.append)
03-01 18:30:08.482 12793 12793 F DEBUG : #36 pc 00236951 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+248) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.482 12793 12793 F DEBUG : #37 pc 0023d18d /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+144) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.482 12793 12793 F DEBUG : #38 pc 0023d941 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+716) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.482 12793 12793 F DEBUG : #39 pc 004e39f5 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+728) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.482 12793 12793 F DEBUG : #40 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.482 12793 12793 F DEBUG : #41 pc 00008078 [anon:dalvik-classes4.dex extracted in memory from /data/app/~~CSbDhEaxOFamjVM9W4FsWQ==/com.example.androidx.viewpager2--e3FJJMOmXsQR03Vx75-qA==/base.apk!classes4.dex] (androidx.viewpager2.integration.testapp.TestActivity.onCreate+88)
03-01 18:30:08.482 12793 12793 F DEBUG : #42 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.482 12793 12793 F DEBUG : #43 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.483 12793 12793 F DEBUG : #44 pc 001d3ec8 /system/framework/framework.jar (android.app.Activity.performCreate+88)
03-01 18:30:08.483 12793 12793 F DEBUG : #45 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.483 12793 12793 F DEBUG : #46 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.483 12793 12793 F DEBUG : #47 pc 001d3e56 /system/framework/framework.jar (android.app.Activity.performCreate+2)
03-01 18:30:08.483 12793 12793 F DEBUG : #48 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.483 12793 12793 F DEBUG : #49 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.483 12793 12793 F DEBUG : #50 pc 0024fa0a /system/framework/framework.jar (android.app.Instrumentation.callActivityOnCreate+6)
03-01 18:30:08.483 12793 12793 F DEBUG : #51 pc 00236951 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+248) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.483 12793 12793 F DEBUG : #52 pc 0023d18d /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+144) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.483 12793 12793 F DEBUG : #53 pc 0023e0c7 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1486) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.483 12793 12793 F DEBUG : #54 pc 001047db /apex/com.android.art/lib/libart.so (void art::interpreter::ExecuteSwitchImplCpp<true, false>(art::interpreter::SwitchImplContext*)+39026) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.483 12793 12793 F DEBUG : #55 pc 000d9e75 /apex/com.android.art/lib/libart.so (ExecuteSwitchImplAsm+4) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.483 12793 12793 F DEBUG : #56 pc 001c08c0 /system/framework/framework.jar (android.app.ActivityThread.performLaunchActivity)
03-01 18:30:08.483 12793 12793 F DEBUG : #57 pc 0023690d /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+180) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.483 12793 12793 F DEBUG : #58 pc 0023d18d /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+144) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #59 pc 0023e0c7 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1486) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #60 pc 001071e5 /apex/com.android.art/lib/libart.so (void art::interpreter::ExecuteSwitchImplCpp<true, false>(art::interpreter::SwitchImplContext*)+49788) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #61 pc 000d9e75 /apex/com.android.art/lib/libart.so (ExecuteSwitchImplAsm+4) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #62 pc 001c07ac /system/framework/framework.jar (android.app.ActivityThread.handleLaunchActivity)
03-01 18:30:08.484 12793 12793 F DEBUG : #63 pc 0023690d /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+180) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #64 pc 0023d18d /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+144) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #65 pc 0023d941 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+716) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #66 pc 004e39f5 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+728) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #67 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #68 pc 002e69ee /system/framework/framework.jar (android.app.servertransaction.LaunchActivityItem.execute+134)
03-01 18:30:08.484 12793 12793 F DEBUG : #69 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #70 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #71 pc 002e8e32 /system/framework/framework.jar (android.app.servertransaction.TransactionExecutor.executeCallbacks+154)
03-01 18:30:08.484 12793 12793 F DEBUG : #72 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #73 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.484 12793 12793 F DEBUG : #74 pc 002e8d6e /system/framework/framework.jar (android.app.servertransaction.TransactionExecutor.execute+146)
03-01 18:30:08.485 12793 12793 F DEBUG : #75 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.485 12793 12793 F DEBUG : #76 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.485 12793 12793 F DEBUG : #77 pc 001bfb78 /system/framework/framework.jar (android.app.ActivityThread$H.handleMessage+276)
03-01 18:30:08.485 12793 12793 F DEBUG : #78 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.485 12793 12793 F DEBUG : #79 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.485 12793 12793 F DEBUG : #80 pc 0040cd52 /system/framework/framework.jar (offset 0x9c6000) (android.os.Handler.dispatchMessage+38)
03-01 18:30:08.485 12793 12793 F DEBUG : #81 pc 004e3c31 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+1300) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.485 12793 12793 F DEBUG : #82 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.485 12793 12793 F DEBUG : #83 pc 0044c894 /system/framework/framework.jar (offset 0x9c6000) (android.os.Looper.loop+480)
03-01 18:30:08.485 12793 12793 F DEBUG : #84 pc 00236951 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+248) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.485 12793 12793 F DEBUG : #85 pc 0023d18d /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+144) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #86 pc 0023e0c7 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1486) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #87 pc 001071e5 /apex/com.android.art/lib/libart.so (void art::interpreter::ExecuteSwitchImplCpp<true, false>(art::interpreter::SwitchImplContext*)+49788) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #88 pc 000d9e75 /apex/com.android.art/lib/libart.so (ExecuteSwitchImplAsm+4) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #89 pc 001cb3e8 /system/framework/framework.jar (android.app.ActivityThread.main)
03-01 18:30:08.486 12793 12793 F DEBUG : #90 pc 0023690d /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+180) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #91 pc 0023d0c1 /apex/com.android.art/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+120) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #92 pc 004d5233 /apex/com.android.art/lib/libart.so (artQuickToInterpreterBridge+698) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #93 pc 000d9361 /apex/com.android.art/lib/libart.so (art_quick_to_interpreter_bridge+32) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #94 pc 000d47d5 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #95 pc 004f2559 /apex/com.android.art/lib/libart.so (art_quick_invoke_static_stub+276) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #96 pc 0012cb3f /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+166) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #97 pc 003ffc1b /apex/com.android.art/lib/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned int)+906) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #98 pc 003a0173 /apex/com.android.art/lib/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+30) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.486 12793 12793 F DEBUG : #99 pc 00083667 /apex/com.android.art/javalib/arm/boot.oat (art_jni_trampoline+110) (BuildId: 94604a8991efe3af11995fa130bcfae6e7d4248c)
03-01 18:30:08.486 12793 12793 F DEBUG : #100 pc 000d47d5 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.487 12793 12793 F DEBUG : #101 pc 004f2427 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub+282) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.487 12793 12793 F DEBUG : #102 pc 0012cb2d /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+148) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.487 12793 12793 F DEBUG : #103 pc 00245c97 /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+254) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.487 12793 12793 F DEBUG : #104 pc 0023d957 /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+738) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.487 12793 12793 F DEBUG : #105 pc 004e39f5 /apex/com.android.art/lib/libart.so (MterpInvokeVirtual+728) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.487 12793 12793 F DEBUG : #106 pc 000cf214 /apex/com.android.art/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.487 12793 12793 F DEBUG : #107 pc 00233796 /system/framework/framework.jar (offset 0x1bed000) (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
03-01 18:30:08.487 12793 12793 F DEBUG : #108 pc 00236951 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.1954272913672382452)+248) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.487 12793 12793 F DEBUG : #109 pc 0023d0c1 /apex/com.android.art/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+120) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.487 12793 12793 F DEBUG : #110 pc 004d5233 /apex/com.android.art/lib/libart.so (artQuickToInterpreterBridge+698) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.487 12793 12793 F DEBUG : #111 pc 000d9361 /apex/com.android.art/lib/libart.so (art_quick_to_interpreter_bridge+32) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.487 12793 12793 F DEBUG : #112 pc 0090e54f /system/framework/arm/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2086) (BuildId: da2235d3bf87a1e055344e463c105bf846170a25)
03-01 18:30:08.487 12793 12793 F DEBUG : #113 pc 000d47d5 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.488 12793 12793 F DEBUG : #114 pc 004f2559 /apex/com.android.art/lib/libart.so (art_quick_invoke_static_stub+276) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.488 12793 12793 F DEBUG : #115 pc 0012cb3f /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+166) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.488 12793 12793 F DEBUG : #116 pc 003fed77 /apex/com.android.art/lib/libart.so (art::JValue art::InvokeWithVarArgsart::ArtMethod*(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+350) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.488 12793 12793 F DEBUG : #117 pc 003ff01b /apex/com.android.art/lib/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+42) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.488 12793 12793 F DEBUG : #118 pc 00328aad /apex/com.android.art/lib/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+496) (BuildId: cd812b963d209beb082034b283665d20)
03-01 18:30:08.488 12793 12793 F DEBUG : #119 pc 000688d5 /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+28) (BuildId: 8581485023bf27167e9905f87a579570)
03-01 18:30:08.488 12793 12793 F DEBUG : #120 pc 0006eda9 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vectorandroid::String8 const&, bool)+608) (BuildId: 8581485023bf27167e9905f87a579570)
03-01 18:30:08.488 12793 12793 F DEBUG : #121 pc 00002e55 /system/bin/app_process32 (main+976) (BuildId: 8c004ebe58aedec6eed099c80bce784d)
03-01 18:30:08.488 12793 12793 F DEBUG : #122 pc 0005d4f1 /apex/com.android.runtime/lib/bionic/libc.so (__libc_init+68) (BuildId: 3e89c4cee7649aff711c0a2b7f4346dd)

我在使用2.0.47版本时,搜索完整的日志未发现Unsafe初始化失败的错误,然后我在搜索时看到一个可能有关联的问题:
https://issuetracker.google.com/issues/148240970#comment8
希望可以对你有帮助,感谢!

@devzwy
Copy link

devzwy commented Mar 12, 2024

也是走到tojson时闪退了,用了几个版本都不行。安卓端。
2.0.45 2.0.47 等等

2024-03-12 09:34:40.144 23255-23397 libc                    cn.uexpo                             A  Fatal signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xea8ce1aa in tid 23397 (DefaultDispatch), pid 23255 (cn.uexpo)
2024-03-12 09:34:40.326 23422-23422 DEBUG                   pid-23422                            A  pid: 23255, tid: 23397, name: DefaultDispatch  >>> cn.uexpo <<<
2024-03-12 09:34:40.858 23422-23422 DEBUG                   pid-23422                            A        #08 pc 003bc0f2  [anon:dalvik-classes.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk] (com.alibaba.fastjson2.JSONWriterUTF16.writeBool+142)
2024-03-12 09:34:40.859 23422-23422 DEBUG                   pid-23422                            A        #11 pc 00483698  [anon:dalvik-classes.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk] (com.alibaba.fastjson2.writer.ObjectWriterImplMap.write+1060)
2024-03-12 09:34:40.859 23422-23422 DEBUG                   pid-23422                            A        #14 pc 003cccb6  [anon:dalvik-classes.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk] (com.alibaba.fastjson2.JSON.toJSONString+142)
2024-03-12 09:34:40.859 23422-23422 DEBUG                   pid-23422                            A        #17 pc 002b164a  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.utils.MDUtil.toJson+10)
2024-03-12 09:34:40.859 23422-23422 DEBUG                   pid-23422                            A        #20 pc 002aff4a  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.manager.ApiManager.updateRow+206)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #23 pc 002afdde  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.manager.ApiManager.updateRow$default+46)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #26 pc 002afe62  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.manager.ApiManager.updateRow+106)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #29 pc 002ad136  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.MDHelper.updateRow+50)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #32 pc 002ad0a2  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.MDHelper.updateRow$default+54)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #35 pc 000ba2d2  /data/data/cn.uexpo/code_cache/.overlay/base.apk/classes2.dex (cn.uexpo.data.repository.request.HttpRequestManger.publishCard+154)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #38 pc 000c1d08  /data/data/cn.uexpo/code_cache/.overlay/base.apk/classes2.dex (cn.uexpo.viewmodel.state.MainViewModel$publishCard$1.invokeSuspend+64)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #41 pc 000c1cac  /data/data/cn.uexpo/code_cache/.overlay/base.apk/classes2.dex (cn.uexpo.viewmodel.state.MainViewModel$publishCard$1.invoke+16)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #44 pc 000c1c80  /data/data/cn.uexpo/code_cache/.overlay/base.apk/classes2.dex (cn.uexpo.viewmodel.state.MainViewModel$publishCard$1.invoke+4)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #47 pc 0000d43a  [anon:dalvik-classes5.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes5.dex] (me.hgj.jetpackmvvm.ext.BaseViewModelExtKt$requestNoCheck$3$1$1.invokeSuspend+66)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #50 pc 0031d5ca  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+42)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #53 pc 00421efe  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlinx.coroutines.DispatchedTask.run+386)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #56 pc 00471ea2  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely+2)
2024-03-12 09:34:40.862 23422-23422 DEBUG                   pid-23422                            A        #59 pc 00470a3a  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask+34)
2024-03-12 09:34:40.862 23422-23422 DEBUG                   pid-23422                            A        #62 pc 00470b6c  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker+56)
2024-03-12 09:34:40.862 23422-23422 DEBUG                   pid-23422                            A        #65 pc 00470b1c  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run)

@wenshao
Copy link
Member

wenshao commented Mar 12, 2024

@devzwy

你可以用 2.0.47.android5 版本,这个已经在手淘开始做测试的版本,性能和稳定性都没问题的。

@wenshao wenshao reopened this Mar 12, 2024
@DarkAdventurer93
Copy link
Author

也是走到tojson时闪退了,用了几个版本都不行。安卓端。 2.0.45 2.0.47 等等

2024-03-12 09:34:40.144 23255-23397 libc                    cn.uexpo                             A  Fatal signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xea8ce1aa in tid 23397 (DefaultDispatch), pid 23255 (cn.uexpo)
2024-03-12 09:34:40.326 23422-23422 DEBUG                   pid-23422                            A  pid: 23255, tid: 23397, name: DefaultDispatch  >>> cn.uexpo <<<
2024-03-12 09:34:40.858 23422-23422 DEBUG                   pid-23422                            A        #08 pc 003bc0f2  [anon:dalvik-classes.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk] (com.alibaba.fastjson2.JSONWriterUTF16.writeBool+142)
2024-03-12 09:34:40.859 23422-23422 DEBUG                   pid-23422                            A        #11 pc 00483698  [anon:dalvik-classes.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk] (com.alibaba.fastjson2.writer.ObjectWriterImplMap.write+1060)
2024-03-12 09:34:40.859 23422-23422 DEBUG                   pid-23422                            A        #14 pc 003cccb6  [anon:dalvik-classes.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk] (com.alibaba.fastjson2.JSON.toJSONString+142)
2024-03-12 09:34:40.859 23422-23422 DEBUG                   pid-23422                            A        #17 pc 002b164a  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.utils.MDUtil.toJson+10)
2024-03-12 09:34:40.859 23422-23422 DEBUG                   pid-23422                            A        #20 pc 002aff4a  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.manager.ApiManager.updateRow+206)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #23 pc 002afdde  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.manager.ApiManager.updateRow$default+46)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #26 pc 002afe62  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.manager.ApiManager.updateRow+106)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #29 pc 002ad136  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.MDHelper.updateRow+50)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #32 pc 002ad0a2  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (io.github.devzwy.mdhelper.MDHelper.updateRow$default+54)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #35 pc 000ba2d2  /data/data/cn.uexpo/code_cache/.overlay/base.apk/classes2.dex (cn.uexpo.data.repository.request.HttpRequestManger.publishCard+154)
2024-03-12 09:34:40.860 23422-23422 DEBUG                   pid-23422                            A        #38 pc 000c1d08  /data/data/cn.uexpo/code_cache/.overlay/base.apk/classes2.dex (cn.uexpo.viewmodel.state.MainViewModel$publishCard$1.invokeSuspend+64)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #41 pc 000c1cac  /data/data/cn.uexpo/code_cache/.overlay/base.apk/classes2.dex (cn.uexpo.viewmodel.state.MainViewModel$publishCard$1.invoke+16)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #44 pc 000c1c80  /data/data/cn.uexpo/code_cache/.overlay/base.apk/classes2.dex (cn.uexpo.viewmodel.state.MainViewModel$publishCard$1.invoke+4)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #47 pc 0000d43a  [anon:dalvik-classes5.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes5.dex] (me.hgj.jetpackmvvm.ext.BaseViewModelExtKt$requestNoCheck$3$1$1.invokeSuspend+66)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #50 pc 0031d5ca  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+42)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #53 pc 00421efe  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlinx.coroutines.DispatchedTask.run+386)
2024-03-12 09:34:40.861 23422-23422 DEBUG                   pid-23422                            A        #56 pc 00471ea2  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely+2)
2024-03-12 09:34:40.862 23422-23422 DEBUG                   pid-23422                            A        #59 pc 00470a3a  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask+34)
2024-03-12 09:34:40.862 23422-23422 DEBUG                   pid-23422                            A        #62 pc 00470b6c  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker+56)
2024-03-12 09:34:40.862 23422-23422 DEBUG                   pid-23422                            A        #65 pc 00470b1c  [anon:dalvik-classes3.dex extracted in memory from /data/app/~~09oBzKAYUChcI3eWqhwniA==/cn.uexpo-mugNDMXJ66AK2YqX8yK16g==/base.apk!classes3.dex] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run)

可能是引用了fastjson2-kotlin模块的问题,如果有的话可以尝试去掉此依赖再试试,我在用了2.0.47.android5+fastjson2-kotlin会闪退,去掉了fastjson2-kotlin模块就可以了

@devzwy
Copy link

devzwy commented Mar 20, 2024

真假?Kotlin的项目,去掉kotlin可以正常用不

@wenshao wenshao removed the fixed label Mar 30, 2024
@wenshao wenshao modified the milestones: 2.0.47, 2.0.49 Mar 30, 2024
@wenshao wenshao modified the milestones: 2.0.49, 2.0.50 Apr 13, 2024
@kraity
Copy link
Collaborator

kraity commented May 2, 2024

目前kotlin模块是依赖com.alibaba.fastjson2:fastjson2作用是compile. 若同时使用了2.0.*.android*安卓定制版可能会出现这种错误.

目前2.0.49及其之前的版本试试:
避免标准版和安卓定制版同时打入安装包

Gradle

implementation ("com.alibaba.fastjson2:fastjson2-kotlin:2.0.49") { // 此处2.0.49改为自己使用的版本
    exclude group: "com.alibaba.fastjson2", module: "fastjson2"
}

Kotlin Gradle

implementation ("com.alibaba.fastjson2:fastjson2-kotlin:2.0.49") { // 此处2.0.49改为自己使用的版本
    exclude(group = "com.alibaba.fastjson2", module = "fastjson2")
}

@kraity
Copy link
Collaborator

kraity commented May 2, 2024

如果仍然有问题, 麻烦请在当前项目terminal执行一下./gradlew dependencies看下依赖树

@wenshao wenshao modified the milestones: 2.0.50, 2.0.51 May 12, 2024
@wenshao wenshao added this to the 2.0.52 milestone May 14, 2024
@wenshao wenshao modified the milestones: 2.0.52, 2.0.53 Jul 7, 2024
@wenshao wenshao removed this from the 2.0.53 milestone Aug 10, 2024
@lzlgithub
Copy link

#8 pc 00e6eede /data/app/com.mxdxedu.aps-BDKr4PnUmxV7p7pcdfVF9Q==/oat/arm/base.vdex (com.alibaba.fastjson2.util.IOUtils.putLong)
#14 pc 00e6dbb6 /data/app/com.mxdxedu.aps-BDKr4PnUmxV7p7pcdfVF9Q==/oat/arm/base.vdex (com.alibaba.fastjson2.util.IOUtils.writeInt64)
#20 pc 00ddca56 /data/app/com.mxdxedu.aps-BDKr4PnUmxV7p7pcdfVF9Q==/oat/arm/base.vdex (com.alibaba.fastjson2.JSONWriterUTF16.writeInt64)
#34 pc 00e862b2 /data/app/com.mxdxedu.aps-BDKr4PnUmxV7p7pcdfVF9Q==/oat/arm/base.vdex (com.alibaba.fastjson2.writer.ObjectWriterAdapter.write)
#47 pc 00dec456 /data/app/com.mxdxedu.aps-BDKr4PnUmxV7p7pcdfVF9Q==/oat/arm/base.vdex (com.alibaba.fastjson2.JSON.toJSONString)
#53 pc 01489268 /data/app/com.mxdxedu.aps-BDKr4PnUmxV7p7pcdfVF9Q==/oat/arm/base.vdex (com.mxdxedu.modulecommon.util.MMKVUtils.save)
#59 pc 0147565e /data/app/com.mxdxedu.aps-BDKr4PnUmxV7p7pcdfVF9Q==/oat/arm/base.vdex (com.mxdxedu.modulecommon.collect.collector.AppCollectUtil.saveSaveList)
#65 pc 01475516 /data/app/com.mxdxedu.aps-BDKr4PnUmxV7p7pcdfVF9Q==/oat/arm/base.vdex (com.mxdxedu.modulecommon.collect.collector.AppCollectUtil$1.handleMessage)

使用的是 设备是红米9A MIUI12.5.1 ANDROID 10
fastjson版本:com.alibaba.fastjson2:fastjson2-kotlin:2.0.53

@wenshao wenshao added this to the 2.0.54 milestone Oct 30, 2024
@wenshao wenshao modified the milestones: 2.0.54, 2.0.55 Jan 1, 2025
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

5 participants