Crash during device report of CD drive #459

Closed
opened 2026-01-29 15:19:22 +00:00 by claunia · 0 comments
Owner

Originally created by @TheRogueArchivist on GitHub (Jul 26, 2020).

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 Xubuntu 20.04...
  • ...in 64-bit

Description

Device report crashes after having it read a CD-ROM with the error
"Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation."

Exact command line used:

aaru -d dev report /dev/sr0

Output of command execution with debug output enabled

aaru 5.1.99.3216+011ec1e3 built by silas-All-Series in Debug
Copyright © 2011-2020 Natalia Portillo

DEBUG (Device-Report command): --debug=True
DEBUG (Device-Report command): --device=/dev/sr0
DEBUG (Device-Report command): --verbose=False
DEBUG (SCSI Device): INQUIRY took 0.5623 ms.
DEBUG (ATA Device): IDENTIFY PACKET DEVICE took 4 ms.
DEBUG (SCSI Device): GET CONFIGURATION (Starting Feature Number: 264, Return Type: Single, Sense: False, Last Error: 0) took 0.8529 ms.
Querying ATAPI IDENTIFY...
DEBUG (ATA Device): IDENTIFY PACKET DEVICE took 4 ms.
Is the media removable from the reading/writing elements (flash memories ARE NOT removable)? (Y/N): y
DEBUG (SCSI Device): PREVENT ALLOW MEDIUM REMOVAL (Persistent: False, Prevent: False, Sense: False, LastError: 0) took 4 ms.
DEBUG (SCSI Device): START STOP UNIT (Immediate: False, FormatLayer: 0, Power Conditions: 0, Change Format Layer: False, Load/Eject: True, Start: False, Sense: False, Last Error: 0) took 5100 ms.
Please remove any media from the device and press any key when it is out.
Querying SCSI INQUIRY...
DEBUG (SCSI Device): INQUIRY took 4 ms.
Querying list of SCSI EVPDs...
Querying all mode pages and subpages using SCSI MODE SENSE (10)...
Querying all mode pages using SCSI MODE SENSE (10)...
DEBUG (SCSI Device): MODE SENSE(10) took 0.9693 ms.
DEBUG (SCSI Device): MODE SENSE(10) took 1.1412 ms.
DEBUG (SCSI Device): MODE SENSE(10) took 0.9852 ms.
Querying all mode pages and subpages using SCSI MODE SENSE (6)...
Querying all mode pages using SCSI MODE SENSE (6)...
DEBUG (SCSI Device): MODE SENSE(6) took 1.1081 ms.
DEBUG (SCSI Device): MODE SENSE(6) took 4 ms.
DEBUG (SCSI Device): MODE SENSE(6) took 1.1281 ms.
Querying MMC GET CONFIGURATION...
DEBUG (SCSI Device): GET CONFIGURATION (Starting Feature Number: 0, Return Type: All, Sense: False, Last Error: 0) took 1.346 ms.
Do you have want to try NEC vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): y
Do you have want to try Pioneer vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): y
Do you have want to try HL-DT-ST (aka LG) vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): y
Do you have want to try MediaTek vendor command F1h subcommand 06h? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): y
Do you have a Audio CD disc that you can insert in the drive? (Y/N): n
Do you have a CD-R disc that you can insert in the drive? (Y/N): n
Do you have a CD-ROM disc that you can insert in the drive? (Y/N): y
Please insert it in the drive and press any key when it is ready.
DEBUG (SCSI Device): TEST UNIT READY took 28 ms.
Waiting for drive to become readyDEBUG (SCSI Device): TEST UNIT READY took 0.3856 ms.

Querying SCSI READ CAPACITY...
DEBUG (SCSI Device): READ CAPACITY took 0.3753 ms.
Querying SCSI READ CAPACITY (16)...
DEBUG (SCSI Device): READ CAPACITY(16) took 0 ms.
Querying SCSI MODE SENSE (10)...
DEBUG (SCSI Device): MODE SENSE(10) took 4 ms.
Querying SCSI MODE SENSE...
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Aaru.Core.Devices.Report.DeviceReport.ReportMmcMedia(String mediaType, Boolean tryPlextor, Boolean tryPioneer, Boolean tryNec, Boolean tryHldtst, Boolean tryMediaTekF106) in /home/silas/Desktop/Aaru/Aaru.Core/Devices/Report/MMC.cs:line 635
   at Aaru.Commands.Device.DeviceReportCommand.Invoke(Boolean debug, Boolean verbose, String devicePath, Boolean trapDisc) in /home/silas/Desktop/Aaru/Aaru/Commands/Device/DeviceReport.cs:line 947
   --- 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()
Originally created by @TheRogueArchivist on GitHub (Jul 26, 2020). ### 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 Xubuntu 20.04... * [X] ...in 64-bit ### Description Device report crashes after having it read a CD-ROM with the error "Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation." ### Exact command line used: `aaru -d dev report /dev/sr0` ### Output of command execution with debug output enabled ``` aaru 5.1.99.3216+011ec1e3 built by silas-All-Series in Debug Copyright © 2011-2020 Natalia Portillo DEBUG (Device-Report command): --debug=True DEBUG (Device-Report command): --device=/dev/sr0 DEBUG (Device-Report command): --verbose=False DEBUG (SCSI Device): INQUIRY took 0.5623 ms. DEBUG (ATA Device): IDENTIFY PACKET DEVICE took 4 ms. DEBUG (SCSI Device): GET CONFIGURATION (Starting Feature Number: 264, Return Type: Single, Sense: False, Last Error: 0) took 0.8529 ms. Querying ATAPI IDENTIFY... DEBUG (ATA Device): IDENTIFY PACKET DEVICE took 4 ms. Is the media removable from the reading/writing elements (flash memories ARE NOT removable)? (Y/N): y DEBUG (SCSI Device): PREVENT ALLOW MEDIUM REMOVAL (Persistent: False, Prevent: False, Sense: False, LastError: 0) took 4 ms. DEBUG (SCSI Device): START STOP UNIT (Immediate: False, FormatLayer: 0, Power Conditions: 0, Change Format Layer: False, Load/Eject: True, Start: False, Sense: False, Last Error: 0) took 5100 ms. Please remove any media from the device and press any key when it is out. Querying SCSI INQUIRY... DEBUG (SCSI Device): INQUIRY took 4 ms. Querying list of SCSI EVPDs... Querying all mode pages and subpages using SCSI MODE SENSE (10)... Querying all mode pages using SCSI MODE SENSE (10)... DEBUG (SCSI Device): MODE SENSE(10) took 0.9693 ms. DEBUG (SCSI Device): MODE SENSE(10) took 1.1412 ms. DEBUG (SCSI Device): MODE SENSE(10) took 0.9852 ms. Querying all mode pages and subpages using SCSI MODE SENSE (6)... Querying all mode pages using SCSI MODE SENSE (6)... DEBUG (SCSI Device): MODE SENSE(6) took 1.1081 ms. DEBUG (SCSI Device): MODE SENSE(6) took 4 ms. DEBUG (SCSI Device): MODE SENSE(6) took 1.1281 ms. Querying MMC GET CONFIGURATION... DEBUG (SCSI Device): GET CONFIGURATION (Starting Feature Number: 0, Return Type: All, Sense: False, Last Error: 0) took 1.346 ms. Do you have want to try NEC vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): y Do you have want to try Pioneer vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): y Do you have want to try HL-DT-ST (aka LG) vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): y Do you have want to try MediaTek vendor command F1h subcommand 06h? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): y Do you have a Audio CD disc that you can insert in the drive? (Y/N): n Do you have a CD-R disc that you can insert in the drive? (Y/N): n Do you have a CD-ROM disc that you can insert in the drive? (Y/N): y Please insert it in the drive and press any key when it is ready. DEBUG (SCSI Device): TEST UNIT READY took 28 ms. Waiting for drive to become readyDEBUG (SCSI Device): TEST UNIT READY took 0.3856 ms. Querying SCSI READ CAPACITY... DEBUG (SCSI Device): READ CAPACITY took 0.3753 ms. Querying SCSI READ CAPACITY (16)... DEBUG (SCSI Device): READ CAPACITY(16) took 0 ms. Querying SCSI MODE SENSE (10)... DEBUG (SCSI Device): MODE SENSE(10) took 4 ms. Querying SCSI MODE SENSE... Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Aaru.Core.Devices.Report.DeviceReport.ReportMmcMedia(String mediaType, Boolean tryPlextor, Boolean tryPioneer, Boolean tryNec, Boolean tryHldtst, Boolean tryMediaTekF106) in /home/silas/Desktop/Aaru/Aaru.Core/Devices/Report/MMC.cs:line 635 at Aaru.Commands.Device.DeviceReportCommand.Invoke(Boolean debug, Boolean verbose, String devicePath, Boolean trapDisc) in /home/silas/Desktop/Aaru/Aaru/Commands/Device/DeviceReport.cs:line 947 --- 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() ```
claunia added the bug label 2026-01-29 15:19:22 +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#459