Closed infeo closed 5 years ago
The cause is probably outside of the Java code, since it is (theoretically) impossible to access unallocated memory inside of Java. Therefore it is hard to tell what is happening without knowing the implementation of fillWin32FindData
.
Maybe it is a bad initialization? The function takes a WIN32_FIND_DATA structure as input, which consists also of two Arrays. Currently the size of one of those arrays depends on the length of the filename, but in default constructors and the Windows documentation it is always initialized as an array of fixed size.
Basic Info
OS: Windows 10 Pro Ver 1809 Dokany-Version: 1.2.0.1000 Adapter-Version: commit e3d89f55c5f140599730ba1234d0e3e96228eef8
Description
While browsing through a mounted Volume with a lot of files and folders, sometimes a InvalidMemoryException is thrown during listing the directory content:
I could caused this by rapidly switching between directories with ~400 files each.
The code where it is thrown is: https://github.com/cryptomator/dokany-nio-adapter/blob/e3d89f55c5f140599730ba1234d0e3e96228eef8/src/main/java/org/cryptomator/frontend/dokany/ReadWriteAdapter.java#L538-L549