JNI File Null on SD Card Lock in Place

I am experimenting with the Pico VR headset and using the SD card as a hot swappable medium for storing content. When the SD card is completely inserted it will lock into place; however, I discovered that it can be held in place without being locked in place and it will be able to read from the SD card. A null object exception occurs when the SD card is inserted such that it locks into place, but not when it is held in place. It did not always immediately crash and required removing and inserting the sd card multiple times.

Below is the initial Java code I created that crashes:

File[] files = this.getExternalFilesDirs(null);
for(File F : files)
{
    final boolean bIsInternal = F.getAbsolutePath().contains("/storage/emulated/0");
    if( bIsInternal )
    {
        continue;
    }
    final String[] split = F.getAbsolutePath().split("/Android/data/");
    return split[0];
}

For some reason, when the SD card is inserted such that it locks in place the File object will be or become invalid and a Null Object exception is thrown; however, it does not happen when the SD card is held in place without locking it in place. I can test if the File object is null at the beginning of the loop so it skips usage of the object and the exception will not be thrown. Why does this happens when the SD card is locked into place, but not when it is held in place?