Gramophone icon indicating copy to clipboard operation
Gramophone copied to clipboard

[BUG] Gramophone crashes when Lyric widget is resized

Open MeguMario opened this issue 9 months ago • 1 comments

Describe the bug Gramophone crashes when the new lyric widget is resized

To Reproduce Steps to reproduce the behavior:

  1. Put the widget on the homescreen
  2. Resize it
  3. Open the app
  4. 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.

MeguMario avatar Mar 11 '25 06:03 MeguMario

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

nift4 avatar Mar 12 '25 17:03 nift4

i think that should actually be fixed now

nift4 avatar Jul 22 '25 18:07 nift4