Bug #113481
测试 Test-ST #113421: V4.0功能与专项测试
测试 Test-ST #113422: V4.0专项--AF专项--monkey测试
【AF】【EVT2】【Monkey】Monkey测试8小时,出现CRASH: com.android.storagemanager
Status: | CLOSED | Start date: | 2022-11-01 | |
---|---|---|---|---|
Priority: | Normal | Due date: | 2022-11-08 | |
Assignee: | CD Test赵飞 | % Done: | 100% | |
Category: | CD-FW | |||
Target version: | VX1_MCE_FSE_V3.0_update_20221130 | |||
Need_Info: | -- | Found Version: | FlatBuild_HH_VX1_MCE_FSE.M.D.user.01.00.X101.202210290232 | |
Resolution: | FIXED | Degrated: | No | |
Severity: | Normal | Verified Version: | ||
Reproducibility: | Frequently | Fixed Version: | 2022-11-15 | |
Test Type: | Monkey Test | Root cause: | 进程被系统回收,再次进入页面进行数据恢复时,PreferenceGroup 数据拆箱异常,导致崩溃。 |
Description
执行命令:
1. adb shell
2. monkey --ignore-crashes --ignore-timeouts --ignore-security-exceptions --monitor-native-crashes --ignore-native-crashes -s 20 --throttle 200 --pct-touch 30 --pct-motion 15 --pct-nav 15 --pct-majornav 15 --pct-syskeys 5 --pct-appswitch 5 --pct-anyevent 5 --ignore-crashes -v -v -v 180000 2>/sdcard/error.txt 1>/sdcard/info.txt
错误日志:
10-28 07:10:00.283 6173 10310 W Monkey : // CRASH: com.android.storagemanager (pid 8807) 10-28 07:10:00.284 6173 10310 W Monkey : // Short Msg: java.lang.ClassNotFoundException 10-28 07:10:00.284 6173 10310 W Monkey : // Long Msg: java.lang.ClassNotFoundException: androidx.preference.PreferenceGroup$SavedState 10-28 07:10:00.284 6173 10310 W Monkey : // Build Label: TC/figure_CN/figure:12/SKQ1.220201.001/1230:userdebug/test-keys 10-28 07:10:00.284 6173 10310 W Monkey : // Build Changelist: 1230 10-28 07:10:00.285 6173 10310 W Monkey : // Build Time: 1666894340000 10-28 07:10:00.285 6173 10310 W Monkey : // java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.storagemanager/com.android.storagemanager.deletionhelper.DeletionHelperActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: androidx.preference.PreferenceGroup$SavedState 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3636) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3793) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2211) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.Handler.dispatchMessage(Handler.java:106) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.Looper.loopOnce(Looper.java:201) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.Looper.loop(Looper.java:288) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.ActivityThread.main(ActivityThread.java:7880) 10-28 07:10:00.285 6173 10310 W Monkey : // at java.lang.reflect.Method.invoke(Native Method) 10-28 07:10:00.285 6173 10310 W Monkey : // at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 10-28 07:10:00.285 6173 10310 W Monkey : // at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1009) 10-28 07:10:00.285 6173 10310 W Monkey : // Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: androidx.preference.PreferenceGroup$SavedState 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.Parcel.readParcelableCreator(Parcel.java:3416) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.Parcel.readParcelable(Parcel.java:3324) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.view.AbsSavedState.<init>(AbsSavedState.java:67) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.view.AbsSavedState.<init>(AbsSavedState.java:56) 10-28 07:10:00.285 6173 10310 W Monkey : // at androidx.preference.Preference$BaseSavedState.<init>(Preference.java:2210) 10-28 07:10:00.285 6173 10310 W Monkey : // at com.android.storagemanager.deletionhelper.CollapsibleCheckboxPreferenceGroup$SavedState.<init>(CollapsibleCheckboxPreferenceGroup.java:201) 10-28 07:10:00.285 6173 10310 W Monkey : // at com.android.storagemanager.deletionhelper.CollapsibleCheckboxPreferenceGroup$SavedState$1.createFromParcel(CollapsibleCheckboxPreferenceGroup.java:220) 10-28 07:10:00.285 6173 10310 W Monkey : // at com.android.storagemanager.deletionhelper.CollapsibleCheckboxPreferenceGroup$SavedState$1.createFromParcel(CollapsibleCheckboxPreferenceGroup.java:218) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.Parcel.readParcelable(Parcel.java:3333) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.Parcel.readValue(Parcel.java:3226) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.Parcel.readArrayMapInternal(Parcel.java:3623) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.BaseBundle.unparcel(BaseBundle.java:236) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.Bundle.getParcelable(Bundle.java:1002) 10-28 07:10:00.285 6173 10310 W Monkey : // at androidx.preference.Preference.dispatchRestoreInstanceState(Preference.java:2064) 10-28 07:10:00.285 6173 10310 W Monkey : // at androidx.preference.PreferenceGroup.dispatchRestoreInstanceState(PreferenceGroup.java:508) 10-28 07:10:00.285 6173 10310 W Monkey : // at androidx.preference.Preference.restoreHierarchyState(Preference.java:2049) 10-28 07:10:00.285 6173 10310 W Monkey : // at androidx.preference.PreferenceFragment.onViewCreated(PreferenceFragment.java:278) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1313) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1581) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1642) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3052) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3004) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.FragmentController.dispatchActivityCreated(FragmentController.java:185) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.Activity.performCreate(Activity.java:8078) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.Activity.performCreate(Activity.java:8050) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1330) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3609) 10-28 07:10:00.285 6173 10310 W Monkey : // ... 12 more 10-28 07:10:00.285 6173 10310 W Monkey : // Caused by: java.lang.ClassNotFoundException: androidx.preference.PreferenceGroup$SavedState 10-28 07:10:00.285 6173 10310 W Monkey : // at java.lang.Class.classForName(Native Method) 10-28 07:10:00.285 6173 10310 W Monkey : // at java.lang.Class.forName(Class.java:454) 10-28 07:10:00.285 6173 10310 W Monkey : // at android.os.Parcel.readParcelableCreator(Parcel.java:3390) 10-28 07:10:00.285 6173 10310 W Monkey : // ... 39 more 10-28 07:10:00.285 6173 10310 W Monkey : // Caused by: java.lang.ClassNotFoundException: androidx.preference.PreferenceGroup$SavedState 10-28 07:10:00.285 6173 10310 W Monkey : // ... 42 more 10-28 07:10:00.285 6173 10310 W Monkey : //
History
#1 Updated by CD Test赵飞 over 2 years ago
日志见Bug #113456 附件
#2 Updated by CD FW 曹覃刚 over 2 years ago
- Status changed from New to ASSIGNED
- Assignee changed from CD FW 曹覃刚 to CD FW-廖涛
#3 Updated by CD FW-廖涛 over 2 years ago
■ Current state
经过分析,问题出现在进入存储管理后,退到后台,当前进程被系统杀掉,然后再回到存储管理,恢复数据时,出现找不到类的问题,导致崩溃。
■ My analysis
复现方法:在开发者模式中,找到【不保留活动】选项,并开启;然后进入 设置-存储-释放空间,退到后台,再进入;
开始分析以为是 androidx.preference.PreferenceGroup 类没有被加载,但从实际打印日志可以看出 Bundle 中的 ClassLoader 可以成功加载 androidx.preference.PreferenceGroup,猜测可能是 AOSP 的 BUG;
解决崩溃的临时方法:因为是恢复数据时,找不到类,那么可以在 Bundle 移除对应数据,不让其进行恢复,直接使用默认初始化数据;该方法会导致用户变更数据丢失;
■ Next action
进一步分析,看是否能解决。
#4 Updated by CD FW-廖涛 over 2 years ago
#5 Updated by CD FW-廖涛 over 2 years ago
- % Done changed from 0 to 80
- Degrated changed from -- to No
#6 Updated by CD FW-廖涛 over 2 years ago
- Root cause set to 进程被系统回收,再次进入页面进行数据恢复时,PreferenceGroup 数据拆箱异常,导致崩溃。
#7 Updated by CD FW-廖涛 over 2 years ago
- Status changed from ASSIGNED to RESOLVED
- Assignee changed from CD FW-廖涛 to CD Test赵飞
- % Done changed from 80 to 100
- Resolution changed from -- to FIXED
- Fixed Version set to 2022-11-15
#8 Updated by CD Test赵飞 over 2 years ago
- % Done changed from 100 to 70
11月15号Release版本(user)未复现此问题
Monkey问题,继续跟踪2 个版本
#9 Updated by CD Test赵飞 over 2 years ago
11月16号DB版本(user)未复现此问题
Monkey问题,继续跟踪1个版本
#10 Updated by CD Test赵飞 over 2 years ago
- Status changed from RESOLVED to VERIFIED
- % Done changed from 70 to 80
11月17号Release版本(user)未复现此问题
已跟踪3个版本未复现,关闭此问题
#11 Updated by CD Test赵飞 over 2 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 80 to 100
#12 Updated by CD FW-王伟 over 2 years ago
ID | Project | Branch | Uploader |
161730 | general/platform/packages/apps/StorageManager | Pre_figure_turbox-c2130c-la1.1-qssi12-dev | tao.liao@thundersoft.com |
AF:StorageManager: Fix crash when restore from background. When restore PreferenceGroup data, app will crash. Remove PreferenceGroup data, keep default. TC-RID: 1201-0203701 IssueID: TS-R-BUG-113481 Change-Id: I202a11e138bd55897511cb91366a48e5dd79fcf1 |