NullReferenceException when calling RarArchiveEntry.OpenEntryStream() (v0.29.0 - 0.38.0) #671

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

Originally created by @Camble on GitHub (Jan 7, 2025).

This only seems to happen when the RAR archive contains a Thumbs.db file and this file is excluded when extracting.

System.NullReferenceException: 'Object reference not set to an instance of an object.'

Stacktrace:
SharpCompress.dll!SharpCompress.Compressors.Rar.UnpackV1.Unpack.Unpack29(bool solid) Line 669 C#
SharpCompress.dll!SharpCompress.Compressors.Rar.UnpackV1.Unpack.DoUnpack() Line 505 C#
SharpCompress.dll!SharpCompress.Compressors.Rar.UnpackV1.Unpack.DoUnpack(SharpCompress.Common.Rar.Headers.FileHeader fileHeader, System.IO.Stream readStream, System.IO.Stream writeStream) Line 484 C#
SharpCompress.dll!SharpCompress.Compressors.Rar.RarStream.RarStream(SharpCompress.Compressors.Rar.IRarUnpack unpack, SharpCompress.Common.Rar.Headers.FileHeader fileHeader, System.IO.Stream readStream) Line 61 C#
SharpCompress.dll!SharpCompress.Archives.Rar.RarArchiveEntry.OpenEntryStream() Line 81 C#

Originally created by @Camble on GitHub (Jan 7, 2025). This only seems to happen when the RAR archive contains a `Thumbs.db` file and this file is excluded when extracting. System.NullReferenceException: 'Object reference not set to an instance of an object.' Stacktrace: SharpCompress.dll!SharpCompress.Compressors.Rar.UnpackV1.Unpack.Unpack29(bool solid) Line 669 C# SharpCompress.dll!SharpCompress.Compressors.Rar.UnpackV1.Unpack.DoUnpack() Line 505 C# SharpCompress.dll!SharpCompress.Compressors.Rar.UnpackV1.Unpack.DoUnpack(SharpCompress.Common.Rar.Headers.FileHeader fileHeader, System.IO.Stream readStream, System.IO.Stream writeStream) Line 484 C# SharpCompress.dll!SharpCompress.Compressors.Rar.RarStream.RarStream(SharpCompress.Compressors.Rar.IRarUnpack unpack, SharpCompress.Common.Rar.Headers.FileHeader fileHeader, System.IO.Stream readStream) Line 61 C# SharpCompress.dll!SharpCompress.Archives.Rar.RarArchiveEntry.OpenEntryStream() Line 81 C#
claunia added the bugup for grabs labels 2026-01-29 22:15:35 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#671