Skip to content

fix(folder): prevent folder open crash from non-finite spring values#555

Open
johanneswilm wants to merge 2 commits into
NeoApplications:mainfrom
johanneswilm:fix-folder-crash
Open

fix(folder): prevent folder open crash from non-finite spring values#555
johanneswilm wants to merge 2 commits into
NeoApplications:mainfrom
johanneswilm:fix-folder-crash

Conversation

@johanneswilm

Copy link
Copy Markdown

Folder open animations occasionally crashed with "Cannot set 'scaleX' to Float.NaN" because some children of the folder AnimatorSet produced NaN animated fractions before the animator had a valid play time, and dynamic inputs (distances, scales) were not validated.

Changes:

  • Validate all SpringAnimationBuilder inputs (start/end, stiffness, damping, min visible change, velocity) and throw a clear error if any are non-finite or out of range.
  • Skip update frames whose animated fraction is NaN, which can happen for zero-duration springs inside an AnimatorSet when setCurrentPlayTime is called immediately after creation.
  • Add NaN/Inf guards and logging in FolderAnimationData, FolderAnimationManager, IconAnimationData, ClipRevealData, and FolderSpringAnimatorSet for the dynamic values used by folder springs.
  • Wrap Folder.animateOpen animation setup/startup in try/catch so that a bad animator falls back to opening the folder without animation instead of crashing the launcher.

Fixes folder open crash/black screen.

Folder open animations occasionally crashed with
"Cannot set 'scaleX' to Float.NaN" because some children of the folder
AnimatorSet produced NaN animated fractions before the animator had a
valid play time, and dynamic inputs (distances, scales) were not
validated.

Changes:
- Validate all SpringAnimationBuilder inputs (start/end, stiffness,
  damping, min visible change, velocity) and throw a clear error if any
  are non-finite or out of range.
- Skip update frames whose animated fraction is NaN, which can happen
  for zero-duration springs inside an AnimatorSet when
  setCurrentPlayTime is called immediately after creation.
- Add NaN/Inf guards and logging in FolderAnimationData,
  FolderAnimationManager, IconAnimationData, ClipRevealData, and
  FolderSpringAnimatorSet for the dynamic values used by folder springs.
- Wrap Folder.animateOpen animation setup/startup in try/catch so that
  a bad animator falls back to opening the folder without animation
  instead of crashing the launcher.

Fixes folder open crash/black screen.
@machiav3lli

Copy link
Copy Markdown
Member

To what extent are all of your PRs vibe-coded?

@johanneswilm

johanneswilm commented Jul 11, 2026

Copy link
Copy Markdown
Author

@machiav3lli To 100%, with multiple iterations. I am a JavaScript/Python developer and haven't looked at Java for years. But I own an Android phone and I don't like crashes so I just needed this quickly fixed. It's probably a good idea to look through the contents of the PR and fix it yourself properly in some other way. But for now this is working for users who just want a working neo-feed neo-launcher combination:

• Neo Feed (with foXaCe improvements, translations, Mastodon source + fixes):
https://github.com/johanneswilm/Neo-Feed/releases/download/test-build-2026-07-11/Neo_Feed_1.9.0_debug.apk
• Neo Launcher (with keyboard-focus and folder-crash fixes):
https://github.com/johanneswilm/Neo-Feed/releases/download/test-build-2026-07-11/Neo_Launcher_1.0.1_debug.apk

… when drawer opens

ComposeSearchLayout returned null from getEditText(), so Launcher.toggleAllApps
never requested focus for the search field and the keyboard did not appear.

- Add SearchUiManager#startSearch() default method.
- Implement startSearch() in ComposeSearchLayout (request focus + show keyboard)
  and AppsSearchContainerLayout (existing showKeyboard path).
- Call startSearch() from Launcher.toggleAllApps after the ALL_APPS animation.
- Wait for window focus before showing the keyboard when the launcher is being
  brought to the foreground from another app.
@johanneswilm

Copy link
Copy Markdown
Author

I've added a README section specifying that this is a vibe-coded fork and which features have been added here: https://github.com/johanneswilm/Neo-Feed . That way users can have something that is in a working state while you decide on how to get the Launcher and Feed fixed long-term.

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