-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to import more than 9 beatmaps at the same time. #31667
Comments
I tried importing 20 beatmaps and it works fine here, so cannot reproduce in general. The logs attached have a bunch of this inside:
Please attach the beatmaps you were trying to import at the time. I suspect they are corrupted. |
Indeed, the beatmaps appear to be corrupted, despite being extracted from my system for backup during migration (Windows reinstall/macOS Lazer transition). However, it's unclear why importing fewer than 10 maps at once works successfully. Please find the link to an archive (Google Drive) containing 10 beatmaps as an example. I couldn't have attached an archive directly due to size limit. |
Thanks for the archive, that's helpful. This is actually a bug in sharpcompress, which is tracked upstream as adamhathcock/sharpcompress#88. The reason why this bug only manifests when there are 10+ imports is that this bug is a "heisenbug", in that it only appears if a given ZIP entry is attempted to be read more than once. A minimal reproducer follows: using SharpCompress.Archives.Zip;
const string filePath =
"/home/dachb/Downloads/ba69d88b-85bb-445b-82f2-185c18f74264 (2)/50462 Lon - Yuru Fuwa Jukai Girl.osz";
using var archive = ZipArchive.Open(filePath);
Console.WriteLine($"First entry size is {archive.Entries.First().Size}");
archive.Entries.First().OpenEntryStream().ReadExactly(new byte[archive.Entries.First().Size].AsSpan());
Console.WriteLine($"First entry size is {archive.Entries.First().Size}"); which prints
When the batch of imports has 10+ items, the following block of code comes alive: osu/osu.Game/Database/RealmArchiveModelImporter.cs Lines 303 to 333 in 129ab03
This includes osu/osu.Game/Database/RealmArchiveModelImporter.cs Lines 475 to 479 in 129ab03
sharpcompress appears to initially read data from the "directory entry header" of the ZIP, which has the correct sizes, but then after the first read of a given file, gains access to the "local entry header" of the given file, which will have the incorrect zero size. The ZIP produced in adamhathcock/sharpcompress#88 (comment) exhibits the exact same symptom as the ones you attached. I'll probably apply a local workaround to remedy this - that said, I'd probably consider switching away from whatever tool it was that produced these ZIPs, because it must be not doing something like everyone else is as it's been years without anyone hitting this. |
Type
Game behaviour
Bug description
Attempted to import 10 & more
.osz
files simultaneously.Screenshots or videos
No response
Version
2025.118.3-lazer
Logs
compressed-logs.zip
The text was updated successfully, but these errors were encountered: