Skip to content

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

Open
linkaipeng wants to merge 1 commit intoalipay:masterfrom
linkaipeng:master
Open

fix the crash caused by the empty mListPack of NewRecordActivity#201
linkaipeng wants to merge 1 commit intoalipay:masterfrom
linkaipeng:master

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants