[BUG] Gramophone crashes when Lyric widget is resized
Describe the bug Gramophone crashes when the new lyric widget is resized
To Reproduce Steps to reproduce the behavior:
- Put the widget on the homescreen
- Resize it
- Open the app
- It will instantly crash
Expected behavior The widget should be able to resize as normal without crashing the app instantly
Screenshots
https://github.com/user-attachments/assets/1ab528f8-9bb9-4423-9f33-f7f9b2908dae
Smartphone (please complete the following information):
- Device: Google Pixel 7 Pro
- OS: Android 16 Beta 2.1
- App Version: 1.0.16.1
Additional context Here is the crash log
Gramophone version: 1.0.16.1.3fa245f
Release type: Release
Brand: google
Model: Pixel 7 Pro
SDK Level: 35
Thread: DefaultDispatcher-worker-5
Time: 2025-03-11 13:59:05
--------- beginning of crash
java.lang.NullPointerException: Attempt to read from field 'android.widget.RemoteViews$BitmapCache android.widget.RemoteViews.mBitmapCache' on a null object reference in method 'void android.widget.RemoteViews.initializeFrom(android.widget.RemoteViews, android.widget.RemoteViews)'
at android.widget.RemoteViews.initializeFrom(RemoteViews.java:6089)
at android.widget.RemoteViews.<init>(RemoteViews.java:6070)
at android.appwidget.AppWidgetManager.tryAdapterConversion(AppWidgetManager.java:660)
at android.appwidget.AppWidgetManager.updateAppWidget(AppWidgetManager.java:709)
at android.appwidget.AppWidgetManager.updateAppWidget(AppWidgetManager.java:783)
at org.akanework.gramophone.ui.LyricWidgetProvider.onUpdate(SourceFile:89)
at okio.internal.-SegmentedByteString.update(SourceFile:21)
at org.akanework.gramophone.logic.GramophonePlaybackService.scheduleSendingLyrics(SourceFile:28)
at org.akanework.gramophone.logic.GramophonePlaybackService$onTracksChanged$1$1.invokeSuspend(SourceFile:34)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:9)
at kotlinx.coroutines.DispatchedTask.run(SourceFile:115)
at android.os.Handler.handleCallback(Handler.java:995)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:239)
at android.os.Looper.loop(Looper.java:328)
at android.app.ActivityThread.main(ActivityThread.java:8952)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [DeferredCoroutine{Cancelling}@da64e97, Dispatchers.IO.limitedParallelism(1)]
And the app log GramophoneLog1741676442179.txt
- [x] I will open one issue per bug, follow the issue format and will add
[BUG]to the start of my issue title, and I acknowledge that if I don't follow the format, my issue might get closed without further explanation.
Hi, I believe this is an bug in Android 16 related to a deprecated list widget API I did not yet migrate away from. I've filed a bug at Google Issue Tracker for now: https://issuetracker.google.com/issues/402677797
i think that should actually be fixed now