Tencent / GT

GT (Great Tit) is a portable debugging tool for bug hunting and performance tuning on smartphones anytime and anywhere just as listening music with Walkman. GT can act as the Integrated Debug Environment by directly running on smartphones.
http://gt.qq.com
4.39k stars 1.03k forks source link

运行GTDemo时出现android.util.SuperNotCalledException: Activity {com.gtr.sdkdemo/com.gtr.test.MainActivity} did not call through to super.onCreate() #52

Open yangzaiCN opened 6 years ago

yangzaiCN commented 6 years ago

在其他手机上也出现该问题 手机:魅族MX5
完整日志: 09/04 19:19:28: Launching app $ adb install-multiple -r -t /Users/momo/tmp/GTDemo/app/build/intermediates/split-apk/debug/dep/dependencies.apk /Users/momo/tmp/GTDemo/app/build/intermediates/split-apk/debug/slices/slice_9.apk /Users/momo/tmp/GTDemo/app/build/intermediates/split-apk/debug/slices/slice_8.apk /Users/momo/tmp/GTDemo/app/build/intermediates/split-apk/debug/slices/slice_5.apk /Users/momo/tmp/GTDemo/app/build/intermediates/split-apk/debug/slices/slice_3.apk /Users/momo/tmp/GTDemo/app/build/intermediates/split-apk/debug/slices/slice_6.apk /Users/momo/tmp/GTDemo/app/build/intermediates/split-apk/debug/slices/slice_0.apk /Users/momo/tmp/GTDemo/app/build/intermediates/split-apk/debug/slices/slice_7.apk /Users/momo/tmp/GTDemo/app/build/intermediates/split-apk/debug/slices/slice_4.apk /Users/momo/tmp/GTDemo/app/build/intermediates/split-apk/debug/slices/slice_2.apk /Users/momo/tmp/GTDemo/app/build/intermediates/split-apk/debug/slices/slice_1.apk /Users/momo/tmp/GTDemo/app/build/outputs/apk/debug/app-debug.apk Split APKs installed $ adb shell am start -n "com.gtr.sdkdemo/com.gtr.test.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Connected to process 5642 on device meizu-mx5-850BBM722TSG Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. W/linker: /system/lib64/libfilterUtils.so: unused DT entry: type 0x6ffffffe arg 0x808 W/linker: /system/lib64/libfilterUtils.so: unused DT entry: type 0x6fffffff arg 0x2 I/InstantRun: starting instant run server: is main process I/System.out: GTRLogcatCacheFinish:1536059979334 W/linker: /data/app/com.gtr.sdkdemo-1/lib/arm64/libyhook.so: unused DT entry: type 0x6ffffffe arg 0x6a0 W/linker: /data/app/com.gtr.sdkdemo-1/lib/arm64/libyhook.so: unused DT entry: type 0x6fffffff arg 0x1 I/YAHFA-Native: init to SDK 22 I/YAHFA-Native: Start findAndBackupAndHook for method callActivityOnCreate(Landroid/app/Activity;Landroid/os/Bundle;)V W/YAHFA-Native: not enough capacity. Allocating... I/YAHFA-Native: Allocating done hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method callActivityOnPause(Landroid/app/Activity;)V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method callActivityOnResume(Landroid/app/Activity;)V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method callActivityOnStart(Landroid/app/Activity;)V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method callActivityOnStop(Landroid/app/Activity;)V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method execStartActivity(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;)Landroid/app/Instrumentation$ActivityResult; hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method beginTransaction()V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method enableWriteAheadLogging()Z hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method endTransaction()V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method execute()V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method executeInsert()J hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method executeUpdateDelete()I hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method openDatabase(Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;ILandroid/database/DatabaseErrorHandler;)Landroid/database/sqlite/SQLiteDatabase; I/YAHFA-Native: hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method rawQueryWithFactory(Landroid/database/sqlite/SQLiteDatabase$CursorFactory;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Landroid/os/CancellationSignal;)Landroid/database/Cursor; I/YAHFA-Native: hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method onAttach(Landroid/content/Context;)V E/YAHFA-Native: Cannot find target method onAttach(Landroid/content/Context;)V I/YAHFA-Native: Start findAndBackupAndHook for method onHiddenChanged(Z)V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performActivityCreated(Landroid/os/Bundle;)V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performCreate(Landroid/os/Bundle;)V I/YAHFA-Native: hook and backup done Start findAndBackupAndHook for method performCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View; hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performDestroy()V I/YAHFA-Native: hook and backup done Start findAndBackupAndHook for method performDestroyView()V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performDetach()V E/YAHFA-Native: Cannot find target method performDetach()V I/YAHFA-Native: Start findAndBackupAndHook for method performPause()V hook and backup done Start findAndBackupAndHook for method performResume()V I/YAHFA-Native: hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performStart()V I/YAHFA-Native: hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performStop()V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method setUserVisibleHint(Z)V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method onAttach(Landroid/content/Context;)V I/YAHFA-Native: hook and backup done Start findAndBackupAndHook for method onHiddenChanged(Z)V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performActivityCreated(Landroid/os/Bundle;)V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performCreate(Landroid/os/Bundle;)V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View; hook and backup done Start findAndBackupAndHook for method performDestroy()V I/YAHFA-Native: hook and backup done Start findAndBackupAndHook for method performDestroyView()V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performDetach()V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performPause()V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performResume()V hook and backup done Start findAndBackupAndHook for method performStart()V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method performStop()V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method setUserVisibleHint(Z)V hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method dispatchTouchEvent(Landroid/view/MotionEvent;)Z hook and backup done Start findAndBackupAndHook for method onKeyDown(ILandroid/view/KeyEvent;)Z I/YAHFA-Native: hook and backup done Start findAndBackupAndHook for method onKeyUp(ILandroid/view/KeyEvent;)Z hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method inflate(ILandroid/view/ViewGroup;)Landroid/view/View; hook and backup done I/YAHFA-Native: Start findAndBackupAndHook for method dispatchDraw(Landroid/graphics/Canvas;)V hook and backup done E/AndroidRuntime: FATAL EXCEPTION: main Process: com.gtr.sdkdemo, PID: 5642 android.util.SuperNotCalledException: Activity {com.gtr.sdkdemo/com.gtr.test.MainActivity} did not call through to super.onCreate() at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2620) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2733) at android.app.ActivityThread.access$900(ActivityThread.java:187) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5877) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1019) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:814) I/Process: Sending signal. PID: 5642 SIG: 9 Application terminated.

DruidZhang commented 6 years ago

我在联想k50上出现了同样的问题,另外用诺基亚7就没问题,感觉和GTRBroadcastReceiver这个类里边用的ActivityLifecycleCallbacks有关系,onActivityCreated执行时间在不同手机上不同?

yangzaiCN commented 5 years ago

@DruidZhang 我现在就是用诺基亚手机运行没有问题,感觉像是hook方案兼容的问题

stepforfuture commented 5 years ago

我和你同样的问题,去掉instant run就OK,在instant run下apk被切片成几个小的app最后聚合在一起安装,问题就出现在这里。去掉instant run就对了

luobs commented 4 years ago

我和你同样的问题,去掉instant run就OK,在instant run下apk被切片成几个小的app最后聚合在一起安装,问题就出现在这里。去掉instant run就对了

Good,you are right!