aaru-dps / Aaru

Aaru Data Preservation Suite
Other
487 stars 35 forks source link

Suspected floppy image results in Arithmatic operation overflow #727

Open HeroponRikiBestest opened 2 years ago

HeroponRikiBestest commented 2 years ago

Version

Development commit

Commit hash

6.0.0-alpha8+82f2fd63

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

?

Application that created the image

?

What were you doing when it failed?

Destination image format

No response

Filesystem

No response

Description

I have a file, which I'm fairly sure is a floppy disk image. If it is, it should be the pc-8801 version of Hydlide 2. However, I have no idea how the image was originally dumped, or what format it is.

file identifies it as Apple DiskCopy 4.2 image DIMPQ\005, 1355612160 bytes, 0x50de0000 tag size, 0x50 encoding, 0x11 format

When I try and run image info or fs info in aaru, I get the following:

Copyright © 2011-2022 Natalia Portillo

Image format identified by Spectrum Floppy Disk Image.

Unable to open image format
Error: Arithmetic operation resulted in an overflow.
Uploading statistics

Exact command line used

./aaru image info mask1

Expected behavior

I expected aaru to identify the floppy disk format and output the normal info about it, and also identify the filesystem and output info about that too.

Actual behavior

While aaru identified the disk image format, I don't think it's a Spectrum image, and it failed to output further info do to an error.

Output of command execution with debug output enabled

aaru 6.0.0-alpha8+82f2fd63 built by bestest-ThinkPad-T14-Gen-1 in Debug
Copyright © 2011-2022 Natalia Portillo

DEBUG (Image-info command): --debug=True
DEBUG (Image-info command): --input=mask1
DEBUG (Image-info command): --verbose=False
DEBUG (Format detection): Trying plugin Aaru Format
DEBUG (Format detection): Trying plugin ACT Apricot Disk Image
DEBUG (Format detection): Trying plugin Alcohol 120% Media Descriptor Structure
DEBUG (Format detection): Trying plugin Anex86 Disk Image
DEBUG (Anex86 plugin): fdihdr.unknown = 1296647238
DEBUG (Anex86 plugin): fdihdr.hddtype = 348496
DEBUG (Anex86 plugin): fdihdr.hdrSize = 0
DEBUG (Anex86 plugin): fdihdr.dskSize = 5242880
DEBUG (Anex86 plugin): fdihdr.bps = 336
DEBUG (Anex86 plugin): fdihdr.spt = 4688
DEBUG (Anex86 plugin): fdihdr.heads = 9040
DEBUG (Anex86 plugin): fdihdr.cylinders = 13392
DEBUG (Format detection): Trying plugin Apple 2IMG
DEBUG (Format detection): Trying plugin Apple Disk Archival/Retrieval Tool
DEBUG (Format detection): Trying plugin Apple DiskCopy 4.2
DEBUG (Format detection): Trying plugin Apple New Disk Image Format
DEBUG (Format detection): Trying plugin Apple NIB
DEBUG (Format detection): Trying plugin Apple Universal Disk Image Format
DEBUG (Format detection): Trying plugin Basic Lisa Utility
DEBUG (Format detection): Trying plugin BlindWrite 4
DEBUG (Format detection): Trying plugin BlindWrite 5
DEBUG (Format detection): Trying plugin CDRDAO tocfile
DEBUG (Format detection): Trying plugin CDRWin cuesheet
DEBUG (Format detection): Trying plugin CisCopy Disk Image (DC-File)
DEBUG (Format detection): Trying plugin CloneCD
DEBUG (Format detection): Trying plugin CopyTape
DEBUG (Format detection): Trying plugin CPCEMU Disk-File and Extended CPC 
Disk-File
DEBUG (Format detection): Trying plugin d2f disk image
DEBUG (Format detection): Trying plugin D88 Disk Image
DEBUG (D88 plugin): d88hdr.name = "FDIMPQ"
DEBUG (D88 plugin): d88hdr.reserved is empty? = False
DEBUG (D88 plugin): d88hdr.write_protect = 0x00
DEBUG (D88 plugin): d88hdr.disk_type = D2 (0)
DEBUG (D88 plugin): d88hdr.disk_size = 13392
DEBUG (Format detection): Trying plugin Digital Research DiskCopy
DEBUG (Format detection): Trying plugin DIM Disk Image
DEBUG (Format detection): Trying plugin DiscFerret
DEBUG (Format detection): Trying plugin DiscJuggler
DEBUG (DiscJuggler plugin): dscLen = -1
DEBUG (Format detection): Trying plugin DiskDupe DDI Disk Image
DEBUG (Format detection): Trying plugin Dreamcast GDI image
DEBUG (Format detection): Trying plugin Dunfield's IMD
DEBUG (Format detection): Trying plugin HD-Copy disk image
DEBUG (Format detection): Trying plugin IBM SaveDskF
DEBUG (Format detection): Trying plugin KryoFlux STREAM
DEBUG (Format detection): Trying plugin MAME Compressed Hunks of Data
DEBUG (Format detection): Trying plugin MAXI Disk image
DEBUG (MAXI Disk plugin): tmp_header.unknown = 70
DEBUG (MAXI Disk plugin): tmp_header.diskType = 68
DEBUG (MAXI Disk plugin): tmp_header.heads = 73
DEBUG (MAXI Disk plugin): tmp_header.cylinders = 77
DEBUG (MAXI Disk plugin): tmp_header.bytesPerSector = 80
DEBUG (MAXI Disk plugin): tmp_header.sectorsPerTrack = 81
DEBUG (MAXI Disk plugin): tmp_header.unknown2 = 5
DEBUG (MAXI Disk plugin): tmp_header.unknown3 = 0
DEBUG (Format detection): Trying plugin Microsoft VHDX
DEBUG (Format detection): Trying plugin Nero Burning ROM image
DEBUG (Nero plugin): imageStream.Length = 348496
DEBUG (Nero plugin): footerV1.ChunkID = 0xFFFFFFFF
DEBUG (Nero plugin): footerV1.FirstChunkOffset = 4294967295
DEBUG (Nero plugin): footerV2.ChunkID = 0xFFFFFFFF
DEBUG (Nero plugin): footerV2.FirstChunkOffset = 18446744073709551615
DEBUG (Format detection): Trying plugin Parallels disk image
DEBUG (Format detection): Trying plugin PartClone disk image
DEBUG (Format detection): Trying plugin Partimage disk image
DEBUG (Format detection): Trying plugin QEMU Copy-On-Write disk image
DEBUG (Format detection): Trying plugin QEMU Copy-On-Write disk image v2
DEBUG (QCOW plugin): qHdr.magic = 0x4644494D
DEBUG (QCOW plugin): qHdr.version = 1347486976
DEBUG (Format detection): Trying plugin QEMU Enhanced Disk image
DEBUG (Format detection): Trying plugin Ray Arachelian's Disk IMage
DEBUG (Ray Arachelian's Disk IMage plugin): header.signature = FDIMPQ
DEBUG (Ray Arachelian's Disk IMage plugin): header.diskType = 80
DEBUG (Ray Arachelian's Disk IMage plugin): header.heads = 0
DEBUG (Ray Arachelian's Disk IMage plugin): header.cylinders = 17
DEBUG (Ray Arachelian's Disk IMage plugin): header.sectorsPerTrack = 1
DEBUG (Ray Arachelian's Disk IMage plugin): header.signature matches? = False
DEBUG (Format detection): Trying plugin RS-IDE Hard Disk Image
DEBUG (Format detection): Trying plugin Spectrum Floppy Disk Image
Image format identified by Spectrum Floppy Disk Image 
(dadfc9b2-67c1-42a3-b124-825528163fc0).

DEBUG (UkvFdi plugin): hdr.addInfoLen = 0
DEBUG (UkvFdi plugin): hdr.cylinders = 20816
DEBUG (UkvFdi plugin): hdr.dataOff = 0
DEBUG (UkvFdi plugin): hdr.descOff = 0
DEBUG (UkvFdi plugin): hdr.flags = 77
DEBUG (UkvFdi plugin): hdr.heads = 5
DEBUG (UkvFdi plugin): hdr.description = ""
DEBUG (UkvFdi plugin): trkhdr.c = 0
DEBUG (UkvFdi plugin): trkhdr.h = 0
DEBUG (UkvFdi plugin): trkhdr.sectors = 80
DEBUG (UkvFdi plugin): trkhdr.off = 22020176
DEBUG (UkvFdi plugin): sechdr.c = 18
DEBUG (UkvFdi plugin): sechdr.h = 0
DEBUG (UkvFdi plugin): sechdr.r = 0
DEBUG (UkvFdi plugin): sechdr.n = 80 (8388608)
DEBUG (UkvFdi plugin): sechdr.f = CrcOk128, CrcOk256, CrcOk4096
DEBUG (UkvFdi plugin): sechdr.off = 0 (22020176)
DEBUG (UkvFdi plugin): sechdr.c = 80
DEBUG (UkvFdi plugin): sechdr.h = 52
DEBUG (UkvFdi plugin): sechdr.r = 0
DEBUG (UkvFdi plugin): sechdr.n = 0 (128)
DEBUG (UkvFdi plugin): sechdr.f = 80
DEBUG (UkvFdi plugin): sechdr.off = 69 (22020245)
DEBUG (UkvFdi plugin): sechdr.c = 0
DEBUG (UkvFdi plugin): sechdr.h = 80
DEBUG (UkvFdi plugin): sechdr.r = 86
DEBUG (UkvFdi plugin): sechdr.n = 0 (128)
DEBUG (UkvFdi plugin): sechdr.f = 0
DEBUG (UkvFdi plugin): sechdr.off = 26448 (22046624)
DEBUG (UkvFdi plugin): sechdr.c = 0
DEBUG (UkvFdi plugin): sechdr.h = 0
DEBUG (UkvFdi plugin): sechdr.r = 80
DEBUG (UkvFdi plugin): sechdr.n = 120 (-2147483648)
DEBUG (UkvFdi plugin): sechdr.f = 0
DEBUG (UkvFdi plugin): sechdr.off = 20480 (22040656)
Unable to open image format
Error: Arithmetic operation resulted in an overflow.
Error reading file: Could not find color or style 'T'.
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.InvalidOperationException: Could not find color or style ''.
   at Spectre.Console.StyleParser.Parse(String text) in /_/src/Spectre.Console/StyleParser.cs:line 13
   at Spectre.Console.MarkupParser.Parse(String text, Style style) in /_/src/Spectre.Console/Internal/Text/Markup/MarkupParser.cs:line 26
   at Spectre.Console.AnsiConsoleExtensions.Markup(IAnsiConsole console, String value) in /_/src/Spectre.Console/Extensions/AnsiConsoleExtensions.Markup.cs:line 41
   at Spectre.Console.AnsiConsoleExtensions.Markup(IAnsiConsole console, IFormatProvider provider, String format, Object[] args) in /_/src/Spectre.Console/Extensions/AnsiConsoleExtensions.Markup.cs:line 31
   at Spectre.Console.AnsiConsoleExtensions.MarkupLine(IAnsiConsole console, IFormatProvider provider, String format, Object[] args) in /_/src/Spectre.Console/Extensions/AnsiConsoleExtensions.Markup.cs:line 74
   at Spectre.Console.AnsiConsoleExtensions.MarkupLine(IAnsiConsole console, String format, Object[] args) in /_/src/Spectre.Console/Extensions/AnsiConsoleExtensions.Markup.cs:line 52
   at Aaru.Commands.Image.ImageInfoCommand.<>c__DisplayClass1_1.<Invoke>b__2(String format, Object[] objects) in /home/bestest/Aaru/Aaru/Commands/Image/Info.cs:line 76
   at Aaru.Console.AaruConsole.DebugWriteLine(String module, String value) in /home/bestest/Aaru/Aaru.Console/AaruConsole.cs:line 233
   at Aaru.Commands.Image.ImageInfoCommand.Invoke(Boolean debug, Boolean verbose, String imagePath) in /home/bestest/Aaru/Aaru/Commands/Image/Info.cs:line 166
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at System.CommandLine.NamingConventionBinder.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass18_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass13_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass20_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__19_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__6_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass9_0.<<UseExceptionHandler>b__0>d.MoveNext()
Uploading statistics

Affected image

727.zip

TheRogueArchivist commented 2 years ago

According to TrID, this disk image is SLF format, which appears to be specific to the SL9821 emulator (https://www.satotomi.com/sl9821/sl9821_dl.html). That being said, I haven't personally been able to get the emulator to run to verify, and I'm not sure if TrID is 100% accurate on this. If it is accurate, than this would be better suited to be a feature request for adding support for this format, and/or for the misidentification as a Spectrum Floppy Disk Image.

TheRogueArchivist commented 2 years ago

After further investigation, it doesn't seem to match the criteria for SLF, nor PC98 FDI. The header begins with "FDIMPQ", but in the context of where it was found, it seems unlikely to be associated with Spectrum FDI.

TheRogueArchivist commented 2 years ago

Since this is an (albeit unknown) image format, changing "bug" to "feature request" for supporting the format in question.