StrictMode policy violation; ~duration=102 ms: android.os.strictmode.DiskReadViolation
StrictMode policy violation; ~duration=102 ms: android.os.strictmode.DiskReadViolation (Ask Gemini)
at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1666)
at libcore.io.BlockGuardOs.access(BlockGuardOs.java:74)
at libcore.io.ForwardingOs.access(ForwardingOs.java:128)
at android.app.ActivityThread$AndroidOs.access(ActivityThread.java:8054)
at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:332)
at java.io.File.exists(File.java:829)
at android.app.ContextImpl.getDataDir(ContextImpl.java:3196)
at android.app.ContextImpl.getDir(ContextImpl.java:3215)
at android.content.ContextWrapper.getDir(ContextWrapper.java:351)
at com.clevertap.android.sdk.inapp.images.FileResourceProvider.
CleverTap version: com.clevertap.android:clevertap-android-sdk:7.0.1
We have recorded this as a part of our internal testing as well. Since this violation is related to just accessing file (rather just a directory reference) we will be solving this as it gets prioritised in roadmap and mention it in release notes.
We are experiencing this issue on SDK version 7.2.2, occurring during app startup and contributing to ANRs and frozen frames, impacting app stability and performance—please prioritize this in the roadmap. @CTLalit
Sdk version: 7.2.2
Stack Trace :
Process: ng.com.fairmoney.fairmoney.debug, PID: 8614 java.lang.RuntimeException: StrictMode ThreadPolicy violation at android.os.StrictMode$AndroidBlockGuardPolicy.onThreadPolicyViolation(StrictMode.java:1813) at android.os.StrictMode$AndroidBlockGuardPolicy.handleViolationWithTimingAttempt(StrictMode.java:1670) at android.os.StrictMode$AndroidBlockGuardPolicy.startHandlingViolationException(StrictMode.java:1641) at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1596) at libcore.io.BlockGuardOs.access(BlockGuardOs.java:71) at libcore.io.ForwardingOs.access(ForwardingOs.java:72) at android.app.ActivityThread$AndroidOs.access(ActivityThread.java:7533) at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:281) at java.io.File.exists(File.java:815) at android.app.ContextImpl.getDataDir(ContextImpl.java:2539) at android.app.ContextImpl.getDir(ContextImpl.java:2558) at android.content.ContextWrapper.getDir(ContextWrapper.java:318) at com.clevertap.android.sdk.inapp.images.FileResourceProvider.<init>(FileResourceProvider.kt:55) at com.clevertap.android.sdk.inapp.images.repo.FileResourcesRepoFactory$Companion.createFileResourcesRepo(FileResourcesRepoFactory.kt:45) at com.clevertap.android.sdk.CleverTapFactory.getCoreState(CleverTapFactory.kt:233) at com.clevertap.android.sdk.CleverTapAPI.<init>(CleverTapAPI.java:1229) at com.clevertap.android.sdk.CleverTapAPI.instanceWithConfig(CleverTapAPI.java:926) at com.clevertap.android.sdk.CleverTapAPI.getDefaultInstance(CleverTapAPI.java:791) at com.clevertap.android.sdk.CleverTapAPI.getDefaultInstance(CleverTapAPI.java:806) at com.fairmoney.core.analytics.android.initializers.CleverTapInitializer$instance$1.invokeSuspend(CleverTapInitializer.kt:31) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@de66b50, Dispatchers.IO] Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@c8c3a4e, Dispatchers.IO] Caused by: android.os.strictmode.DiskReadViolation
Issue is also experienced Randomly.
This violation has been resolved in v7.4.0