cuplv / TraceRunner

Tool for generating dynamic traces of android applications.
3 stars 0 forks source link

Reflection class not found #44

Open ftc opened 7 years ago

ftc commented 7 years ago

in the app Hoppedia we can get into a situation where following the override chain results in a class not found exception. I am not sure why this doesn't work but for now I am ignoring it and moving on to the next app.

06-19 16:20:18.114 5096-5158/io.github.hopedia I/TRACERUNNER_EXCEPTION: logCallbackEntry, method being logged: signature: io.github.hopedia.MainActivity methodName: android.content.Context getBaseContext()
       java.lang.NoClassDefFoundError: android.view.DragAndDropPermissions
           at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
           at java.lang.Class.getDexCacheType(Class.java:476)
           at java.lang.reflect.Method.getReturnType(Method.java:183)
           at java.lang.Class.getDeclaredMethods(Class.java:672)
           at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getOverriddenMethods(FrameworkResolver.java:387)
           at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverride(FrameworkResolver.java:464)
           at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverrideMemo(FrameworkResolver.java:351)
           at edu.colorado.plv.tracerunner_runtime_instrumentation.TraceRunnerRuntimeInstrumentation.logCallbackEntry(TraceRunnerRuntimeInstrumentation.java:220)
           at io.github.hopedia.MainActivity.getBaseContext(MainActivity.java)
           at android.app.Activity.getSystemService(Activity.java:5252)
           at io.github.hopedia.BaseActivity.getSystemService(BaseActivity.java)
           at io.github.hopedia.MainActivity.getSystemService(MainActivity.java)
           at me.dm7.barcodescanner.core.DisplayUtils.getScreenOrientation(DisplayUtils.java)
           at me.dm7.barcodescanner.zxing.ZXingScannerView.onPreviewFrame(ZXingScannerView.java:103)
           at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1110)
           at android.os.Handler.dispatchMessage(Handler.java:102)
           at android.os.Looper.loop(Looper.java:148)
           at android.os.HandlerThread.run(HandlerThread.java:61)
           at me.dm7.barcodescanner.core.CameraHandlerThread.run(CameraHandlerThread.java)
        Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.DragAndDropPermissions" on path: DexPathList[[zip file "/data/app/io.github.hopedia-1/base.apk"],nativeLibraryDirectories=[/data/app/io.github.hopedia-1/lib/x86, /vendor/lib, /system/lib]]
           at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
           at libcore.reflect.InternalNames.getClass(InternalNames.java:53)
           at java.lang.Class.getDexCacheType(Class.java:476)
           at java.lang.reflect.Method.getReturnType(Method.java:183)
           at java.lang.Class.getDeclaredMethods(Class.java:672)
           at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getOverriddenMethods(FrameworkResolver.java:387)
           at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverride(FrameworkResolver.java:464)
           at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverrideMemo(FrameworkResolver.java:351)
           at edu.colorado.plv.tracerunner_runtime_instrumentation.TraceRunnerRuntimeInstrumentation.logCallbackEntry(TraceRunnerRuntimeInstrumentation.java:220)
           at io.github.hopedia.MainActivity.getBaseContext(MainActivity.java)
           at android.app.Activity.getSystemService(Activity.java:5252)
           at io.github.hopedia.BaseActivity.getSystemService(BaseActivity.java)
           at io.github.hopedia.MainActivity.getSystemService(MainActivity.java)
           at me.dm7.barcodescanner.core.DisplayUtils.getScreenOrientation(DisplayUtils.java)
           at me.dm7.barcodescanner.zxing.ZXingScannerView.onPreviewFrame(ZXingScannerView.java:103)
           at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1110)
           at android.os.Handler.dispatchMessage(Handler.java:102)
           at android.os.Looper.loop(Looper.java:148)
           at android.os.HandlerThread.run(HandlerThread.java:61)
           at me.dm7.barcodescanner.core.CameraHandlerThread.run(CameraHandlerThread.java)
        Suppressed: java.lang.ClassNotFoundException: android.view.DragAndDropPermissions
           at java.lang.Class.classForName(Native Method)
           at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
           at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                        ... 20 more
        Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
ftc commented 7 years ago

syncthing also has this problem:

06-20 11:18:39.814 12819-12819/com.nutomic.syncthingandroid I/TRACERUNNER_EXCEPTION: logCallbackEntry, method being logged: signature: com.nutomic.syncthingandroid.activities.MainActivity methodName: android.content.pm.ApplicationInfo getApplicationInfo()
                                                                                     java.lang.NoClassDefFoundError: android.view.DragAndDropPermissions
                                                                                         at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
                                                                                         at java.lang.Class.getDexCacheType(Class.java:476)
                                                                                         at java.lang.reflect.Method.getReturnType(Method.java:183)
                                                                                         at java.lang.Class.getDeclaredMethods(Class.java:672)
                                                                                         at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getOverriddenMethods(FrameworkResolver.java:387)
                                                                                         at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverride(FrameworkResolver.java:464)
                                                                                         at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverrideMemo(FrameworkResolver.java:351)
                                                                                         at edu.colorado.plv.tracerunner_runtime_instrumentation.TraceRunnerRuntimeInstrumentation.logCallbackEntry(TraceRunnerRuntimeInstrumentation.java:220)
                                                                                         at com.nutomic.syncthingandroid.activities.MainActivity.getApplicationInfo(MainActivity.java)
                                                                                         at android.content.ContextWrapper.getApplicationInfo(ContextWrapper.java:150)
                                                                                         at android.view.View.getLayoutDirection(View.java:7637)
                                                                                         at android.view.View.resolvePadding(View.java:14283)
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503)
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503)
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503)
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503)
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503)
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503)
                                                                                         at android.view.View.resolveRtlPropertiesIfNeeded(View.java:14086)
                                                                                         at android.view.ViewGroup.resolveRtlPropertiesIfNeeded(ViewGroup.java:6425)
                                                                                         at android.view.View.setLayoutDirection(View.java:7614)
                                                                                         at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1362)
                                                                                         at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
                                                                                         at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
                                                                                         at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
                                                                                         at android.view.Choreographer.doCallbacks(Choreographer.java:670)
                                                                                         at android.view.Choreographer.doFrame(Choreographer.java:606)
                                                                                         at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
                                                                                         at android.os.Handler.handleCallback(Handler.java:739)
                                                                                         at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                         at android.os.Looper.loop(Looper.java:148)
                                                                                         at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                                                                      Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.DragAndDropPermissions" on path: DexPathList[[zip file "/data/app/com.nutomic.syncthingandroid-1/base.apk"],nativeLibraryDirectories=[/data/app/com.nutomic.syncthingandroid-1/lib/x86, /data/app/com.nutomic.syncthingandroid-1/base.apk!/lib/x86, /vendor/lib, /system/lib]]
                                                                                         at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                                         at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                                                                         at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                                                                         at libcore.reflect.InternalNames.getClass(InternalNames.java:53)
                                                                                         at java.lang.Class.getDexCacheType(Class.java:476) 
                                                                                         at java.lang.reflect.Method.getReturnType(Method.java:183) 
                                                                                         at java.lang.Class.getDeclaredMethods(Class.java:672) 
                                                                                         at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getOverriddenMethods(FrameworkResolver.java:387) 
                                                                                         at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverride(FrameworkResolver.java:464) 
                                                                                         at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverrideMemo(FrameworkResolver.java:351) 
                                                                                         at edu.colorado.plv.tracerunner_runtime_instrumentation.TraceRunnerRuntimeInstrumentation.logCallbackEntry(TraceRunnerRuntimeInstrumentation.java:220) 
                                                                                         at com.nutomic.syncthingandroid.activities.MainActivity.getApplicationInfo(MainActivity.java) 
                                                                                         at android.content.ContextWrapper.getApplicationInfo(ContextWrapper.java:150) 
                                                                                         at android.view.View.getLayoutDirection(View.java:7637) 
                                                                                         at android.view.View.resolvePadding(View.java:14283) 
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503) 
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503) 
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503) 
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503) 
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503) 
                                                                                         at android.view.ViewGroup.resolvePadding(ViewGroup.java:6503) 
                                                                                         at android.view.View.resolveRtlPropertiesIfNeeded(View.java:14086) 
                                                                                         at android.view.ViewGroup.resolveRtlPropertiesIfNeeded(ViewGroup.java:6425) 
                                                                                         at android.view.View.setLayoutDirection(View.java:7614) 
                                                                                         at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1362) 
                                                                                         at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107) 
                                                                                         at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013) 
                                                                                         at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858) 
                                                                                         at android.view.Choreographer.doCallbacks(Choreographer.java:670) 
                                                                                         at android.view.Choreographer.doFrame(Choreographer.java:606) 
                                                                                         at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844) 
                                                                                         at android.os.Handler.handleCallback(Handler.java:739) 
                                                                                         at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                                                         at android.os.Looper.loop(Looper.java:148) 
                                                                                         at android.app.ActivityThread.main(ActivityThread.java:5417) 
                                                                                         at java.lang.reflect.Method.invoke(Native Method) 
                                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
                                                                                        Suppressed: java.lang.ClassNotFoundException: android.view.DragAndDropPermissions
                                                                                         at java.lang.Class.classForName(Native Method)
                                                                                         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                                                                         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                                                                                         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                                                                                                ... 36 more
ftc commented 7 years ago

org.tasks

06-20 13:12:46.236 29303-29303/org.tasks I/TRACERUNNER_EXCEPTION: logCallbackEntry, method being logged: signature: com.todoroo.astrid.activity.TaskListActivity methodName: void onPostResume()
                                                                  java.lang.NoClassDefFoundError: android.view.DragAndDropPermissions
                                                                      at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
                                                                      at java.lang.Class.getDexCacheType(Class.java:476)
                                                                      at java.lang.reflect.Method.getReturnType(Method.java:183)
                                                                      at java.lang.Class.getDeclaredMethods(Class.java:672)
                                                                      at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getOverriddenMethods(FrameworkResolver.java:387)
                                                                      at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverride(FrameworkResolver.java:464)
                                                                      at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverrideMemo(FrameworkResolver.java:351)
                                                                      at edu.colorado.plv.tracerunner_runtime_instrumentation.TraceRunnerRuntimeInstrumentation.logCallbackEntry(TraceRunnerRuntimeInstrumentation.java:220)
                                                                      at com.todoroo.astrid.activity.TaskListActivity.onPostResume(dalvik_source_org.tasks_455.apk)
                                                                      at android.app.Activity.performResume(Activity.java:6336)
                                                                      at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3092)
                                                                      at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)
                                                                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
                                                                      at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
                                                                      at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                      at android.os.Looper.loop(Looper.java:148)
                                                                      at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                      at java.lang.reflect.Method.invoke(Native Method)
                                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                                                   Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.DragAndDropPermissions" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/org.tasks-1/base.apk"],nativeLibraryDirectories=[/data/app/org.tasks-1/lib/x86_64, /vendor/lib64, /system/lib64]]
                                                                      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                      at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                                                      at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                                                      at libcore.reflect.InternalNames.getClass(InternalNames.java:53)
                                                                      at java.lang.Class.getDexCacheType(Class.java:476) 
                                                                      at java.lang.reflect.Method.getReturnType(Method.java:183) 
                                                                      at java.lang.Class.getDeclaredMethods(Class.java:672) 
                                                                      at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getOverriddenMethods(FrameworkResolver.java:387) 
                                                                      at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverride(FrameworkResolver.java:464) 
                                                                      at edu.colorado.plv.tracerunner_runtime_instrumentation.FrameworkResolver.getFrameworkOverrideMemo(FrameworkResolver.java:351) 
                                                                      at edu.colorado.plv.tracerunner_runtime_instrumentation.TraceRunnerRuntimeInstrumentation.logCallbackEntry(TraceRunnerRuntimeInstrumentation.java:220) 
                                                                      at com.todoroo.astrid.activity.TaskListActivity.onPostResume(dalvik_source_org.tasks_455.apk) 
                                                                      at android.app.Activity.performResume(Activity.java:6336) 
                                                                      at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3092) 
                                                                      at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134) 
                                                                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481) 
                                                                      at android.app.ActivityThread.-wrap11(ActivityThread.java) 
                                                                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
                                                                      at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                      at android.os.Looper.loop(Looper.java:148) 
                                                                      at android.app.ActivityThread.main(ActivityThread.java:5417) 
                                                                      at java.lang.reflect.Method.invoke(Native Method) 
                                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
                                                                    Suppressed: java.lang.ClassNotFoundException: android.view.DragAndDropPermissions
                                                                      at java.lang.Class.classForName(Native Method)
                                                                      at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                                                      at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                                                                      at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                                                                            ... 22 more
ftc commented 7 years ago

branch for fix: reflection_bug_fix