Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

listFiles() on directories with large number (350 files) of files ends up in a crash #343

Open
jonecx opened this issue Aug 3, 2023 · 0 comments

Comments

@jonecx
Copy link

jonecx commented Aug 3, 2023

Has anyone seen this on 2.1.9 and been able to fix it? It appears when a folder has more than 300 items in it

`
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1213)
at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.listSmb(LoadFilesListTask.java:606)
at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:154)
at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:85)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)

Suppressed: jcifs.smb.SmbException: 0xC0000128
at jcifs.smb.SmbTransportImpl.checkStatus2(SmbTransportImpl.java:1496)
at jcifs.smb.SmbTransportImpl.checkStatus(SmbTransportImpl.java:1607)
at jcifs.smb.SmbTransportImpl.sendrecv(SmbTransportImpl.java:1014)
at jcifs.smb.SmbTransportImpl.send(SmbTransportImpl.java:1578)
at jcifs.smb.SmbSessionImpl.send(SmbSessionImpl.java:409)
at jcifs.smb.SmbTreeImpl.send(SmbTreeImpl.java:472)
at jcifs.smb.SmbTreeConnection.send0(SmbTreeConnection.java:404)
at jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:318)
at jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:298)
at jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:130)
at jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:117)
at jcifs.smb.DirFileEntryEnumIterator2.open(DirFileEntryEnumIterator2.java:102)
... 13 common frames omitted

Caused by: jcifs.util.transport.TransportException: Transport2 error reading response to command=SMB2_QUERY_DIRECTORY,status=0,flags=0x0004,mid=7,wordCount=0,byteCount=34

                                                                                                	at jcifs.util.transport.Transport.waitForResponses(Transport.java:351)
                                                                                                	at jcifs.util.transport.Transport.sendrecv(Transport.java:232)
                                                                                                	at jcifs.smb.SmbTransportImpl.sendrecv(SmbTransportImpl.java:1012)
                                                                                                	at jcifs.smb.SmbTransportImpl.send(SmbTransportImpl.java:1578)
                                                                                                	... 21 common frames omitted

Caused by: java.io.IOException: Message size 65598 exceeds maxiumum buffer size 65536`

@jonecx jonecx changed the title Transport2 error reading response to command=SMB2_QUERY_DIRECTORY,status=0,flags=0x0004,mid=7,wordCount=0,byteCount=34 listFiles() on directories with large number (350 files) of files ends up in a crash Aug 4, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant