Skip to content

[BUG] LRCLIB's instrumental tag crashes Gramophone #575

Open
@DancingEmptier667

Description

@DancingEmptier667

Describe the bug
The presence of a tag in the song lyrics causes the application to crash. The crash occurs only with “Enable new lyric UI” enabled. If only “New lyric parser” enabled, but not “Enable new lyric UI”, a blank screen instead of the crash instead will be seen. Without enabling the new parser there are no display problems.

To Reproduce
Steps to reproduce the behavior:

  1. Enable both “New lyric parses” and “Enable new lyric UI”
  2. Play any instrumental song with [au: instrumental] in the lyrics
  3. Click on the lyrics button
  4. See the app crash

Expected behavior
Gramophone should display the lyrics without crashing.

Screenshots

Smartphone (please complete the following information):

  • Device: Google Pixel 6
  • OS: GrapheneOS 15
  • App Version: 1.0.17

Additional context

Expand to view the crash log
  Gramophone version: 1.0.17.ea0e38c (org.akanework.gramophone)

Release type: Release
Brand:        google
Model:        Pixel 6
SDK Level:    35
Thread:       main


Time:  SPOOFED
--------- beginning of crash
java.util.NoSuchElementException
	at org.akanework.gramophone.ui.components.NewLyricsView.buildSpForMeasure(SourceFile:1630)
	at org.akanework.gramophone.ui.components.NewLyricsView.onMeasure(SourceFile:32)
	at android.view.View.measure(View.java:28375)
	at androidx.core.widget.NestedScrollView.measureChildWithMargins(SourceFile:39)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at androidx.core.widget.NestedScrollView.onMeasure(SourceFile:1)
	at android.view.View.measure(View.java:28375)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7026)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at android.view.View.measure(View.java:28375)
	at androidx.constraintlayout.widget.ConstraintLayout$Measurer.measure(SourceFile:513)
	at androidx.core.view.MenuHostHelper.measure(SourceFile:90)
	at androidx.constraintlayout.widget.ConstraintLayout.resolveSystem(SourceFile:1230)
	at androidx.constraintlayout.widget.ConstraintLayout.onMeasure(SourceFile:1456)
	at android.view.View.measure(View.java:28375)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7026)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at android.view.View.measure(View.java:28375)
	at com.google.android.material.bottomsheet.BottomSheetBehavior.onMeasureChild(SourceFile:54)
	at androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasure(SourceFile:383)
	at android.view.View.measure(View.java:28375)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7026)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at androidx.appcompat.widget.ContentFrameLayout.onMeasure(SourceFile:160)
	at android.view.View.measure(View.java:28375)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7026)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:878)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
	at android.view.View.measure(View.java:28375)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7026)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at android.view.View.measure(View.java:28375)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7026)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:878)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
	at android.view.View.measure(View.java:28375)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7026)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at com.android.internal.policy.DecorView.onMeasure(DecorView.java:735)
	at android.view.View.measure(View.java:28375)
	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:4923)
	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:3324)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3629)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3009)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10514)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1566)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1575)
	at android.view.Choreographer.doCallbacks(Choreographer.java:1175)
	at android.view.Choreographer.doFrame(Choreographer.java:1104)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1549)
	at android.os.Handler.handleCallback(Handler.java:991)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8973)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:927)
  • 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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions