Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix the crash caused by the empty mListPack of NewRecordActivity #201

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

linkaipeng
Copy link

If the mListPack is empty, it will cause the NewRecordActivity loop to crash.

crash log:

2022-08-05 19:22:26.788 28566-28566/com.alipay.hulu E/HuluCrashHandler: Unable to start activity ComponentInfo{com.alipay.hulu/com.alipay.hulu.activity.NewRecordActivity}: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 : java.lang.RuntimeException: Unable to start activity ComponentInfo{com.alipay.hulu/com.alipay.hulu.activity.NewRecordActivity}: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3309)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3450)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2047)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7428)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
     Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.get(ArrayList.java:437)
        at com.alipay.hulu.activity.NewRecordActivity.initAppList(NewRecordActivity.java:335)
        at com.alipay.hulu.activity.NewRecordActivity.onCreate(NewRecordActivity.java:128)
        at android.app.Activity.performCreate(Activity.java:7811)
        at android.app.Activity.performCreate(Activity.java:7800)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3284)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3450) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2047) 
        at android.os.Handler.dispatchMessage(Handler.java:107) 
        at android.os.Looper.loop(Looper.java:214) 
        at android.app.ActivityThread.main(ActivityThread.java:7428) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980) 

fix the crash caused by the empty mListPack of NewRecordActivity
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants