-
Bug
-
Resolution: Fixed
-
21w16a, 21w17a, 21w20a
-
None
-
Confirmed
-
Debug
-
Low
The bug
Attempting to save multiple debug profiles during the same second fails to properly save more than one profile. Instead, some are left as a .tmp file, like 2021-04-27_18.28.10.tmp.
The following error is logged when attempting to save the second profile.
Caught exception in thread Thread[IO-Worker-128,5,main] java.io.UncheckedIOException: java.nio.file.FileAlreadyExistsException: debug/profiling/2021-04-27_18.28.10.zip at eln.a(SourceFile:129) at eln.a(SourceFile:69) at ele.i(SourceFile:210) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.nio.file.FileAlreadyExistsException: debug/profiling/2021-04-27_18.28.10.zip at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:429) at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262) at java.nio.file.Files.move(Files.java:1395) at eln.a(SourceFile:127) ... 5 more
Additionally, when trying to save three or more profiles in the same second, the following error appears, for every individual file that would be generated within the profile.
Could not save profiler results to /profiling.txt java.nio.file.FileAlreadyExistsException: profiling.txt at com.sun.nio.zipfs.ZipFileSystem.newOutputStream(ZipFileSystem.java:516) at com.sun.nio.zipfs.ZipPath.newOutputStream(ZipPath.java:790) at com.sun.nio.zipfs.ZipFileSystemProvider.newOutputStream(ZipFileSystemProvider.java:285) at java.nio.file.Files.newOutputStream(Files.java:216) at java.nio.file.Files.newBufferedWriter(Files.java:2860) at api.a(SourceFile:164) at eln.a(SourceFile:122) at eln.a(SourceFile:65) at ele.i(SourceFile:210) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
How to reproduce
- Hold down the F3 and L keys for a few seconds (you should see "Profiling started" in chat multiple times)
- Check the game log
The errors mentioned above are shown - Check the debug/profiling folder
Some .tmp files remain