Random crash in background

Open
#118 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
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, java
Domain
mobile-dev

Research direction

Start with MainActivity and the Android activity-destroy lifecycle, since the crash occurs while closing the app and the stack trace points to fragment cleanup during onDestroy. Reproduce the latest-update behavior and inspect the activity and fragment teardown paths for a null value. The issue does not name specific source files or tests, so identify the relevant implementation and verify that closing the app no longer raises the logged NullPointerException.

Written by the indexing model from the issue text.

Description

The app randomly crashed in background when i closed it in latest update. This is nothing major and only happened once but still i thought i would inform. Overall the app works fine.

crash log

FATAL EXCEPTION: main
Process: com.smartpack.packagemanager, PID: 8471
java.lang.RuntimeException: Unable to destroy activity {com.smartpack.packagemanager/com.smartpack.packagemanager.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5557)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5602)
at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:47)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8280)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073)
Caused by: java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:207)
at r3.p.x(SourceFile:37)
at androidx.fragment.app.p0.g(SourceFile:203)
at androidx.fragment.app.p0.k(SourceFile:274)
at androidx.fragment.app.e1.b(SourceFile:64)
at androidx.fragment.app.e1.a(SourceFile:17)
at androidx.fragment.app.f1.e(SourceFile:225)
at androidx.fragment.app.k0.t(SourceFile:57)
at androidx.fragment.app.k0.l(SourceFile:32)
at androidx.fragment.app.v.onDestroy(SourceFile:12)
at d.m.onDestroy(SourceFile:1)
at android.app.Activity.performDestroy(Activity.java:8469)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1364)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5544)
... 13 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.