d4rken-org / sdmaid-se

SD Maid 2/SE is Android's most thorough cleaning tool.
https://play.google.com/store/apps/details?id=eu.darken.sdmse
GNU General Public License v3.0
2.77k stars 432 forks source link

Catch new NPE when querying app sizes on Android 15 #1442

Closed d4rken closed 4 weeks ago

d4rken commented 4 weeks ago

Reported for a Pixel 8 Pro @ Android 15. Couldn't reproduce myself

According to the log only happened to one app (SnapChat), but several apps before that didn't throw an NPE.

java.lang.NullPointerException
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3248)
    at android.os.Parcel.createException(Parcel.java:3226)
    at android.os.Parcel.readException(Parcel.java:3209)
    at android.os.Parcel.readException(Parcel.java:3151)
    at android.app.usage.IStorageStatsManager$Stub$Proxy.queryStatsForPackage(IStorageStatsManager.java:505)
    at android.app.usage.StorageStatsManager.queryStatsForPackage(StorageStatsManager.java:211)
    at eu.darken.sdmse.appcontrol.core.AppControl.toAppInfo(Unknown Source:268)
    at eu.darken.sdmse.appcontrol.core.AppControl.performScan(Unknown Source:351)
    at eu.darken.sdmse.appcontrol.core.AppControl.submit(Unknown Source:216)
    at eu.darken.sdmse.main.core.taskmanager.TaskManager$execute$2$result$1.invokeSuspend(Unknown Source:32)
    at eu.darken.sdmse.main.core.taskmanager.TaskManager$execute$2$result$1.invoke(Unknown Source:10)
    at kotlin.ResultKt.useRes(Unknown Source:93)
    at eu.darken.sdmse.common.sharedresource.HasSharedResource.useRes(Unknown Source:4)
    at eu.darken.sdmse.main.core.taskmanager.TaskManager.access$execute(Unknown Source:239)
    at eu.darken.sdmse.main.core.taskmanager.TaskManager$submit$job$1.invokeSuspend(Unknown Source:133)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
    at kotlinx.coroutines.UndispatchedCoroutine.afterResume(Unknown Source:53)
    at kotlinx.coroutines.AbstractCoroutine.resumeWith(Unknown Source:22)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:31)
    at kotlinx.coroutines.DispatchedTask.run(Unknown Source:112)
    at androidx.work.Worker$2.run(Unknown Source:53)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:95)
Caused by: android.os.RemoteException: Remote stack trace:
    at java.io.File.<init>(File.java:288)
    at com.android.server.usage.StorageStatsService.computeAppStatsByDataTypes(StorageStatsService.java:960)
    at com.android.server.usage.StorageStatsService.queryStatsForUid(StorageStatsService.java:456)
    at com.android.server.usage.StorageStatsService.queryStatsForPackage(StorageStatsService.java:383)
    at android.app.usage.IStorageStatsManager$Stub.onTransact(IStorageStatsManager.java:265)