Meituan-Dianping / Robust

Robust is an Android HotFix solution with high compatibility and high stability. Robust can fix bugs immediately without a reboot.
Apache License 2.0
4.43k stars 809 forks source link

补丁加载成功,但是跳转卡死了 #476

Open cwwei2005 opened 2 years ago

cwwei2005 commented 2 years ago

异常类型:app运行时异常/编译异常

手机型号:redmik40

手机系统版本:MIUI13

Robust版本:0.4.90

Gradle版本:5.4.1

堆栈/日志:

2022-06-23 09:50:32.059 1894-2570/? D/MIUIInput: [MotionEvent] publisher action=0x0, 1076607162, channel '2c010f2 com.feparks.testrobust/com.feparks.testrobust.MainActivity (server)' 2022-06-23 09:50:32.087 1894-2570/? D/MIUIInput: [MotionEvent] publisher action=0x1, 1076607193, channel '2c010f2 com.feparks.testrobust/com.feparks.testrobust.MainActivity (server)' 2022-06-23 09:50:32.096 10579-10634/? D/robust: patchManipulate list size is 1 2022-06-23 09:50:32.097 10579-10634/? D/robust: patch patch_info_name:com.feparks.testrobust.patch.PatchesInfoImpl 2022-06-23 09:50:32.098 10579-10634/? D/robust: current path:com.feparks.testrobust.SecondActivity 2022-06-23 09:50:32.098 10579-10634/? D/robust: oldClass :class com.feparks.testrobust.SecondActivity fields 2 2022-06-23 09:50:32.098 10579-10634/? D/robust: current path:com.feparks.testrobust.SecondActivity find:ChangeQuickRedirect com.feparks.testrobust.patch.SecondActivityPatchControl 2022-06-23 09:50:32.099 10579-10634/? D/robust: changeQuickRedirectField set success com.feparks.testrobust.patch.SecondActivityPatchControl 2022-06-23 09:50:32.099 10579-10634/? D/robust: patch finished 2022-06-23 09:50:32.099 10579-10634/? D/robust: patch LocalPath:/storage/emulated/0/Android/data/com.feparks.testrobust/cache/patch_download/patch.jar,apply result true 2022-06-23 09:50:39.470 1894-2570/? D/MIUIInput: [MotionEvent] publisher action=0x0, 1076614574, channel '2c010f2 com.feparks.testrobust/com.feparks.testrobust.MainActivity (server)' 2022-06-23 09:50:39.489 1894-2570/? D/MIUIInput: [MotionEvent] publisher action=0x1, 1076614596, channel '2c010f2 com.feparks.testrobust/com.feparks.testrobust.MainActivity (server)' 2022-06-23 09:50:39.495 1894-5082/? I/ActivityTaskManager: START u0 {cmp=com.feparks.testrobust/.SecondActivity} from uid 10791 2022-06-23 09:50:39.497 1894-5082/? D/MiuiFreeFormManagerService: onStartActivityInner as = Task{6ce6bf #26438 type=standard A=10791:com.feparks.testrobust U=0 visible=true mode=fullscreen translucent=false sz=1} op = null 2022-06-23 09:50:39.498 1894-5082/? D/MiuiFreeFormManagerService: onStartActivityInner as = Task{6ce6bf #26438 type=standard A=10791:com.feparks.testrobust U=0 visible=true mode=fullscreen translucent=false sz=1} op = null 2022-06-23 09:50:39.505 1894-5082/? D/PerfImpl: perfWarmLaunchBoost: com.feparks.testrobust, -1, 2 2022-06-23 09:50:39.510 1101-1101/? D/CompositionEngine: writeOutputDependentGeometryStateToHWC layer[com.feparks.testrobust/com.feparks.testrobust.MainActivity#0] set Z 134217728 miFodLayer 0x8000000 2022-06-23 09:50:39.512 1894-5663/? D/PerfImpl: perfWarmLaunchBoost: com.feparks.testrobust, -1, 2 2022-06-23 09:50:39.512 1894-5663/? D/PerfImpl: perfColdLaunchBoost: com.feparks.testrobust, 10579, 102 2022-06-23 09:50:39.513 1006-1094/? I/ANDR-PERF-LM: MetaMeter: isValidAsync() 203: Invalid (hintID,hintType,appName,duration,appPID,appThreadTID) = (4225, 102,com.feparks.testrobust,10579,1894,5663) 2022-06-23 09:50:39.519 1101-1101/? D/CompositionEngine: writeOutputDependentGeometryStateToHWC layer[com.feparks.testrobust/com.feparks.testrobust.MainActivity#0] set Z 134217728 miFodLayer 0x8000000 2022-06-23 09:50:39.617 3012-3379/? W/RecentsModel: getRunningTask taskInfo=TaskInfo{userId=0 taskId=26438 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.feparks.testrobust/.MainActivity } baseActivity=ComponentInfo{com.feparks.testrobust/com.feparks.testrobust.MainActivity} topActivity=ComponentInfo{com.feparks.testrobust/com.feparks.testrobust.SecondActivity} origActivity=null realActivity=ComponentInfo{com.feparks.testrobust/com.feparks.testrobust.MainActivity} numActivities=2 lastActiveTime=2199760231 supportsSplitScreenMultiWindow=true supportsMultiWindow=true resizeMode=1 isResizeable=true token=WCT{android.window.IWindowContainerToken$Stub$Proxy@b31510c} topActivityType=1 pictureInPictureParams=PictureInPictureParams( aspectRatio=null sourceRectHint=null hasSetActions=false isAutoPipEnabled=false isSeamlessResizeEnabled=true) displayCutoutSafeInsets=Rect(0, 80 - 0, 0) topActivityInfo=ActivityInfo{5f95a55 com.feparks.testrobust.SecondActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=false isVisible=true topActivityInSizeCompat=false locusId= null windowMode=1} 2022-06-23 09:50:39.617 3012-3379/? W/RecentsModel: getTaskInfoIgnoreHomeAndFreeform taskInfo=ComponentInfo{com.feparks.testrobust/com.feparks.testrobust.MainActivity} 2022-06-23 09:50:39.618 3012-3379/? E/ActivityManagerWrapper: getRecentTasks: taskId=26438 userId=0 baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.feparks.testrobust/.MainActivity }

ls.invokeReflectMethod(Unknown Source:4) 2022-06-23 09:50:44.741 10579-10579/? W/System.err: at com.feparks.testrobust.patch.AppCompatActivityInLinePatch.onCreate(AppCompatActivityInLinePatch.java:106) 2022-06-23 09:50:44.741 10579-10579/? W/System.err: at com.meituan.robust.utils.EnhancedRobustUtils.invokeReflectMethod(Unknown Source:4) 2022-06-23 09:50:44.741 10579-10579/? W/System.err: at com.feparks.testrobust.patch.SecondActivityPatch.onCreate(SecondActivityPatch.java:18) 2022-06-23 09:50:44.741 10579-10579/? W/System.err: at com.feparks.testrobust.patch.SecondActivityPatchControl.accessDispatch(Unknown Source:75) 2022-06-23 09:50:44.741 10579-10579/? W/System.err: at com.meituan.robust.PatchProxy.accessDispatch(Unknown Source:63) 2022-06-23 09:50:44.741 10579-10579/? W/System.err: at com.meituan.robust.PatchProxy.proxy(Unknown Source:14) 2022-06-23 09:50:44.741 10579-10579/? W/System.err: at com.feparks.testrobust.SecondActivity.onCreate(Unknown Source:19) 2022-06-23 09:50:44.741 10579-10579/? W/System.err: at com.meituan.robust.utils.EnhancedRobustUtils.invokeReflectMethod(Unknown Source:4) 2022-06-23 09:50:44.741 10579-10579/? W/System.err: at com.feparks.testrobust.patch.AppCompatActivityInLinePatch.onCreate(AppCompatActivityInLinePatch.java:106) 一直打印28-35行的log。。。。。。

我把认为可疑的代码贴出来: String jarPath = context.getExternalCacheDir().getPath() + File.separator + "patch_download" + File.separator + "patch"; String tempPath = context.getExternalCacheDir().getPath() + File.separator + "patch_download" + File.separator + "patch"; patch.setLocalPath(jarPath); //设置补丁完整真实路径 patch.setTempPath(tempPath);

    //这个包必须和patchpackname设置的要一致,patchpackname + '.pachesInfoImpl'
    patch.setPatchesInfoImplClassFullName("com.feparks.testrobust.patch" + ".PatchesInfoImpl");
    List<Patch> patches = new ArrayList<>();
    patches.add(patch);
    return patches;