some NPE..

Open
#156 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, java
Domain
mobile-dev

Research direction

Start by reproducing the second-tab crash and the unauthorized-Shizuku app-item crash on Android 10, using the stack traces to locate the failing paths. Investigate the bottom-navigation callback and PackageDetailsActivity.onCreate, where the array errors are reported. Done means both flows complete without a null or out-of-bounds array access.

Written by the indexing model from the issue text.

Description

Hi developer, thanks for making such a handy app. I've noticed a few bugs and hope you can fix them in the next update.

My device: Huawei Honor 20i
OS version: Android 10
when click second tab on bottom nav, a NPE occur:
java.lang.NullPointerException: Attempt to get length of null array at T.e.w(SourceFile:17) at a1.q.a(SourceFile:197) at l1.a.run(SourceFile:27) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:929)
when use adb with Shizuku, click app item, a NPE occur (without authorize this app in Shizuku, this bug will not occur):
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.smartpack.packagemanager/com.smartpack.packagemanager.activities.PackageDetailsActivity}: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4065) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4252) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2618) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:219) at android.app.ActivityThread.main(ActivityThread.java:8673) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109) Caused by: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 at T.e.E(SourceFile:96) at com.smartpack.packagemanager.activities.PackageDetailsActivity.onCreate(SourceFile:320) at android.app.Activity.performCreate(Activity.java:8214) at android.app.Activity.performCreate(Activity.java:8202) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4038) ... 11 more

Dominant language
Java
Stars
877
Forks
121
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SmartPack/PackageManager

All issues in SmartPack/PackageManager

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.