Skip to content

Error on Unity 2022.3.13 on Windows IL2CPP #29

Open

Description

@in0finite

Library fails to decompress files on above platform.

The error message is: data corruption detected.

Sorry, no time right now to make reproduction steps.

0.7.4 and 0.7.2 give runtime error, 0.7.3 fails to compile.

Activity

  1. oleg-st commented on Jan 30, 2024

    @oleg-st
    Owner

    It looks like the problem is in the MSVC compiler.
    The /d2ssa-cse- option used in Unity causes incorrect code generation
    https://godbolt.org/z/rfK5c6fGW

    Reported here:
    https://developercommunity.visualstudio.com/t/The-d2ssa-cse--option-causes-incorrect/10574272

  2. in0finite commented on Jan 30, 2024

    @in0finite
    Author

    Keep in mind that error happens on other platforms aswell, for example, on WebGL. As far as I know, they don't use MSVC for compiling to WebAssembly. The conversion process is: C# => IL => IL2CPP => CPP => Emscripten => WebAssembly.

    Sorry, I forgot to mention that in the initial post. I assumed the bug is in IL2CPP.

  3. oleg-st commented on Jan 30, 2024

    @oleg-st
    Owner
  4. in0finite commented on Jan 30, 2024

    @in0finite
    Author

    Switching to ulong/long like last time might help here.

    Nope, I tried using my fork of library with ulong/long, it doesn't work.

  5. oleg-st commented on Jan 30, 2024

    @oleg-st
    Owner

    A workaround for the MSVC problem:

    Add additionalIl2CppArgs: --compiler-flags="/d2SSAOptimizer-" to ProjectSettings.asset

  6. korvemaa commented on Feb 19, 2024

    @korvemaa

    I am getting a similar error on WebGL platform and using the additional CppArgs doesn't seem to fix it (can't build the project). I did the native integer types test, and it also reports wrong.

    64310096
    64236544
    125

    Any help would be great :)

  7. oleg-st commented on Feb 20, 2024

    @oleg-st
    Owner

    The WebGL platform does not have proper debugging tools to find the root cause.
    You can report a problem with a native integers in WebGL to Unity.

  8. oleg-st commented on Apr 29, 2024

    @oleg-st
    Owner

    @Jake-NSW @in0finite
    Looks like decompression works in Unity 2022.3.26f1 WebGL

  9. in0finite commented on Apr 29, 2024

    @in0finite
    Author

    Thanks for letting me know.

    However, in the meantime, I switched to 2023.3.0b5 and the bug is still present here.

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