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.

java.lang.ArrayIndexOutOfBoundsException: length=0; index=0

See original GitHub issue

I find the fresco’s DefaultDiskStorage.java in isExternal(File directory, CacheErrorLogger cacheErrorLogger) method crashed, the log is blow

java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
1
at android.os.Environment.null getExternalStorageDirectory(null)(Environment.java:353)
2
at com.facebook.cache.disk.DefaultDiskStorage.boolean isExternal(java.io.File,com.facebook.cache.common.CacheErrorLogger)(DefaultDiskStorage.java:120)
3
at com.facebook.cache.disk.DefaultDiskStorage.void <init>(java.io.File,int,com.facebook.cache.common.CacheErrorLogger)(DefaultDiskStorage.java:105)
4
at com.facebook.cache.disk.DynamicDefaultDiskStorage.void createStorage()(DynamicDefaultDiskStorage.java:184)
5
at com.facebook.cache.disk.DynamicDefaultDiskStorage.com.facebook.cache.disk.DiskStorage get()(DynamicDefaultDiskStorage.java:160)
6
at com.facebook.cache.disk.DynamicDefaultDiskStorage.java.util.Collection getEntries()(DynamicDefaultDiskStorage.java:126)
7
at com.facebook.cache.disk.DiskStorageCache.void maybeUpdateFileCacheSizeAndIndex()(DiskStorageCache.java:697)
8
at com.facebook.cache.disk.DiskStorageCache.boolean maybeUpdateFileCacheSize()(DiskStorageCache.java:673)
9
at com.facebook.cache.disk.DiskStorageCache.boolean access$100(com.facebook.cache.disk.DiskStorageCache)(DiskStorageCache.java:50)

this is not happen frequently

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
stale[bot]commented, Sep 6, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community’s attention? This issue may be closed if no further activity occurs. You may also label this issue as “bug” or “enhancement” and I will leave it open. Thank you for your contributions.

0reactions
stale[bot]commented, Sep 13, 2018

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to reopen with up-to-date information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
An array is a container object that holds a fixed number of values of a single type. The length of an array is...
Read more >
How to Fix java.lang.ArrayIndexOutOfBoundsException in ...
This is the classic case of accessing an empty array. Since length is zero it means the array is empty and the index...
Read more >
3 Tips to solve and Avoid java.lang ... - Javarevisited
Since the array has a zero-based index in Java, this means you are trying to access the second element of an array which...
Read more >
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
I am facing some issue in my code, can anyone please help me on this, please find the below crash which i am...
Read more >
[Android]java.lang.ArrayIndexOutOfBoundsException: length ...
//Fix-it: it may throw java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 ; //Cannot find out the reason. So just prevent it to crash the application.
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