java.lang.NullPointerException: after deploying Picture in Picture sample on devices
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- mobile-dev
Research direction
Start in MainActivity.java at adjustFullScreen (line 313) and trace its call from onWindowFocusChanged (line 241). Reproduce the Picture in Picture sample on an API 30 Pixel 3 XL after updating Gradle and AGP, then verify deployment no longer produces the reported NullPointerException in Logcat.
Written by the indexing model from the issue text.
Description
Steps
- Open Picture in Picture sample In Electric Eel Patch 2 build or Flamingo RC builds
- Update gradle and AGP versions
- Try to deploy on the device (I used API 30 Pixel 3 XL)
Actual :
I see below exception in Logcat after deployment
023-03-23 12:13:40.932 28748-28748 AndroidRuntime com...mple.android.pictureinpicture E FATAL EXCEPTION: main
Process: com.example.android.pictureinpicture, PID: 28748
java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.core.view.WindowInsetsControllerCompat.show(int)' on a null object reference
at com.example.android.pictureinpicture.MainActivity.adjustFullScreen(MainActivity.java:313)
at com.example.android.pictureinpicture.MainActivity.onWindowFocusChanged(MainActivity.java:241)
at androidx.appcompat.view.WindowCallbackWrapper.onWindowFocusChanged(WindowCallbackWrapper.java:124)
at com.android.internal.policy.DecorView.onWindowFocusChanged(DecorView.java:1692)
at android.view.View.dispatchWindowFocusChanged(View.java:13703)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1480)
at android.view.ViewRootImpl.handleWindowFocusChanged(ViewRootImpl.java:2870)
at android.view.ViewRootImpl.access$1100(ViewRootImpl.java:142)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:4533)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
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:930)
2023-03-23 12:13:40.949 28748-28748 Process com...mple.android.pictureinpicture I Sending signal. PID: 28748 SIG: 9
2023-03-23 12:13:40.961 1388-1703 InputDispatcher system_process E channel '264e43a com.example.android.pictureinpicture/com.example.android.pictureinpicture.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
- Dominant language
- Kotlin
- Stars
- 1.4k
- Forks
- 777
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from android/media-samples
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
android/media-samples#117 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
android/media-samples#116 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
android/media-samples#112 ·
-
بانلبرلبتOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
android/media-samples#111 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
android/media-samples#97 · 3 comments · 2 reactions ·
All issues in android/media-samples
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MetrolistGroup/Metrolist#5426 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
🐛 Type:Bug 📥 State:Awaiting Assignment 🚨 Priority: P0 - Critical
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
micronizationlab/glafira-ai-hub#785 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sorsama/deepseek-harness-mobile#154 ·
Maintainers usually reply within 1 day
-
0. Needs triage enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day