"Unhandled Exception: System.NullReferenceException" when dumping from a USB card reader #282

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

Originally created by @TheRogueArchivist on GitHub (Oct 26, 2019).

Prerequisites

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

Check and fill as appropiate:

  • I was running DiscImageChef under Windows 10...
  • ...in 64-bit

Description

Dumping both a micro SD card and a memory stick using a USB reader crashes DIC, both with the same error (Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.). The adapter is https://www.amazon.com/UGREEN-Reader-Adapter-5Gbps-Simultaneously/dp/B01ARAH6O0/.
SD.log

Exact command line used:

dotnet .\DiscImageChef.dll dump-media E: "SD.dicf" -d -v

If command was expected to work with a device fill this:

  • Manufacturer: UGREEN
  • Model:
  • Bus:
    • Parallel ATA
    • Serial ATA
    • SCSI (any)
    • ATAPI (mark above if parallel or serial)
    • USB
    • FireWire
    • PCMCIA
    • SecureDigital
    • MultiMediaCard

Output of command execution with debug output enabled

DiscImageChef 4.5.99.1693-00000000 built by DESKTOP-8B4K7NM in Debug
Copyright c 2011-2019 Natalia Portillo

DEBUG (Dump-Media command): --cicm-xml=
DEBUG (Dump-Media command): --debug=True
DEBUG (Dump-Media command): --device=E:
DEBUG (Dump-Media command): --encoding=
DEBUG (Dump-Media command): --first-pregap=False
DEBUG (Dump-Media command): --force=False
DEBUG (Dump-Media command): --force=False
DEBUG (Dump-Media command): --format=
DEBUG (Dump-Media command): --no-metadata=False
DEBUG (Dump-Media command): --options=Mono.Options.OptionSet
DEBUG (Dump-Media command): --output=SD.dicf
DEBUG (Dump-Media command): --persistent=False
DEBUG (Dump-Media command): --resume=True
DEBUG (Dump-Media command): --retry-passes=5
DEBUG (Dump-Media command): --skip=512
DEBUG (Dump-Media command): --stop-on-error=False
DEBUG (Dump-Media command): --verbose=True
DEBUG (Dump-Media command): Parsed options:
DEBUG (SCSI Device): INQUIRY took 0.6642 ms.
DEBUG (SCSI Device): INQUIRY took 0.3068 ms.
DEBUG (ATA Device): IDENTIFY PACKET DEVICE took 1.0424 ms.
Output image format: DiscImageChef format (49360069-1784-4a2f-b723-0c844d610b0a).
DEBUG (SCSI Device): TEST UNIT READY took 0.2889 ms.

DEBUG (SCSI Device): READ CAPACITY took 0.2928 ms.
Uploading statistics
DEBUG (SCSI Device): READ (6) took 0.9028 ms.
DEBUG (SCSI Device): READ (10) took 0.7315 ms.
DEBUG (SCSI Device): READ (12) took 1.2045 ms.
DEBUG (SCSI Device): READ (16) took 1.1471 ms.
DEBUG (SCSI Device): SEEK (6) took 0.8094 ms.
DEBUG (SCSI Device): SEEK (10) took 0.812 ms.
Using SCSI READ (10) command.
Media has 3994624 blocks of 512 bytes/each. (for a total of 2045247488 bytes)
DEBUG (SCSI Device): READ (10) took 6.2157 ms.
DEBUG (SCSI Device): INQUIRY took 0.6157 ms.
Requesting MODE SENSE (10).
DEBUG (SCSI Device): MODE SENSE(10) took 0.299 ms.
DEBUG (SCSI Device): MODE SENSE(10) took 0.2865 ms.
Requesting MODE SENSE (6).
DEBUG (SCSI Device): MODE SENSE(6) took 0.2894 ms.
Device reports 3994624 blocks (2045247488 bytes).
Device can read 64 blocks at a time.
Device reports 512 bytes per logical block.
Device reports 512 bytes per physical block.
SCSI device type: DirectAccess.
SCSI medium type: 0.
SCSI density type: 0.
SCSI floppy mode page present: False.
Media identified as Unknown
Reading 64 sectors at a time.
DEBUG (DiscImageChef format plugin): Got a shift of 12 for 4096 sectors per block
DEBUG (DiscImageChef format plugin): In memory DDT?: True

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at DiscImageChef.Core.Devices.Dumping.Dump.Sbc(Dictionary`2 mediaTags, MediaType& dskType, Boolean opticalDisc) in C:\Users\silas\Desktop\GIT\DiscImageChef\trunk\DiscImageChef.Core\Devices\Dumping\SBC.cs:line 318
   at DiscImageChef.Core.Devices.Dumping.Dump.Scsi() in C:\Users\silas\Desktop\GIT\DiscImageChef\trunk\DiscImageChef.Core\Devices\Dumping\SCSI.cs:line 214
   at DiscImageChef.Core.Devices.Dumping.Dump.Start() in C:\Users\silas\Desktop\GIT\DiscImageChef\trunk\DiscImageChef.Core\Devices\Dumping\Dump.cs:line 118
   at DiscImageChef.Commands.DumpMediaCommand.Invoke(IEnumerable`1 arguments) in C:\Users\silas\Desktop\GIT\DiscImageChef\trunk\DiscImageChef\Commands\DumpMedia.cs:line 307
   at Mono.Options.CommandSet.Run(IEnumerable`1 arguments)
   at DiscImageChef.MainClass.Main(String[] args) in C:\Users\silas\Desktop\GIT\DiscImageChef\trunk\DiscImageChef\Main.cs:line 157
Originally created by @TheRogueArchivist on GitHub (Oct 26, 2019). ### Prerequisites * [X] Are you running the latest version? * [X] Can you reproduce the problem in the debug version? ### Check and fill as appropiate: * [X] I was running DiscImageChef under Windows 10... * [X] ...in 64-bit ### Description Dumping both a micro SD card and a memory stick using a USB reader crashes DIC, both with the same error (Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.). The adapter is https://www.amazon.com/UGREEN-Reader-Adapter-5Gbps-Simultaneously/dp/B01ARAH6O0/. [SD.log](https://github.com/discimagechef/DiscImageChef/files/3774271/SD.log) ### Exact command line used: `dotnet .\DiscImageChef.dll dump-media E: "SD.dicf" -d -v` ### If command was expected to work with a device fill this: * **Manufacturer**: UGREEN * **Model**: * **Bus**: * [ ] Parallel ATA * [ ] Serial ATA * [ ] SCSI (any) * [ ] ATAPI (mark above if parallel or serial) * [X] USB * [ ] FireWire * [ ] PCMCIA * [X] SecureDigital * [ ] MultiMediaCard ### Output of command execution with debug output enabled ``` DiscImageChef 4.5.99.1693-00000000 built by DESKTOP-8B4K7NM in Debug Copyright c 2011-2019 Natalia Portillo DEBUG (Dump-Media command): --cicm-xml= DEBUG (Dump-Media command): --debug=True DEBUG (Dump-Media command): --device=E: DEBUG (Dump-Media command): --encoding= DEBUG (Dump-Media command): --first-pregap=False DEBUG (Dump-Media command): --force=False DEBUG (Dump-Media command): --force=False DEBUG (Dump-Media command): --format= DEBUG (Dump-Media command): --no-metadata=False DEBUG (Dump-Media command): --options=Mono.Options.OptionSet DEBUG (Dump-Media command): --output=SD.dicf DEBUG (Dump-Media command): --persistent=False DEBUG (Dump-Media command): --resume=True DEBUG (Dump-Media command): --retry-passes=5 DEBUG (Dump-Media command): --skip=512 DEBUG (Dump-Media command): --stop-on-error=False DEBUG (Dump-Media command): --verbose=True DEBUG (Dump-Media command): Parsed options: DEBUG (SCSI Device): INQUIRY took 0.6642 ms. DEBUG (SCSI Device): INQUIRY took 0.3068 ms. DEBUG (ATA Device): IDENTIFY PACKET DEVICE took 1.0424 ms. Output image format: DiscImageChef format (49360069-1784-4a2f-b723-0c844d610b0a). DEBUG (SCSI Device): TEST UNIT READY took 0.2889 ms. DEBUG (SCSI Device): READ CAPACITY took 0.2928 ms. Uploading statistics DEBUG (SCSI Device): READ (6) took 0.9028 ms. DEBUG (SCSI Device): READ (10) took 0.7315 ms. DEBUG (SCSI Device): READ (12) took 1.2045 ms. DEBUG (SCSI Device): READ (16) took 1.1471 ms. DEBUG (SCSI Device): SEEK (6) took 0.8094 ms. DEBUG (SCSI Device): SEEK (10) took 0.812 ms. Using SCSI READ (10) command. Media has 3994624 blocks of 512 bytes/each. (for a total of 2045247488 bytes) DEBUG (SCSI Device): READ (10) took 6.2157 ms. DEBUG (SCSI Device): INQUIRY took 0.6157 ms. Requesting MODE SENSE (10). DEBUG (SCSI Device): MODE SENSE(10) took 0.299 ms. DEBUG (SCSI Device): MODE SENSE(10) took 0.2865 ms. Requesting MODE SENSE (6). DEBUG (SCSI Device): MODE SENSE(6) took 0.2894 ms. Device reports 3994624 blocks (2045247488 bytes). Device can read 64 blocks at a time. Device reports 512 bytes per logical block. Device reports 512 bytes per physical block. SCSI device type: DirectAccess. SCSI medium type: 0. SCSI density type: 0. SCSI floppy mode page present: False. Media identified as Unknown Reading 64 sectors at a time. DEBUG (DiscImageChef format plugin): Got a shift of 12 for 4096 sectors per block DEBUG (DiscImageChef format plugin): In memory DDT?: True Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at DiscImageChef.Core.Devices.Dumping.Dump.Sbc(Dictionary`2 mediaTags, MediaType& dskType, Boolean opticalDisc) in C:\Users\silas\Desktop\GIT\DiscImageChef\trunk\DiscImageChef.Core\Devices\Dumping\SBC.cs:line 318 at DiscImageChef.Core.Devices.Dumping.Dump.Scsi() in C:\Users\silas\Desktop\GIT\DiscImageChef\trunk\DiscImageChef.Core\Devices\Dumping\SCSI.cs:line 214 at DiscImageChef.Core.Devices.Dumping.Dump.Start() in C:\Users\silas\Desktop\GIT\DiscImageChef\trunk\DiscImageChef.Core\Devices\Dumping\Dump.cs:line 118 at DiscImageChef.Commands.DumpMediaCommand.Invoke(IEnumerable`1 arguments) in C:\Users\silas\Desktop\GIT\DiscImageChef\trunk\DiscImageChef\Commands\DumpMedia.cs:line 307 at Mono.Options.CommandSet.Run(IEnumerable`1 arguments) at DiscImageChef.MainClass.Main(String[] args) in C:\Users\silas\Desktop\GIT\DiscImageChef\trunk\DiscImageChef\Main.cs:line 157 ```
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#282