{"action":"created","issue":{"url":"https://api.github.com/repos/arpitkh96/AmazeFileManager/issues/302","repository_url":"https://api.github.com/repos/arpitkh96/AmazeFileManager","labels_url":"https://api.github.com/repos/arpitkh96/AmazeFileManager/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/arpitkh96/AmazeFileManager/issues/302/comments","events_url":"https://api.github.com/repos/arpitkh96/AmazeFileManager/issues/302/events","html_url":"https://github.com/arpitkh96/AmazeFileManager/issues/302","id":169792609,"number":302,"title":"SMB copy operation fails due to error in FileVerifier","user":{"login":"dkbz","id":20885997,"avatar_url":"https://avatars.githubusercontent.com/u/20885997?v=3","gravatar_id":"","url":"https://api.github.com/users/dkbz","html_url":"https://github.com/dkbz","followers_url":"https://api.github.com/users/dkbz/followers","following_url":"https://api.github.com/users/dkbz/following{/other_user}","gists_url":"https://api.github.com/users/dkbz/gists{/gist_id}","starred_url":"https://api.github.com/users/dkbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkbz/subscriptions","organizations_url":"https://api.github.com/users/dkbz/orgs","repos_url":"https://api.github.com/users/dkbz/repos","events_url":"https://api.github.com/users/dkbz/events{/privacy}","received_events_url":"https://api.github.com/users/dkbz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-07T11:44:29Z","updated_at":"2016-09-26T13:05:40Z","closed_at":null,"body":"When copying to/from SMB share an error occurs when next file to copy is greatly larger than previous files. It appears that there is a bug in FileVerifier thread implementation. After copying a large file, FileVerifier's add method tries to start again FileVerifier thread while the thread already terminated, because verification of small files were much quicker. Here's trace:\r\n\r\nE Copy    : basefile     /storage/emulated/0/bluetooth/Video000.mp4\r\nE Copy    : /storage/emulated/0/bluetooth/Video000.mp4\r\nE Copy    : basefile     /storage/emulated/0/bluetooth/Video001.mp4\r\nE Copy    : /storage/emulated/0/bluetooth/Video001.mp4\r\nW System.err: java.lang.IllegalThreadStateException: Thread already started\r\nW System.err:    at java.lang.Thread.checkNotStarted(Thread.java:849)\r\nW System.err:    at java.lang.Thread.start(Thread.java:1059)\r\nW System.err:    at com.amaze.filemanager.services.FileVerifier.add(FileVerifier.java:54)\r\nW System.err:    at com.amaze.filemanager.services.CopyService$DoInBackground$Copy.copyFiles(CopyService.java:341)\r\nW System.err:    at com.amaze.filemanager.services.CopyService$DoInBackground$Copy.execute(CopyService.java:260)\r\nW System.err:    at com.amaze.filemanager.services.CopyService$DoInBackground.doInBackground(CopyService.java:151)\r\nW System.err:    at com.amaze.filemanager.services.CopyService$DoInBackground.doInBackground(CopyService.java:137)\r\nW System.err:    at android.os.AsyncTask$2.call(AsyncTask.java:295)\r\nW System.err:    at java.util.concurrent.FutureTask.run(FutureTask.java:237)\r\nW System.err:    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)\r\nW System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)\r\nW System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)\r\nW System.err:    at java.lang.Thread.run(Thread.java:818)\r\nE Copy    : Got exception checkout"},"comment":{"url":"https://api.github.com/repos/arpitkh96/AmazeFileManager/issues/comments/249563774","html_url":"https://github.com/arpitkh96/AmazeFileManager/issues/302#issuecomment-249563774","issue_url":"https://api.github.com/repos/arpitkh96/AmazeFileManager/issues/302","id":249563774,"user":{"login":"dkbz","id":20885997,"avatar_url":"https://avatars.githubusercontent.com/u/20885997?v=3","gravatar_id":"","url":"https://api.github.com/users/dkbz","html_url":"https://github.com/dkbz","followers_url":"https://api.github.com/users/dkbz/followers","following_url":"https://api.github.com/users/dkbz/following{/other_user}","gists_url":"https://api.github.com/users/dkbz/gists{/gist_id}","starred_url":"https://api.github.com/users/dkbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkbz/subscriptions","organizations_url":"https://api.github.com/users/dkbz/orgs","repos_url":"https://api.github.com/users/dkbz/repos","events_url":"https://api.github.com/users/dkbz/events{/privacy}","received_events_url":"https://api.github.com/users/dkbz/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T13:05:40Z","updated_at":"2016-09-26T13:05:40Z","body":"Hi! Indeed it looks like this bug is fixed in latest beta. I've tried various copy operations and everything successfully completed.\r\n\r\nHowever I've noticed another bug in copy operations - files are being written in 60 kB units. For example, when I copy 4 byte file (ASCII text \"TEST\") I get 60 kB file (ASCII text \"TEST\" followed by ~60 k null bytes). It's probably caused by using `out.write(bytes)` instead of `out.write(bytes, 0, length)` in WriteThread.java."}}
{"actor":{"display_login":"dkbz"}}