Skip to content

Fix NullPointerException crash when lyrics end#400

Merged
theovilardo merged 9 commits intotheovilardo:masterfrom
lostf1sh:master
Nov 27, 2025
Merged

Fix NullPointerException crash when lyrics end#400
theovilardo merged 9 commits intotheovilardo:masterfrom
lostf1sh:master

Conversation

@lostf1sh
Copy link
Copy Markdown
Collaborator

Problem

App was crashing with NullPointerException when lyrics finished playing. The crash occurred in LyricsSheet.kt at line 418 where lyrics!!.areFromRemote was being accessed.

Cause

The footer lambda passed to SyncedLyricsList was being called by LazyColumn after the lyrics state had already become null (when song ends or changes).

Solution

Replaced unsafe lyrics!!.areFromRemote with safe null check lyrics?.areFromRemote == true.
Reverted my codex pr since its making it way worse.

…ove-animations

Improve album art caching and player animations
Replace 'lyrics!!' null assertion with 'lyrics?.areFromRemote == true'
to prevent crashes. Apply minor formatting and whitespace cleanup in
LyricsSheet.
…and-improve-animations"

This reverts commit 43b5a40, reversing
changes made to 88baf7d.
- Replace lyrics!!.areFromRemote with lyrics?.areFromRemote == true
- Footer lambda was being called by LazyColumn after lyrics became null
- Safely handle null lyrics state when song ends or changes
@theovilardo theovilardo merged commit 70083db into theovilardo:master Nov 27, 2025
@lostf1sh lostf1sh mentioned this pull request Dec 4, 2025
This was referenced Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants