Exception in WriteSectorTag while dumping CDR #502

Closed
opened 2026-01-29 15:20:41 +00:00 by claunia · 2 comments
Owner

Originally created by @robin-francois on GitHub (Oct 23, 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 Linux 5.1.0.3214...
  • ...in 64-bit

Description

While dumping a CDR, at the end of the reading process, aaru stops with an unhandled exception
The same CDR has been successfully processed by a dd command.

Exact command line used:

aaru -d m dump /dev/sr0 debug/cd.aaru

Expected behaviour:

[What you expected to happen]

Actual behaviour:

Reading sector 165747 of 168572 (0,894 MiB/sec.)DEBUG (SCSI Device): READ CD (LBA: 165747, Block Size: 2448, Transfer Length: 32, Expected Sector Type: AllTypes, DAP: False, Relative Address: False, Sync: True, Headers: AllHeaders, User Data: True, ECC/EDC: True, C2: None, Subchannel: Raw, Sense: False, Last Error: 0) took 88 ms.
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.DiscImages.AaruFormat.WriteSectorTag(Byte[] data, UInt64 sectorAddress, SectorTagType tag)
   at Aaru.Core.Media.CompactDisc.WriteSubchannelToImage(MmcSubchannel supportedSubchannel, MmcSubchannel desiredSubchannel, Byte[] sub, UInt64 sectorAddress, UInt32 length, SubchannelLog subLog, Dictionary`2 isrcs, Byte currentTrack, String& mcn, Track[] tracks, HashSet`1 subchannelExtents, Boolean fixSubchannelPosition, IWritableImage outputPlugin, Boolean fixSubchannel, Boolean fixSubchannelCrc, DumpLog dumpLog, UpdateStatusHandler updateStatus, Dictionary`2 smallestPregapLbaPerTrack) in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Media/CompactDisc.cs:line 248

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

  • Manufacturer: TSSTcorp
  • Model: BDDVDW SE-506CB
  • Bus:
    • USB

Output of command execution with debug output enabled

See attached files:
cd.debug.txt
cd.log.txt

Originally created by @robin-francois on GitHub (Oct 23, 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 Linux `5.1.0.3214`... * [x] ...in 64-bit ### Description While dumping a CDR, at the end of the reading process, aaru stops with an unhandled exception The same CDR has been successfully processed by a `dd` command. ### Exact command line used: `aaru -d m dump /dev/sr0 debug/cd.aaru` ### Expected behaviour: [What you expected to happen] ### Actual behaviour: ``` Reading sector 165747 of 168572 (0,894 MiB/sec.)DEBUG (SCSI Device): READ CD (LBA: 165747, Block Size: 2448, Transfer Length: 32, Expected Sector Type: AllTypes, DAP: False, Relative Address: False, Sync: True, Headers: AllHeaders, User Data: True, ECC/EDC: True, C2: None, Subchannel: Raw, Sense: False, Last Error: 0) took 88 ms. 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.DiscImages.AaruFormat.WriteSectorTag(Byte[] data, UInt64 sectorAddress, SectorTagType tag) at Aaru.Core.Media.CompactDisc.WriteSubchannelToImage(MmcSubchannel supportedSubchannel, MmcSubchannel desiredSubchannel, Byte[] sub, UInt64 sectorAddress, UInt32 length, SubchannelLog subLog, Dictionary`2 isrcs, Byte currentTrack, String& mcn, Track[] tracks, HashSet`1 subchannelExtents, Boolean fixSubchannelPosition, IWritableImage outputPlugin, Boolean fixSubchannel, Boolean fixSubchannelCrc, DumpLog dumpLog, UpdateStatusHandler updateStatus, Dictionary`2 smallestPregapLbaPerTrack) in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Media/CompactDisc.cs:line 248 ``` ### If command was expected to work with a device fill this out: * **Manufacturer**: TSSTcorp * **Model**: BDDVDW SE-506CB * **Bus**: * [x] USB ### Output of command execution with debug output enabled See attached files: [cd.debug.txt](https://github.com/aaru-dps/Aaru/files/5429439/cd.debug.txt) [cd.log.txt](https://github.com/aaru-dps/Aaru/files/5429440/cd.log.txt)
Author
Owner

@robin-francois commented on GitHub (Oct 28, 2020):

After discussing with @claunia , I retried with a more recent version 5.1.99.3216+a6571c51

I am still getting an error that looks very similar. See attached debug files for details.

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.DiscImages.AaruFormat.WriteSectorTag(Byte[] data, UInt64 sectorAddress, SectorTagType tag) in /home/claunia/Development/Aaru/Aaru/Aaru.Images/AaruFormat/Write.cs:line 3656
   at Aaru.Core.Media.CompactDisc.WriteSubchannelToImage(MmcSubchannel supportedSubchannel, MmcSubchannel desiredSubchannel, Byte[] sub, UInt64 sectorAddress, UInt32 length, SubchannelLog subLog, Dictionary`2 isrcs, Byte currentTrack, String& mcn, Track[] tracks, HashSet`1 subchannelExtents, Boolean fixSubchannelPosition, IWritableImage outputPlugin, Boolean fixSubchannel, Boolean fixSubchannelCrc, DumpLog dumpLog, UpdateStatusHandler updateStatus, Dictionary`2 smallestPregapLbaPerTrack) in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Media/CompactDisc.cs:line 242

cd.debug.txt
cd.log.txt

@robin-francois commented on GitHub (Oct 28, 2020): After discussing with @claunia , I retried with a more recent version `5.1.99.3216+a6571c51` I am still getting an error that looks very similar. See attached debug files for details. ``` 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.DiscImages.AaruFormat.WriteSectorTag(Byte[] data, UInt64 sectorAddress, SectorTagType tag) in /home/claunia/Development/Aaru/Aaru/Aaru.Images/AaruFormat/Write.cs:line 3656 at Aaru.Core.Media.CompactDisc.WriteSubchannelToImage(MmcSubchannel supportedSubchannel, MmcSubchannel desiredSubchannel, Byte[] sub, UInt64 sectorAddress, UInt32 length, SubchannelLog subLog, Dictionary`2 isrcs, Byte currentTrack, String& mcn, Track[] tracks, HashSet`1 subchannelExtents, Boolean fixSubchannelPosition, IWritableImage outputPlugin, Boolean fixSubchannel, Boolean fixSubchannelCrc, DumpLog dumpLog, UpdateStatusHandler updateStatus, Dictionary`2 smallestPregapLbaPerTrack) in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Media/CompactDisc.cs:line 242 ``` [cd.debug.txt](https://github.com/aaru-dps/Aaru/files/5450705/cd.debug.txt) [cd.log.txt](https://github.com/aaru-dps/Aaru/files/5450706/cd.log.txt)
Author
Owner

@robin-francois commented on GitHub (Feb 5, 2021):

I tested the same media recently with the last version and no exception was raised. Thank you!

@robin-francois commented on GitHub (Feb 5, 2021): I tested the same media recently with the last version and no exception was raised. Thank you!
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#502