question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SimpleDiskCache ClearAsync exception

See original GitHub issue

I am seeing this exception in my stacktrace sometimes. Do you know what it is related to? Exception is thrown on this line await FFImageLoading.ImageService.Instance.InvalidateCacheAsync(FFImageLoading.Cache.CacheType.All);


SimpleDiskCache+<ClearAsync>d__16.MoveNext ()
System.IO.DirectoryNotFoundException: Could not find a part of the path '/data/user/0/myapp.myapp/cache/FFSimpleDiskCache'.
__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath)
FileSystemEnumerableIterator`1[TSource].HandleError (System.Int32 hr, System.String path)
FileSystemEnumerableIterator`1[TSource].CommonInit ()
System.IO.FileSystemEnumerableIterator`1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler`1[TSource] resultHandler, System.Boolean checkHost) [0x000d6] in :0
FileSystemEnumerableFactory.CreateFileNameIterator (System.String path, System.String originalUserPath, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost)
Directory.InternalGetFileDirectoryNames (System.String path, System.String userPathOriginal, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost)
Directory.InternalGetDirectories (System.String path, System.String searchPattern, System.IO.SearchOption searchOption)
Directory.GetDirectories (System.String path)
Directory.RecursiveDelete (System.String path)
Directory.Delete (System.String path, System.Boolean recursive)
SimpleDiskCache+<ClearAsync>d__16.MoveNext ()
ExceptionDispatchInfo.Throw ()
TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task)
TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task)
TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task)
ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult ()
ImageServiceBase`1+<InvalidateCacheAsync>d__46[TImageContainer].MoveNext ()
ExceptionDispatchInfo.Throw ()
TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task)
TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task)
TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task)
TaskAwaiter.GetResult ()
Page+<OnDisappearing>d__10.MoveNext ()
ExceptionDispatchInfo.Throw ()
AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state)
SyncContext+<>c__DisplayClass2_0.<Post>b__0 ()
Thread+RunnableImplementor.Run ()
IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this)
(wrapper dynamic-method) System.Object.e1cae9d1-f90d-4a2e-9e85-5d549c933fbf(intptr,intptr)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
EmilAlipievcommented, Mar 20, 2018

I didnt move myself. it is from my users on production but yes i think that it could be something to do with low disk space. or could it be about storing in the sd card and umounting sd card?

0reactions
ornolisvtcommented, Apr 23, 2020

Recently this problem has also occurred in my android app. It was reported in Alcatel U5 with Android 6.0, the trace

FileSystemEnumerator1[TResult].FindNextEntry (System.Byte* entryBufferPtr, System.Int32 bufferLength) FileSystemEnumerator1[TResult].MoveNext () SimpleDiskCache.InitializeEntries () FFImageLoading.Cache.SimpleDiskCache…ctor (System.String cachePath, FFImageLoading.Config.Configuration configuration) [0x00082] in <e4a68679a2a44c4694e04140bb609f9a>:0 ImageService.CreatePlatformDiskCacheInstance (FFImageLoading.Config.Configuration configuration) ImageServiceBase1[TImageContainer].InitializeIfNeeded (FFImageLoading.Config.Configuration userDefinedConfig) ImageServiceBase1[TImageContainer].get_Config () ImageCache.get_Instance () ImageService.get_MemoryCache () ImageServiceBase`1[TImageContainer].InvalidateMemoryCache () MainApplication.OnTrimMemory (Android.Content.TrimMemory level) Application.n_OnTrimMemory_I (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 native_level) (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.4(intptr,intptr,int)

My method in MainApplication

public override void OnTrimMemory([GeneratedEnum] TrimMemory level)
       {
           ImageService.Instance.InvalidateMemoryCache();
           GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);
           base.OnTrimMemory(level);
       }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Viewing online file analysis results for 'tmpg8cqvq86.apk'
SimpleDiskCache +<TryGetStreamAsync>d__18 ... not raise an exception; JNIEnv::Throw() returned {0}. Unicode based on Dropped File (Java.Interop.dll.DROPPED).
Read more >
Android library to easily serialize and cache your objects ...
clearAsync (new ReservoirClearCallback() { @Override public void onSuccess() { try { assertEquals(0, Reservoir.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found