tingsu / DroidDefects

A database of crash (exception) bugs for Android apps
20 stars 2 forks source link

Broken APK for ScreenRecorder #2

Open auermich93 opened 1 year ago

auermich93 commented 1 year ago

The com.orpheusdroid.screenrecorder APK (https://github.com/tingsu/DroidDefects/tree/master/reproducible-cases/screenrecorder-com.orpheusdroid.screenrecorder-1.8.4) is broken, i.e., both apktool and aapt complain about a corrupted ZIP file. You can retrieve the APK in version 1.8.4 from https://archive.org/details/com.orpheusdroid.screenrecorder_21. Moreover, the crashing sequence can be simplified a lot:

  1. Launch the app
  2. Click on the Video tab
  3. Open the menu
  4. Click on About
  5. Return (click on left arrow)
  6. Close the app, e.g. click on the BACK button

The original sequence outlined in https://github.com/tingsu/DroidDefects/blob/master/reproducible-cases/screenrecorder-com.orpheusdroid.screenrecorder-1.8.4/README.md assumed that a recorded video was already present, which is not the case when launching the app. Above sequence will produce the same stack trace:

2023-11-14 12:07:33.907 5837-5837/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.orpheusdroid.screenrecorder, PID: 5837
    java.lang.RuntimeException: Unable to stop activity {com.orpheusdroid.screenrecorder/com.orpheusdroid.screenrecorder.MainActivity}: java.lang.IllegalStateException: must call onStart before onStop
        at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4165)
        at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4221)
        at android.app.ActivityThread.-wrap6(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1538)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
     Caused by: java.lang.IllegalStateException: must call onStart before onStop
        at ly.count.android.sdk.Countly.onStop(Countly.java:469)
        at com.orpheusdroid.screenrecorder.MainActivity.onStop(MainActivity.java:420)
        at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1289)
        at android.app.Activity.performStop(Activity.java:6854)
        at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4160)
        at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4221) 
        at android.app.ActivityThread.-wrap6(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1538) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:154) 
        at android.app.ActivityThread.main(ActivityThread.java:6119) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)