Commands accessing devices crash using USB to IDE adapter #804

Open
opened 2026-01-29 15:30:05 +00:00 by claunia · 0 comments
Owner

Originally created by @TheRogueArchivist on GitHub (Sep 14, 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
  • Device manufacturer:
  • Model:
  • Bus:
    • Parallel ATA
    • Serial ATA
    • SCSI (any)
    • ATAPI (mark above if parallel or serial)
    • USB
      • USB cable manufacturer:
      • USB cable model:
    • FireWire
    • PCMCIA
    • SecureDigital
      • Using a USB card reader
        • USB card reader manufacturer:
        • USB card reader model:
    • MultiMediaCard
      • Using a USB card reader
        • USB card reader manufacturer:
        • USB card reader model:
  • I was dumping media (disk, tape, etc)...
  • I was analyzing media (disk, tape, etc)...
  • I was scanning media (disk, tape, etc)...

Description

Most if not all device commands crash when being used on my PX-4012A using a USB to IDE adapter. Tested commands including media dump, media scan, media info, and device info.

Output of command execution with debug output enabled

aaru 5.3.0-rc1+3753f333 built by serket in Release, modified
Copyright c 2011-2021 Natalia Portillo

Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Runtime.InteropServices.MarshalDirectiveException: Cannot marshal 'parameter #3': Internal limitation: structure is too complex or too large.
   at Aaru.Devices.Windows.Extern.DeviceIoControlAta(SafeFileHandle hDevice, WindowsIoctl ioControlCode, AtaPassThroughExBuffer& inBuffer, UInt32 nInBufferSize, AtaPassThroughExBuffer& outBuffer, UInt32 nOutBufferSize, UInt32& pBytesReturned, IntPtr overlapped)
   at Aaru.Devices.Windows.Command.SendAtaCommand(SafeFileHandle fd, AtaRegistersChs registers, AtaErrorRegistersChs& errorRegisters, AtaProtocol protocol, Byte[]& buffer, UInt32 timeout, Double& duration, Boolean& sense) in /home/claunia/Development/Aaru/Aaru/Aaru.Devices/Windows/Command.cs:line 201
   at Aaru.Devices.Command.SendAtaCommand(PlatformID ptId, Object fd, AtaRegistersChs registers, AtaErrorRegistersChs& errorRegisters, AtaProtocol protocol, AtaTransferRegister transferRegister, Byte[]& buffer, UInt32 timeout, Boolean transferBlocks, Double& duration, Boolean& sense) in /home/claunia/Development/Aaru/Aaru/Aaru.Devices/Command.cs:line 250
   at Aaru.Devices.Device.SendAtaCommand(AtaRegistersChs registers, AtaErrorRegistersChs& errorRegisters, AtaProtocol protocol, AtaTransferRegister transferRegister, Byte[]& buffer, UInt32 timeout, Boolean transferBlocks, Double& duration, Boolean& sense) in /home/claunia/Development/Aaru/Aaru/Aaru.Devices/Device/Commands.cs:line 95
   at Aaru.Devices.Device.AtapiIdentify(Byte[]& buffer, AtaErrorRegistersChs& statusRegisters, UInt32 timeout, Double& duration) in /home/claunia/Development/Aaru/Aaru/Aaru.Devices/Device/AtaCommands/Atapi.cs:line 79
   at Aaru.Devices.Device..ctor(String devicePath) in /home/claunia/Development/Aaru/Aaru/Aaru.Devices/Device/Constructor.cs:line 832
   at Aaru.Commands.Device.DeviceInfoCommand.Invoke(Boolean debug, Boolean verbose, String devicePath, String outputPrefix)
   --- 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()

Media details

Originally created by @TheRogueArchivist on GitHub (Sep 14, 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 * **Device manufacturer**: * **Model**: * **Bus**: * [ ] Parallel ATA * [ ] Serial ATA * [ ] SCSI (any) * [ ] ATAPI (mark above if parallel or serial) * [ ] USB * **USB cable manufacturer**: * **USB cable model**: * [ ] FireWire * [ ] PCMCIA * [ ] SecureDigital * [ ] Using a USB card reader * **USB card reader manufacturer**: * **USB card reader model**: * [ ] MultiMediaCard * [ ] Using a USB card reader * **USB card reader manufacturer**: * **USB card reader model**: * [X] I was dumping media (disk, tape, etc)... * [X] I was analyzing media (disk, tape, etc)... * [X] I was scanning media (disk, tape, etc)... ### Description Most if not all device commands crash when being used on my PX-4012A using a USB to IDE adapter. Tested commands including media dump, media scan, media info, and device info. ### Output of command execution with debug output enabled ``` aaru 5.3.0-rc1+3753f333 built by serket in Release, modified Copyright c 2011-2021 Natalia Portillo Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.MarshalDirectiveException: Cannot marshal 'parameter #3': Internal limitation: structure is too complex or too large. at Aaru.Devices.Windows.Extern.DeviceIoControlAta(SafeFileHandle hDevice, WindowsIoctl ioControlCode, AtaPassThroughExBuffer& inBuffer, UInt32 nInBufferSize, AtaPassThroughExBuffer& outBuffer, UInt32 nOutBufferSize, UInt32& pBytesReturned, IntPtr overlapped) at Aaru.Devices.Windows.Command.SendAtaCommand(SafeFileHandle fd, AtaRegistersChs registers, AtaErrorRegistersChs& errorRegisters, AtaProtocol protocol, Byte[]& buffer, UInt32 timeout, Double& duration, Boolean& sense) in /home/claunia/Development/Aaru/Aaru/Aaru.Devices/Windows/Command.cs:line 201 at Aaru.Devices.Command.SendAtaCommand(PlatformID ptId, Object fd, AtaRegistersChs registers, AtaErrorRegistersChs& errorRegisters, AtaProtocol protocol, AtaTransferRegister transferRegister, Byte[]& buffer, UInt32 timeout, Boolean transferBlocks, Double& duration, Boolean& sense) in /home/claunia/Development/Aaru/Aaru/Aaru.Devices/Command.cs:line 250 at Aaru.Devices.Device.SendAtaCommand(AtaRegistersChs registers, AtaErrorRegistersChs& errorRegisters, AtaProtocol protocol, AtaTransferRegister transferRegister, Byte[]& buffer, UInt32 timeout, Boolean transferBlocks, Double& duration, Boolean& sense) in /home/claunia/Development/Aaru/Aaru/Aaru.Devices/Device/Commands.cs:line 95 at Aaru.Devices.Device.AtapiIdentify(Byte[]& buffer, AtaErrorRegistersChs& statusRegisters, UInt32 timeout, Double& duration) in /home/claunia/Development/Aaru/Aaru/Aaru.Devices/Device/AtaCommands/Atapi.cs:line 79 at Aaru.Devices.Device..ctor(String devicePath) in /home/claunia/Development/Aaru/Aaru/Aaru.Devices/Device/Constructor.cs:line 832 at Aaru.Commands.Device.DeviceInfoCommand.Invoke(Boolean debug, Boolean verbose, String devicePath, String outputPrefix) --- 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() ``` ### Media details <!-- Photo, EAN-13, if possible eBay link -->
claunia added the bug label 2026-01-29 15:30:05 +00:00
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#804