Repository navigation
feat: errors for truncated PAA and ODOL files, PNGs and unknown types - #49
Merged
Merged
Conversation
Decoy files of obfuscated PBOs are cut-off copies of real files. They failed with I/O errors at the end of the file or errors from the garbage they contain. - PaaError::MipmapPastEnd: mipmaps reaching past the end of the file. All headers are read before any mipmap is decoded. - OdolError::LodPastEnd: LODs starting past the end of the file, checked before reading them (also for OdolLazyReader). End addresses of some small models that load fine are past the end of the file. - PaaError::Png for PNG images with a .paa name, PaaError::UnknownType for other unknown types, which read as zero mipmaps before. - Tagg::read grows with the data instead of allocating its stored size.
TheWillard
force-pushed
the
feat/paa-odol-garbage-errors
branch
from
November 6, 2026 23:27
c98ebc4 to
6d9d6d6
Compare
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Decoy files of obfuscated PBOs and some broken mod files failed with errors that don't say what's wrong: I/O errors at the end of the file, LZO errors from garbage, or enum mismatches. Now:
PaaError::MipmapPastEnd: a texture whose mipmaps reach past the end of the file. All mipmap headers are read before any data is decoded, so a truncated texture fails as that, not on the garbage in the mipmaps it does have.OdolError::LodPastEnd: a model whose LODs start past the end of the file. Checked before the LODs are read, also forOdolLazyReader. Only start addresses: the end addresses of some small models that load fine (Blastcore particle effects) are past the end of the file.PaaError::Png: a PNG image with a .paa name (found in niarsenal).PaaError::UnknownType: an unknown PAA type. These read as zero mipmaps before, or failed later.Tagg::readgrows with the data instead of allocating its stored size, up to 4 GB for garbage.Checked against Arma 3 (6,682 models, 20,817 textures) and 150 mods (~28,000 models, ~320,000 textures):
UnknownType(0).MipmapPastEnd, and 3,085 of the 5,496 failing models withLodPastEnd. The rest are garbage within the file and keep their errors.Based on #48.