Skip to content

App crashes with ANR ~30 seconds after filePicker.launch()`on Android 15 #557

@mishbanya

Description

@mishbanya

Description

After calling filePicker.launch(), the app consistently crashes with an ANR after approximately 30 seconds. The crash occurs regardless of whether the user has already selected a file or is still in the file picker dialog.

Environment

  • FileKit version: 0.13.0
  • Android version: 15 (AP3A.240905.015.A2) (Xiaomi HyperOS 2.0.6.0) / The issue seems to not occure on anything but this version, might be even a device problem

Steps to Reproduce

  1. Use with FileKitType.File() and FileKitMode.Multiple() rememberFilePickerLauncher
  2. Call launch() on the launcher
  3. Wait ~30 seconds (with or without selecting files)
  4. App crashes

Code to Reproduce

val filePicker = rememberFilePickerLauncher(
type = FileKitType.File(),
mode = FileKitMode.Multiple(),
onResult = { files ->
files?.let {
// handle selected files
}
}
)

// Trigger the picker
filePicker.launch()

Observed Behavior

IF user pickes a file ActivityThread logs:
fail in deliverResultsIfNeeded java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference

Regardless of what user's doing, the system's ActivityManager reports an ANR in com.google.android.providers.media.module with reason "ContentProvider not responding". The media provider process consumes ~100% CPU (96% user + 3.9% kernel) before the ANR is triggered.
Key observations from logs:

  • The ANR originates in the MediaProvider system module, not in the app itself
  • The app's own CPU usage is minimal (~0.9%)
  • Logs are not consistently reproducible in terms of output
  • Total system CPU load is only ~14%, so this is not a general system resource issue — it's isolated to the media provider process

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproNeeds a minimal reproducible example/project and exact steps before investigation can continue.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions