Unhandled exception while aborting DIC while hashing sectors #299

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

Originally created by @TheRogueArchivist on GitHub (Jan 3, 2020).

Prerequisites

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

Description

DIC crashes with an unhandled exception when aborting with ctrl+c while hashing sectors.

Output of command execution with debug output enabled

Hashing image file...
Aborting...
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 DiscImageChef.Core.Devices.Dumping.Dump.WriteOpticalSidecar(UInt32 blockSize, UInt64 blocks, MediaType mediaType, LayersType layers, Dictionary`2 mediaTags, Int32 sessions, Double& totalChkDuration) in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef.Core\Devices\Dumping\Metadata.cs:line 101
   at DiscImageChef.Core.Devices.Dumping.Dump.CompactDisc(MediaType& dskType) in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef.Core\Devices\Dumping\CompactDisc\Dump.cs:line 966
   at DiscImageChef.Core.Devices.Dumping.Dump.Mmc(MediaType& dskType) in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef.Core\Devices\Dumping\MMC.cs:line 197
   at DiscImageChef.Core.Devices.Dumping.Dump.Scsi() in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef.Core\Devices\Dumping\SCSI.cs:line 237
   at DiscImageChef.Core.Devices.Dumping.Dump.Start() in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef.Core\Devices\Dumping\Dump.cs:line 160
   at DiscImageChef.Commands.DumpMediaCommand.Invoke(Boolean debug, Boolean verbose, String cicmXml, String devicePath, Boolean resume, String encoding, Boolean firstPregap, Boolean fixOffset, Boolean force, Boolean noMetadata, Boolean noTrim, String outputPath, String options, Boolean persistent, UInt16 retryPasses, UInt32 skip, Byte speed, Boolean stopOnError, String format, String subchannel) in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef\Commands\DumpMedia.cs:line 430
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.CommandLine.Invocation.ModelBindingCommandHandler.<InvokeAsync>d__8.MoveNext() in /_/src/System.CommandLine/Invocation/ModelBindingCommandHandler.cs:line 62
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationPipeline.cs:line 56
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseParseErrorReporting>b__22_0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 367
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.CommandLine.Invocation.InvocationExtensions.<>c__DisplayClass8_0.<<UseTypoCorrections>b__0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 225
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseSuggestDirective>b__7_0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 206
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseParseDirective>b__6_0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 177
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseHelp>b__20_0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 335
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass4_0.<<UseVersionOption>b__0>d.MoveNext() in /_/src/System.CommandLine/Builder/CommandLineBuilderExtensions.cs:line 77
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<RegisterWithDotnetSuggest>b__23_0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 406
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.CommandLine.Invocation.InvocationExtensions.<>c__DisplayClass5_0.<<UseExceptionHandler>b__0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 142
Originally created by @TheRogueArchivist on GitHub (Jan 3, 2020). ### Prerequisites * [X] Are you running the latest version? * [X] Can you reproduce the problem in the debug version? ### Description DIC crashes with an unhandled exception when aborting with ctrl+c while hashing sectors. ### Output of command execution with debug output enabled ``` Hashing image file... Aborting... 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 DiscImageChef.Core.Devices.Dumping.Dump.WriteOpticalSidecar(UInt32 blockSize, UInt64 blocks, MediaType mediaType, LayersType layers, Dictionary`2 mediaTags, Int32 sessions, Double& totalChkDuration) in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef.Core\Devices\Dumping\Metadata.cs:line 101 at DiscImageChef.Core.Devices.Dumping.Dump.CompactDisc(MediaType& dskType) in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef.Core\Devices\Dumping\CompactDisc\Dump.cs:line 966 at DiscImageChef.Core.Devices.Dumping.Dump.Mmc(MediaType& dskType) in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef.Core\Devices\Dumping\MMC.cs:line 197 at DiscImageChef.Core.Devices.Dumping.Dump.Scsi() in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef.Core\Devices\Dumping\SCSI.cs:line 237 at DiscImageChef.Core.Devices.Dumping.Dump.Start() in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef.Core\Devices\Dumping\Dump.cs:line 160 at DiscImageChef.Commands.DumpMediaCommand.Invoke(Boolean debug, Boolean verbose, String cicmXml, String devicePath, Boolean resume, String encoding, Boolean firstPregap, Boolean fixOffset, Boolean force, Boolean noMetadata, Boolean noTrim, String outputPath, String options, Boolean persistent, UInt16 retryPasses, UInt32 skip, Byte speed, Boolean stopOnError, String format, String subchannel) in C:\Users\silas\Desktop\GIT\DICF pls work\DiscImageChef\DiscImageChef\Commands\DumpMedia.cs:line 430 --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.CommandLine.Invocation.ModelBindingCommandHandler.<InvokeAsync>d__8.MoveNext() in /_/src/System.CommandLine/Invocation/ModelBindingCommandHandler.cs:line 62 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationPipeline.cs:line 56 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseParseErrorReporting>b__22_0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 367 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Invocation.InvocationExtensions.<>c__DisplayClass8_0.<<UseTypoCorrections>b__0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 225 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseSuggestDirective>b__7_0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 206 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseParseDirective>b__6_0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 177 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseHelp>b__20_0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 335 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass4_0.<<UseVersionOption>b__0>d.MoveNext() in /_/src/System.CommandLine/Builder/CommandLineBuilderExtensions.cs:line 77 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Invocation.InvocationExtensions.<>c.<<RegisterWithDotnetSuggest>b__23_0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 406 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Invocation.InvocationExtensions.<>c__DisplayClass5_0.<<UseExceptionHandler>b__0>d.MoveNext() in /_/src/System.CommandLine/Invocation/InvocationExtensions.cs:line 142 ```
Author
Owner

@TheRogueArchivist commented on GitHub (Mar 9, 2020):

Error as of latest commit: https://pastebin.com/tyXAfxzM

@TheRogueArchivist commented on GitHub (Mar 9, 2020): Error as of latest commit: https://pastebin.com/tyXAfxzM
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#299