[Aaru Format] "Index was outside the bounds of the array." converting CCD image of multi-session disc to Aaru Format #759

Closed
opened 2026-01-29 15:28:48 +00:00 by claunia · 1 comment
Owner

Originally created by @TheRogueArchivist on GitHub (Jun 18, 2021).

Prerequisites

  • Are you running the latest version?
  • Can you reproduce the problem in the debug version?

Check and fill as appropriate:

  • I was running Aaru under Windows 10...
  • I was running Aaru under Linux [version here]...
  • I was running Aaru under macOS [version here]...
  • ...in 32-bit
  • ...in 64-bit
  • ...using an Intel / AMD processor
  • ...using an ARM or Apple Silicon processor
    • Image format: CCD
    • Application that created the image: DIC
  • I was converting the image...
    • ...Destination image format: Aaru Format
  • I was listing the filesystem contents...
  • I was extracting the filesystem contents...
    • ...Filesystem:
    • Analyze command recognizes the filesystem
  • I was creating a metadata sidecar
  • I was checksumming the image
  • I was verifying the image

Description

When converting a CCD image of a multi-session created by DIC to Aaru Format, Aaru crashes with "System.IndexOutOfRangeException: Index was outside the bounds of the array.".

Exact command line used:

aaru i convert .\OEP.ccd .\OEP-DIC.aaruf

Output of command execution with debug output enabled

aaru 5.2.99.3380-alpha+4ec6710b built by DESKTOP-8B4K7NM in Debug, modified
Copyright c 2011-2021 Natalia Portillo

Input image format identified by CloneCD.
Output image format: Aaru Format.
Converting media tag CD_FullTOC
303277 sectors to convert
Converting sectors 303231 to 303295 in track 7 (99.98% done)Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Aaru.DiscImages.AaruFormat.WriteSectorLong(Byte[] data, UInt64 sectorAddress) in C:\Users\silas\Desktop\GIT\Aaru\Aaru.Images\AaruFormat\Write.cs:line 2007
   at Aaru.DiscImages.AaruFormat.WriteSectorsLong(Byte[] data, UInt64 sectorAddress, UInt32 length) in C:\Users\silas\Desktop\GIT\Aaru\Aaru.Images\AaruFormat\Write.cs:line 2326
   at Aaru.Commands.Image.ConvertImageCommand.Invoke(Boolean verbose, Boolean debug, String cicmXml, String comments, Int32 count, String creator, String driveFirmwareRevision, String driveManufacturer, String driveModel, String driveSerialNumber, Boolean force, String inputPath, Int32 lastMediaSequence, String mediaBarcode, String mediaManufacturer, String mediaModel, String mediaPartNumber, Int32 mediaSequence, String mediaSerialNumber, String mediaTitle, String outputPath, String options, String resumeFile, String format, String geometry, Boolean fixSubchannelPosition, Boolean fixSubchannel, Boolean fixSubchannelCrc, Boolean generateSubchannels) in C:\Users\silas\Desktop\GIT\Aaru\Aaru\Commands\Image\Convert.cs:line 736
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] 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.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__19_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__20_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__10_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__9_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseExceptionHandler>b__0>d.MoveNext()

Image

https://we.tl/t-XyWWhqpIc6

Originally created by @TheRogueArchivist on GitHub (Jun 18, 2021). ### Prerequisites * [X] Are you running the latest version? * [X] Can you reproduce the problem in the debug version? ### Check and fill as appropriate: * [X] I was running Aaru under Windows 10... * [ ] I was running Aaru under Linux [version here]... * [ ] I was running Aaru under macOS [version here]... * [ ] ...in 32-bit * [X] ...in 64-bit * [X] ...using an Intel / AMD processor * [ ] ...using an ARM or Apple Silicon processor * **Image format**: CCD * **Application that created the image**: DIC * [X] I was converting the image... * ...**Destination image format**: Aaru Format * [ ] I was listing the filesystem contents... * [ ] I was extracting the filesystem contents... * ...**Filesystem**: * [ ] Analyze command recognizes the filesystem * [ ] I was creating a metadata sidecar * [ ] I was checksumming the image * [ ] I was verifying the image ### Description <!-- Description of the bug --> When converting a CCD image of a multi-session created by DIC to Aaru Format, Aaru crashes with "System.IndexOutOfRangeException: Index was outside the bounds of the array.". ### Exact command line used: `aaru i convert .\OEP.ccd .\OEP-DIC.aaruf` ### Output of command execution with debug output enabled ``` aaru 5.2.99.3380-alpha+4ec6710b built by DESKTOP-8B4K7NM in Debug, modified Copyright c 2011-2021 Natalia Portillo Input image format identified by CloneCD. Output image format: Aaru Format. Converting media tag CD_FullTOC 303277 sectors to convert Converting sectors 303231 to 303295 in track 7 (99.98% done)Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at Aaru.DiscImages.AaruFormat.WriteSectorLong(Byte[] data, UInt64 sectorAddress) in C:\Users\silas\Desktop\GIT\Aaru\Aaru.Images\AaruFormat\Write.cs:line 2007 at Aaru.DiscImages.AaruFormat.WriteSectorsLong(Byte[] data, UInt64 sectorAddress, UInt32 length) in C:\Users\silas\Desktop\GIT\Aaru\Aaru.Images\AaruFormat\Write.cs:line 2326 at Aaru.Commands.Image.ConvertImageCommand.Invoke(Boolean verbose, Boolean debug, String cicmXml, String comments, Int32 count, String creator, String driveFirmwareRevision, String driveManufacturer, String driveModel, String driveSerialNumber, Boolean force, String inputPath, Int32 lastMediaSequence, String mediaBarcode, String mediaManufacturer, String mediaModel, String mediaPartNumber, Int32 mediaSequence, String mediaSerialNumber, String mediaTitle, String outputPath, String options, String resumeFile, String format, String geometry, Boolean fixSubchannelPosition, Boolean fixSubchannel, Boolean fixSubchannelCrc, Boolean generateSubchannels) in C:\Users\silas\Desktop\GIT\Aaru\Aaru\Commands\Image\Convert.cs:line 736 --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] 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.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__19_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseHelp>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseTypoCorrections>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__20_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__18_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__10_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__9_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseExceptionHandler>b__0>d.MoveNext() ``` ### Image <!-- Upload the image, compressed and with the number of this issue. --> <!--- If the image contains personal data contact the project lead, and the image contents will be handled confidentially under the GDPR requirements. --> https://we.tl/t-XyWWhqpIc6
claunia added the bugdump image format labels 2026-01-29 15:28:48 +00:00
Author
Owner

@TheRogueArchivist commented on GitHub (Jul 11, 2021):

Fixed as of newest commit.

@TheRogueArchivist commented on GitHub (Jul 11, 2021): Fixed as of newest commit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aaru-dps/Aaru-aaru-dps#759