Couldn't unmount zip files when downloading images
Error type: Couldn't unmount zip files net.java.truevfs.kernel.spec.FsSyncException: zip:file:/C:/Users/jmba9/OneDrive/Desktop/XMage2024/xmage/mage-client/plugins/images/VIS.zip!/ - FsSyncException Client version: 1.4.54-V1 (build: 2024-09-08 18:14)
zip:file:/C:/Users/jmba9/OneDrive/Desktop/XMage2024/xmage/mage-client/plugins/images/VIS.zip!/
Stack trace: net.java.truevfs.kernel.impl.TargetArchiveController.close(TargetArchiveController.java:434) net.java.truevfs.kernel.impl.TargetArchiveController.sync(TargetArchiveController.java:327) net.java.truevfs.kernel.impl.ResourceController.sync(ResourceController.java:95) net.java.truevfs.kernel.impl.CacheController.sync(CacheController.java:128) net.java.truevfs.kernel.impl.SyncController.doSync(SyncController.java:263) net.java.truevfs.kernel.impl.SyncController.sync(SyncController.java:243) net.java.truevfs.kernel.impl.LockController$10.call(LockController.java:212) net.java.truevfs.kernel.impl.LockController$10.call(LockController.java:208) net.java.truevfs.kernel.impl.LockingStrategy$4.call(LockingStrategy.java:142) net.java.truevfs.kernel.impl.LockController.sync(LockController.java:208) and other 13 lines Root caused by: sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79) sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:230) java.nio.file.Files.newByteChannel(Files.java:361) java.nio.file.Files.newByteChannel(Files.java:407) java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) java.nio.file.Files.newInputStream(Files.java:152) net.java.truevfs.driver.file.FileInputSocket.stream(FileInputSocket.java:45) net.java.truecommons.cio.IoSockets$InputAdapter.stream(IoSockets.java:61) and other 37 lines
Try running as admin, some users have reported that fixes the problem (or could be coincidence for intermittent error)
It’s random error related to system performance (race condition in multithreaded code). There are must be some un-synced code in xmage or in truevfs library (maybe it has some limitation or special settings, need research).
p.s. it’s about unsaved data for one of the set. Not critical for a user - just run download in next app run or restart.
@JayDi85 if it's an intermittent error with no true fix, it possible to get some error handling on this at least?
It’s under progress
@JayDi85 please add error handling so we don't get a duplicate issue for this every week
Should we try to disable the zip files by default?
Some reasoning:
- Downloading images seems to be a bit faster. Perhaps using the truevfs is a performance bottleneck?
- You can increase the download threads and it works. Increasing download threads to with zip files usually crashes the download.
- Less
FsSyncExceptionreports from users - Space savings? I downloaded scryfall small images and it looks like the compressed zip is actually larger than the individual files. Need to check how the large images compresses.
- Easy change, just use raw images as default.
- If people are constrained in disk space, just guide them to use the zip files.
Zendikar Rising (ZNR), Scryfall good quality:
- Zip file
1 File(s) 73 120 423 bytes - Folde of pictures
443 File(s) 73 058 459 bytes
This means there is no actual space savings from zipping the file, binary files can't be compressed at all.
Zip must be replaced by zero compression version (keep zip files format, not tar/gz — so old user’s files will be compatible). Maybe it can help with multithread problems. I still don’t know the real reason — maybe truefs has some bugs and do not support it (I’m used flush and other commands from docs but it doesn’t help and can’t guaranty save an all data before stop/continue with other tasks).
Compression used in old days for png images. Now it’s jpg and no needs in compression. BUT it still needs less files on the disk. 100k card files are heavy to performance, copy and check.
Perhaps you could swap the default value to folders/files until that gets implemented? I don't know anything about the performance with many files, I could guess that most of the time you have just a small number of images in memory when you play?
Made a PR for your convenience if you think it is viable: https://github.com/magefree/mage/pull/13588
It’s about operation system, not xmage (copy files, antivirus scan, etc). Game/GUI performance will be same.
Personally I install with zip files disabled.
@xenohedron can you confirm xmage settings lost/reset on system's java update?
can you confirm xmage settings lost/reset on system's java update?
Not sure what you're referring to in this context. I've definitely heard reports of this from others but haven't experienced it myself. (I'm on linux, and running XMage with system java 23, not java 8)
I've tried to play with couple of friends and downloading the images tends to be the biggest hurdle every time. If we could make that easier, that would be a good thing..