Open Yannikk1996 opened 1 year ago
Thanks for your fast response. I also tried to use LZ4Codec.Enforce32 = true; but then it will crash in LL32.high.cs on line 114 with the same error. Xamarin worked fine.
"Xamarin"? What do you mean? Running same thing on "Mono"? Or Xamarin.Forms vs MaUI? Can you provide me data which causes the problem?
Sorry to not be clear. Compressing using your LZ4 Library on Xamarin.Forms worked fine with Android / iOS. On Maui the compress function crashes by compressing data blocks with Android / iOS. It happens with any data block that can be compressed. But after a little bit of testing, it works when using LZ4Level.L00_FAST. It does not work with any other LZ4Level.
Then it works with and without LZ4Codec.Enforce32 = true;
Hmmm, that's very intriguing. What is different when you run on Xamarin.Forms and on MaUI. Does it use different runtime? Does it use Mono or .NET 6? I assume same data work absolutely fine on Desktop (Windows or Linux but on Intel)?
Xamarin Forms runs on .Net Standard 2.1 i think. Maui runs on Net 6/7. I think Mono is the underlying framework in both. It works absolutley fine on Maui Desktop Windows 32/64bit.
Description When try to compress on a Maui Project. The function crashs on Android and iOS. Maui Windows works fine.
To reproduce Compress on any Maui Android/iOS project: K4os.Compression.LZ4.LZ4Codec.Encode(data, dest, K4os.Compression.LZ4.LZ4Level.L12_MAX);
Expected behavior Compress Data
Actual behavior Compress function crashes with in LL64.high.cs on line 107 at Assert(matchIndex < ipIndex);
Environment