aaru-dps / Aaru

Aaru Data Preservation Suite
Other
489 stars 35 forks source link

[ISO9660] "Error reading file: Sector address not found" while extracting heavily padded PS2 ISO9660 partition #721

Open TheRogueArchivist opened 2 years ago

TheRogueArchivist commented 2 years ago

Version

5.3.1

Commit hash

No response

Tested debug version?

Which operating systems have you used?

What is the architectural bit size you're using?

What processor are you using?

Image format

ISO

Application that created the image

DiscImageCreator

What were you doing when it failed?

Destination image format

No response

Filesystem

ISO9660

Description

When attempting to extract the ISO9660 filesystem from a PS2 disc image that is heavily padded (the file itself over 1 GB large, but compresses easily to around 40 MB), Aaru fails with the error "Error reading file: Sector address not found (Parameter 'sectorAddress')".

Exact command line used

Aaru fs extract '.\Jumanji (Australia).iso' ./test

Expected behavior

Aaru to successfully extract the contents of the filesystem.

Actual behavior

Aaru crashes.

Output of command execution with debug output enabled

...
DEBUG (ISO9660 Plugin): Sector 1019, Cooked, Mode 0/1 / Mode 2 Form 1
DEBUG (ISO9660 Plugin): Sector 1020, Cooked, Mode 0/1 / Mode 2 Form 1
DEBUG (ISO9660 Plugin): Sector 1021, Cooked, Mode 0/1 / Mode 2 Form 1
DEBUG (ISO9660 Plugin): Sector 1022, Cooked, Mode 0/1 / Mode 2 Form 1
DEBUG (ISO9660 Plugin): Sector 1023, Cooked, Mode 0/1 / Mode 2 Form 1
DEBUG (ISO9660 Plugin): Sector 1024, Cooked, Mode 0/1 / Mode 2 Form 1
DEBUG (ISO9660 Plugin): Sector 1025, Cooked, Mode 0/1 / Mode 2 Form 1
Written 1525448 bytes of file SLES_544.36 to ./test\ISO9660\NO NAME\SLES_544.36
DEBUG (ISO9660 Plugin): Sector 280, Cooked, Mode 0/1 / Mode 2 Form 1
Written 56 bytes of file SYSTEM.CNF to ./test\ISO9660\NO NAME\SYSTEM.CNF
Error reading file: Sector address not found (Parameter 'sectorAddress')
DEBUG (Extract-Files command):    at Aaru.DiscImages.ZZZRawImage.ReadSectors(UInt64 sectorAddress, UInt32 length) in /home/claunia/Development/Aaru/Aaru/Aaru.Images/ZZZRawImage/Read.cs:line 1234
   at Aaru.DiscImages.ZZZRawImage.ReadSector(UInt64 sectorAddress) in /home/claunia/Development/Aaru/Aaru/Aaru.Images/ZZZRawImage/Read.cs:line 1223
   at Aaru.Filesystems.ISO9660.ReadSector(UInt64 sector, Boolean interleaved, Byte fileNumber) in /home/claunia/Development/Aaru/Aaru/Aaru.Filesystems/ISO9660/Mode2.cs:line 68
   at Aaru.Filesystems.ISO9660.ReadWithExtents(Int64 offset, Int64 size, List`1 extents, Boolean interleaved, Byte fileNumber) in /home/claunia/Development/Aaru/Aaru/Aaru.Filesystems/ISO9660/File.cs:line 528
   at Aaru.Filesystems.ISO9660.Read(String path, Int64 offset, Int64 size, Byte[]& buf) in /home/claunia/Development/Aaru/Aaru/Aaru.Filesystems/ISO9660/File.cs:line 159
   at Aaru.Commands.Filesystem.ExtractFilesCommand.ExtractFilesInDir(String path, IReadOnlyFilesystem fs, String volumeName, String outputDir, Boolean doXattrs) in /home/claunia/Development/Aaru/Aaru/Aaru/Commands/Filesystem/ExtractFiles.cs:line 489
   at Aaru.Commands.Filesystem.ExtractFilesCommand.Invoke(Boolean debug, Boolean verbose, String encoding, Boolean xattrs, String imagePath, String namespace, String outputDir, String options) in /home/claunia/Development/Aaru/Aaru/Aaru/Commands/Filesystem/ExtractFiles.cs:line 289

Affected image

http://redump.org/disc/52293/

claunia commented 2 years ago

Test it with devel

TheRogueArchivist commented 2 years ago

No crash on b05dc45d, but seems to hang on "Reading file PAD.TXT... ---------------------------------------- 0%".