Skip to content

Version 0.8.2 breaks android support #45

Closed

Description

@MaxwellDAssistek

Hello,

After I updated from 0.8.1 to 0.8.2, I started getting the following exception when trying to use the CompressionStream class:

System.TypeInitializationException: The type initializer for 'ZstdSharp.Unsafe.Methods' threw an exception.
 ---> System.PlatformNotSupportedException: Operation is not supported on this platform.
   at System.Runtime.CompilerServices.RuntimeHelpers.AllocateTypeAssociatedMemory(Type type, Int32 size)
   at ZstdSharp.Unsafe.Methods..cctor()
   --- End of inner exception stack trace ---
   at ZstdSharp.SafeCctxHandle.Create()
   at ZstdSharp.Compressor..ctor(Int32 level)
   at ZstdSharp.CompressionStream..ctor(Stream stream, Int32 level, Int32 bufferSize, Boolean leaveOpen)

Activity

  1. oleg-st commented on Nov 18, 2024

    @oleg-st
    Owner

    @teo-tsirpanis Do you know the right way to handle it?

  2. teo-tsirpanis commented on Nov 18, 2024

    @teo-tsirpanis
    Contributor

    Apparently RuntimeHelpers.AllocateTypeAssociatedMemory is not implemented in Mono until .NET 9, but this method should not be called in .NET 7+. Will submit a fix soon.

  3. oleg-st commented on Nov 20, 2024

    @oleg-st
    Owner
  4. oleg-st commented on Nov 22, 2024

    @oleg-st
    Owner

    Fixed in 0.8.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions