Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.7.4.1, 1.7.5.1, 1.7.5.2
-
Fix Version/s: 1.7.5.3
-
Component/s: ZIP Downloader
-
Labels:
-
Rank:0|0hzz0v:
Description
Note: I have verified that this affects 1.7.4.1 and 1.7.5.1.
To recreate this:
- Upload sample1 to a project.
- Create a new session resource under the sample1 session.
- Upload the attached file to the newly created resource. Confirm that you want to extract the zip.
- At this point, the resource should look like the attached screenshot.
- Note the existence of both A/A.txt and NESTED/D/A.txt within the resource.
- Download > Download Images.
- Keep everything checked for download in column 2 on the download page.
- Choose "Option 2: ZIP download", and check either/both of the "Include project/subject in file paths" boxes.
- Initiate the download.
- The zip downloads instantaneously. That's because:
- All of the study data is missing.
- There's only three files: A.txt, B.txt, C.txt. (One of the A.txt files has been lost)
Notes:
- I have no idea why this only seems to happen if you check "Include project in file paths" or "Include subject in file paths" (or both).
- Note that since the duplicate files are in separate directories, it shouldn't even be a problem in the downloaded zip. This is demonstrated by keeping both boxes unchecked for project/subject, and the download works just fine.
- When this happens, this is logged:
2019-02-07 23:52:12,612 [ERROR threadPoolExecutorFactoryBean-26] org.nrg.xnat.web.http.AsyncLifecycleMonitor.logLifecycleEvent():64 - An exception occurred during asynchronous processing. Request for task of type org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBodyReturnValueHandler$StreamingResponseBodyTask: HTTP request to URI /xapi/archive/download/admin-20190207_235211/zip by user 'admin'
java.util.zip.ZipException: duplicate entry: Sample_Patient/Sample_ID/TEST/A.txt
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:232)
at org.nrg.xnat.web.http.AbstractZipStreamingResponseBody.writeTo(AbstractZipStreamingResponseBody.java:191)
at org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBodyReturnValueHandler$StreamingResponseBodyTask.call(StreamingResponseBodyReturnValueHandler.java:106)
at org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBodyReturnValueHandler$StreamingResponseBodyTask.call(StreamingResponseBodyReturnValueHandler.java:93)
at org.springframework.web.context.request.async.WebAsyncManager$5.run(WebAsyncManager.java:332)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)