[Problem] Error when compressing logs on latest WIP #463

Closed
opened 2026-01-29 16:16:52 +00:00 by claunia · 5 comments
Owner

Originally created by @PurpleNekoNova on GitHub (Oct 18, 2022).

Originally assigned to: @mnadareski on GitHub.

console.log

...
Compressing log files...
Compression could not complete: System.TypeInitializationException: The type initializer for 'System.Text.BaseCodePageEncoding' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at System.Text.BaseCodePageEncoding.ReadCodePageDataFileHeader(Stream stream, Byte[] codePageDataFileHeader)
   at System.Text.BaseCodePageEncoding.GetEncodingDataStream(String tableName)
   at System.Text.BaseCodePageEncoding..cctor()
   --- End of inner exception stack trace ---
   at System.Text.BaseCodePageEncoding.GetCodePageByteSize(Int32 codePage)
   at System.Text.CodePagesEncodingProvider.GetEncoding(Int32 codepage)
   at System.Text.CodePagesEncodingProvider.GetEncoding(Int32 codepage)
   at System.Text.EncodingProvider.GetEncodingFromProvider(Int32 codepage)
   at System.Text.Encoding.GetEncoding(Int32 codepage)
   at System.IO.Compression.ZipArchiveEntry.EncodeEntryName(String entryName, Boolean& isUTF8)
   at System.IO.Compression.ZipArchiveEntry.set_FullName(String value)
   at System.IO.Compression.ZipArchiveEntry..ctor(ZipArchive archive, String entryName)
   at System.IO.Compression.ZipArchive.DoCreateEntry(String entryName, Nullable 1 compressionLevel)
   at System.IO.Compression.ZipFileExtensions.DoCreateEntryFromFile(ZipArchive destination, String sourceFileName, String entryName, Nullable 1 compressionLevel)
   at System.IO.Compression.ZipFileExtensions.CreateEntryFromFile(ZipArchive destination, String sourceFileName, String entryName)
   at MPF.Library.InfoTool.CompressLogFiles(String outputDirectory, String outputFilename, BaseParameters parameters) in C:\projects\mpf\MPF.Library\InfoTool.cs:line 616
Submission information process complete!
Originally created by @PurpleNekoNova on GitHub (Oct 18, 2022). Originally assigned to: @mnadareski on GitHub. [console.log](https://github.com/SabreTools/MPF/files/9805160/console.log) ``` ... Compressing log files... Compression could not complete: System.TypeInitializationException: The type initializer for 'System.Text.BaseCodePageEncoding' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at System.Text.BaseCodePageEncoding.ReadCodePageDataFileHeader(Stream stream, Byte[] codePageDataFileHeader) at System.Text.BaseCodePageEncoding.GetEncodingDataStream(String tableName) at System.Text.BaseCodePageEncoding..cctor() --- End of inner exception stack trace --- at System.Text.BaseCodePageEncoding.GetCodePageByteSize(Int32 codePage) at System.Text.CodePagesEncodingProvider.GetEncoding(Int32 codepage) at System.Text.CodePagesEncodingProvider.GetEncoding(Int32 codepage) at System.Text.EncodingProvider.GetEncodingFromProvider(Int32 codepage) at System.Text.Encoding.GetEncoding(Int32 codepage) at System.IO.Compression.ZipArchiveEntry.EncodeEntryName(String entryName, Boolean& isUTF8) at System.IO.Compression.ZipArchiveEntry.set_FullName(String value) at System.IO.Compression.ZipArchiveEntry..ctor(ZipArchive archive, String entryName) at System.IO.Compression.ZipArchive.DoCreateEntry(String entryName, Nullable 1 compressionLevel) at System.IO.Compression.ZipFileExtensions.DoCreateEntryFromFile(ZipArchive destination, String sourceFileName, String entryName, Nullable 1 compressionLevel) at System.IO.Compression.ZipFileExtensions.CreateEntryFromFile(ZipArchive destination, String sourceFileName, String entryName) at MPF.Library.InfoTool.CompressLogFiles(String outputDirectory, String outputFilename, BaseParameters parameters) in C:\projects\mpf\MPF.Library\InfoTool.cs:line 616 Submission information process complete! ```
claunia added the bug label 2026-01-29 16:16:52 +00:00
Author
Owner

@mnadareski commented on GitHub (Oct 18, 2022):

Attempted fixes at:
e0f8443653
5f059253a4

@mnadareski commented on GitHub (Oct 18, 2022): Attempted fixes at: https://github.com/SabreTools/MPF/commit/e0f8443653947c940f0644aed3072173b20f0dda https://github.com/SabreTools/MPF/commit/5f059253a4ace673f496868e4eb02201b3ba2a6f
Author
Owner

@mnadareski commented on GitHub (Oct 18, 2022):

Neither fix worked. The issue is happening withing SharpCompress. I will look into alternatives such as using System.Compression instead.

Immediate Edit: This is System.Compression that's having the issue. That makes this even stranger.

@mnadareski commented on GitHub (Oct 18, 2022): Neither fix worked. The issue is happening withing SharpCompress. I will look into alternatives such as using `System.Compression` instead. **Immediate Edit:** This _is_ `System.Compression` that's having the issue. That makes this even stranger.
Author
Owner

@mnadareski commented on GitHub (Oct 18, 2022):

Above attempted fixes rolled back with b57e0bb97e

@mnadareski commented on GitHub (Oct 18, 2022): Above attempted fixes rolled back with https://github.com/SabreTools/MPF/commit/b57e0bb97e8255c0c7497f5aea6a7490db6e8f81
Author
Owner

@mnadareski commented on GitHub (Oct 18, 2022):

Another attempted fix: 7c411d36db

@mnadareski commented on GitHub (Oct 18, 2022): Another attempted fix: https://github.com/SabreTools/MPF/commit/7c411d36dbd5b574f1933e9de44cd3cdfd116d5f
Author
Owner

@mnadareski commented on GitHub (Oct 18, 2022):

Fixed as of 7c411d36db

@mnadareski commented on GitHub (Oct 18, 2022): Fixed as of https://github.com/SabreTools/MPF/commit/7c411d36dbd5b574f1933e9de44cd3cdfd116d5f
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#463