PictureInPicture - Java - Sample Application Crashes
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Domain
- mobile-dev
Research direction
Start in MainActivity.java at adjustFullScreen on line 313, reached from onWindowFocusChanged on line 241. Reproduce the crash by checking out the PictureInPicture sample and running it in an Android 11 or Android 9 emulator. Done means the sample starts and changes window focus without the reported NullPointerException.
Written by the indexing model from the issue text.
Description
The sample application crashes when checkout the repository and run the project PictureInPicture in emulator with following crash log:
2021-06-07 16:44:27.046 9271-9271/com.example.android.pictureinpicture E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.pictureinpicture, PID: 9271
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:1701)
at android.view.View.dispatchWindowFocusChanged(View.java:14448)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1491)
at android.view.ViewRootImpl.handleWindowFocusChanged(ViewRootImpl.java:3216)
at android.view.ViewRootImpl.access$1100(ViewRootImpl.java:188)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:4999)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7464)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:955)
2021-06-07 16:44:27.233 9271-9291/com.example.android.pictureinpicture W/MediaPlayerNative: info/warning (3, 0)
Tried on Emulator with Android 11.0 and Android 9.0
Android Studio 4.1.3
Build #AI-201.8743.12.41.7199119, built on March 11, 2021
Runtime version: 1.8.0_242-release-1644-b3-6915495 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.16
GC: ParNew, ConcurrentMarkSweep
Memory: 4012M
Cores: 12
Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true
Non-Bundled Plugins: com.intellij.marketplace, org.jetbrains.kotlin
Kindly ignore if it's a mistake or duplicate issue!
Let me know if you need any more information.
Thanks.
- 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