Skip to content

NullPointerException in skip.ui.NavigationStack.Render after Android system font size change - causes app to crash #300

@namrehs

Description

@namrehs

I originally filed this in the wrong place (Skip general discussion), so am closing it there and re-opening here. Sorry for any confusion.

I discovered this when testing my Skip lite app on a physical device (Pixel 6a/Android 16), then reproduced in Emulator, and have found that it’s reproducible in the Skip Showcase app on the Google Play Store.

The app reproducibly crashes when navigating between tabs with NavigationStack after changing the system font size between extreme sizes. The number of steps to trigger the crash may be dependent on layout complexity. I’ve been able to reproduce it reliably in the Skip Showcase app downloaded from the Google Play Store, which takes an extra few steps compared to my app with a more complex layout.

Excerpt of stacktrace:

FATAL EXCEPTION: main
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object skip.ui.Preference.getReduced$SkipUI_debug()' on a null object reference
    at skip.ui.NavigationStack.Render(Navigation.kt:143)
    at skip.ui.View._ComposeContent(...)
    at showcase.fuse.SettingsView._ComposeContent(...)
    // ... continues into Compose/Android internals

Steps to reproduce:

  1. Download Skip Showcase app from the Google Play Store
  2. Open Android system Settings app, go to "Display & touch" and then "Display size and text"
  3. Set Font Size to largest size
  4. Open Skip Showcase app
  5. Tap Showcase to switch to Showcase tab
  6. Switch to system Settings -> Display size and text
  7. Set Font Size to smallest size
  8. Switch back to Skip Showcase app
  9. Tap About to switch to About tab
  10. Switch to system Settings -> Display size and text
  11. Set Font Size to largest size
  12. Switch back to Skip Showcase app
  13. Tap Showcase to switch to Showcase tab
    -- This should trigger a crash (if no crash, repeat pattern of changing font size and back to app and switch between tabs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomposeLimitation of Jetpack Compose or issue with SwiftUI translationhelp wantedExtra attention is needednavigationIssues with navigation behavior parity between SwiftUI and Jetpack Compose

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions