vmiklos / plees-tracker

Plees Tracker is a simple sleep tracker for your Android phone.
https://vmiklos.hu/plees-tracker/
MIT License
158 stars 38 forks source link

Found Fatal Exception Crashes from Testing #477

Open Mai-hh opened 2 months ago

Mai-hh commented 2 months ago

Hi! I'm a student researcher currently working on a project in the area of Android app analysis. As a part of the work centered around Intents, I found a bug that resulted in crashes after analyzing logs/execution traces. Below are the relevant activities, traces, and adb commands that triggered the crashes.

These bugs may be hidden in unexposed Activities, but they are worth investigating into to prevent potential issues down the line and addressing to improve the overall robustness and quality. If anyone can be confirm these to be valid bugs first, I would appreciate it, and I can help provide more information as needed.

com.mikepenz.aboutlibraries.ui.LibsActivity

Execution trace:

01-22 10:48:18.157 21555 21555 E AndroidRuntime: FATAL EXCEPTION: main
01-22 10:48:18.157 21555 21555 E AndroidRuntime: Process: hu.vmiklos.plees_tracker, PID: 21555
01-22 10:48:18.157 21555 21555 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3685)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3842)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2252)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:106)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:201)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:288)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7842)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
01-22 10:48:18.157 21555 21555 E AndroidRuntime: Caused by: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at androidx.appcompat.app.AppCompatDelegateImpl.setSupportActionBar(AppCompatDelegateImpl.java:581)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at androidx.appcompat.app.AppCompatActivity.setSupportActionBar(AppCompatActivity.java:183)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at com.mikepenz.aboutlibraries.ui.LibsActivity.onCreate(LibsActivity.kt:68)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:8054)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:8034)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1341)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3666)
01-22 10:48:18.157 21555 21555 E AndroidRuntime:    ... 12 more

adb command that triggers it:

#!/bin/bash

adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" 
echo adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" 
sleep 3.0
adb shell am force-stop hu.vmiklos.plees_tracker
sleep 2.0
#!/bin/bash

adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --ei ABOUT_LIBRARIES_THEME 2 
echo adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --ei ABOUT_LIBRARIES_THEME 2 
sleep 3.0
adb shell am force-stop hu.vmiklos.plees_tracker
sleep 2.0
#!/bin/bash

adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --ei ABOUT_LIBRARIES_THEME (- 1) 
echo adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --ei ABOUT_LIBRARIES_THEME (- 1) 
sleep 3.0
adb shell am force-stop hu.vmiklos.plees_tracker
sleep 2.0
#!/bin/bash

adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --es ABOUT_LIBRARIES_STYLE A --ei ABOUT_LIBRARIES_THEME (- 1) 
echo adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --es ABOUT_LIBRARIES_STYLE A --ei ABOUT_LIBRARIES_THEME (- 1) 
sleep 3.0
adb shell am force-stop hu.vmiklos.plees_tracker
sleep 2.0
#!/bin/bash

adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --es ABOUT_LIBRARIES_STYLE A --ei ABOUT_LIBRARIES_THEME 2 
echo adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --es ABOUT_LIBRARIES_STYLE A --ei ABOUT_LIBRARIES_THEME 2 
sleep 3.0
adb shell am force-stop hu.vmiklos.plees_tracker
sleep 2.0
#!/bin/bash

adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" 
echo adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" 
sleep 3.0
adb shell am force-stop hu.vmiklos.plees_tracker
sleep 2.0
#!/bin/bash

adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --es ABOUT_LIBRARIES_STYLE A --ei ABOUT_LIBRARIES_THEME (- 1) --es ABOUT_LIBRARIES_TITLE B 
echo adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --es ABOUT_LIBRARIES_STYLE A --ei ABOUT_LIBRARIES_THEME (- 1) --es ABOUT_LIBRARIES_TITLE B 
sleep 3.0
adb shell am force-stop hu.vmiklos.plees_tracker
sleep 2.0
#!/bin/bash

adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --es ABOUT_LIBRARIES_STYLE A --ei ABOUT_LIBRARIES_THEME 2 --es ABOUT_LIBRARIES_TITLE B 
echo adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --es ABOUT_LIBRARIES_STYLE A --ei ABOUT_LIBRARIES_THEME 2 --es ABOUT_LIBRARIES_TITLE B 
sleep 3.0
adb shell am force-stop hu.vmiklos.plees_tracker
sleep 2.0
#!/bin/bash

adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --ei ABOUT_LIBRARIES_THEME (- 1) --es ABOUT_LIBRARIES_TITLE B 
echo adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --ei ABOUT_LIBRARIES_THEME (- 1) --es ABOUT_LIBRARIES_TITLE B 
sleep 3.0
adb shell am force-stop hu.vmiklos.plees_tracker
sleep 2.0
#!/bin/bash

adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --ei ABOUT_LIBRARIES_THEME 2 --es ABOUT_LIBRARIES_TITLE B 
echo adb shell su 0 am start -n "hu.vmiklos.plees_tracker/com.mikepenz.aboutlibraries.ui.LibsActivity" --ei ABOUT_LIBRARIES_THEME 2 --es ABOUT_LIBRARIES_TITLE B 
sleep 3.0
adb shell am force-stop hu.vmiklos.plees_tracker
sleep 2.0
vmiklos commented 2 months ago

Nice find, care to submit a fix? Thanks.

Mai-hh commented 1 month ago

Nice find, care to submit a fix? Thanks.

For sure, I will do that