NullReference Exception in RarRijndael.Initialize() #585

Open
opened 2026-01-29 22:14:09 +00:00 by claunia · 3 comments
Owner

Originally created by @SirSparkles on GitHub (Aug 30, 2023).

Some Clients are reporting:

System.NullReferenceException: Object reference not set to an instance of an object.
at SharpCompress.Common.Rar.RarRijndael.Initialize()
at SharpCompress.Common.Rar.RarCryptoWrapper..ctor(Stream actualStream, String password, Byte[] salt)
at SharpCompress.Archives.Rar.SeekableFilePart.GetCompressedStream()
at SharpCompress.Compressors.Rar.MultiVolumeReadOnlyStream.InitializeNextFilePart()
at SharpCompress.Archives.Rar.RarArchiveEntry.OpenEntryStream()
at SharpCompress.Archives.IArchiveEntryExtensions.WriteTo(IArchiveEntry archiveEntry, Stream streamToWriteTo)
at SharpCompress.Archives.IArchiveEntryExtensions.<>c__DisplayClass2_0.b__0(String x, FileMode fm)
at SharpCompress.Common.ExtractionMethods.WriteEntryToFile(IEntry entry, String destinationFileName, ExtractionOptions options, Action`2 openAndWrite)

Originally created by @SirSparkles on GitHub (Aug 30, 2023). Some Clients are reporting: System.NullReferenceException: Object reference not set to an instance of an object. at SharpCompress.Common.Rar.RarRijndael.Initialize() at SharpCompress.Common.Rar.RarCryptoWrapper..ctor(Stream actualStream, String password, Byte[] salt) at SharpCompress.Archives.Rar.SeekableFilePart.GetCompressedStream() at SharpCompress.Compressors.Rar.MultiVolumeReadOnlyStream.InitializeNextFilePart() at SharpCompress.Archives.Rar.RarArchiveEntry.OpenEntryStream() at SharpCompress.Archives.IArchiveEntryExtensions.WriteTo(IArchiveEntry archiveEntry, Stream streamToWriteTo) at SharpCompress.Archives.IArchiveEntryExtensions.<>c__DisplayClass2_0.<WriteToFile>b__0(String x, FileMode fm) at SharpCompress.Common.ExtractionMethods.WriteEntryToFile(IEntry entry, String destinationFileName, ExtractionOptions options, Action`2 openAndWrite)
claunia added the questionup for grabs labels 2026-01-29 22:14:09 +00:00
Author
Owner

@SirSparkles commented on GitHub (Aug 30, 2023):

also at:
System.NullReferenceException: Object reference not set to an instance of an object.
at SharpCompress.Common.Rar.RarRijndael.Initialize()
at SharpCompress.Common.Rar.RarRijndael.InitializeFrom(String password, Byte[] salt)
at SharpCompress.Common.Rar.RarCryptoWrapper..ctor(Stream actualStream, String password, Byte[] salt)
at SharpCompress.Archives.Rar.SeekableFilePart.GetCompressedStream()
at SharpCompress.Compressors.Rar.MultiVolumeReadOnlyStream.InitializeNextFilePart()
at SharpCompress.Compressors.Rar.MultiVolumeReadOnlyStream..ctor(IEnumerable1 parts, IExtractionListener streamListener) at SharpCompress.Archives.Rar.RarArchiveEntry.OpenEntryStream() at SharpCompress.Archives.IArchiveEntryExtensions.WriteTo(IArchiveEntry archiveEntry, Stream streamToWriteTo) at SharpCompress.Archives.IArchiveEntryExtensions.<>c__DisplayClass2_0.<WriteToFile>b__0(String x, FileMode fm) at SharpCompress.Common.ExtractionMethods.WriteEntryToFile(IEntry entry, String destinationFileName, ExtractionOptions options, Action2 openAndWrite)

@SirSparkles commented on GitHub (Aug 30, 2023): also at: System.NullReferenceException: Object reference not set to an instance of an object. at SharpCompress.Common.Rar.RarRijndael.Initialize() at SharpCompress.Common.Rar.RarRijndael.InitializeFrom(String password, Byte[] salt) at SharpCompress.Common.Rar.RarCryptoWrapper..ctor(Stream actualStream, String password, Byte[] salt) at SharpCompress.Archives.Rar.SeekableFilePart.GetCompressedStream() at SharpCompress.Compressors.Rar.MultiVolumeReadOnlyStream.InitializeNextFilePart() at SharpCompress.Compressors.Rar.MultiVolumeReadOnlyStream..ctor(IEnumerable`1 parts, IExtractionListener streamListener) at SharpCompress.Archives.Rar.RarArchiveEntry.OpenEntryStream() at SharpCompress.Archives.IArchiveEntryExtensions.WriteTo(IArchiveEntry archiveEntry, Stream streamToWriteTo) at SharpCompress.Archives.IArchiveEntryExtensions.<>c__DisplayClass2_0.<WriteToFile>b__0(String x, FileMode fm) at SharpCompress.Common.ExtractionMethods.WriteEntryToFile(IEntry entry, String destinationFileName, ExtractionOptions options, Action`2 openAndWrite)
Author
Owner

@labworkx commented on GitHub (Aug 30, 2023):

Probably the same as https://github.com/adamhathcock/sharpcompress/issues/743

I encountered this error and was expecting a SharpCompress.Common.CryptographicException but got also a null reference.

@labworkx commented on GitHub (Aug 30, 2023): Probably the same as https://github.com/adamhathcock/sharpcompress/issues/743 I encountered this error and was expecting a SharpCompress.Common.CryptographicException but got also a null reference.
Author
Owner

@Erior commented on GitHub (Sep 4, 2023):

Guess it is a bit inconvenient but please build sharpcompress from master branch and test with that, I don't think we have released the change that got merged for this issue.

@Erior commented on GitHub (Sep 4, 2023): Guess it is a bit inconvenient but please build sharpcompress from master branch and test with that, I don't think we have released the change that got merged for this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#585