Segfault in Unity 2018.3.8 compiled on Android using IL2CPP
See original GitHub issueWhen running a Unity 2018.3.8 app on Android compiled with IL2CPP, I’m getting a SIGSEGV when calling LZ4Codec.Decode(). The encoded data is coming from a server running .Net Core 2.1 on Linux, encoded with LZ4Codec.Encode(). Everything works fine when running Unity in editor, I’m experience the segfault only on Android devices. Do you have any idea what could be going wrong in this build scenario?
Issue Analytics
- State:
- Created 4 years ago
- Comments:30 (11 by maintainers)
Top Results From Across the Web
Crashes on Android after migrating to Unity 2018.3 when ...
I am thinking I've found problem & solution, at least for my project. I'm using AdMob, Unity2018.3.6f1, and building app bundle using IL2CPP...
Read more >[IL2CPP][Android] SEGFAULT crash when switching scenes ...
1) Open the attached project (OC link, 1.2GB) (use command line and '-buildTarget Android' argument when launching Unity). · 2) Go to Menu...
Read more >Unity Android Build Works in Mono but Fails in IL2CPP due ...
So the first step, I understand, is to change from Mono to IL2CPP as the Scripting Backend. The 32-bit Android ARMv7 app builds...
Read more >【Unity, C#】K4os.Compression.LZ4を使ってLZ4の圧縮・展開 ...
Segfault in Unity 2018.3.8 compiled on Android using IL2CPP · Issue #19 · MiloszKrajewski/K4os.Compression.LZ4 · GitHub.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hey Mikos, Fowarded unity response related to the bug lz4 arm7 crash.
thanks
---------- Forwarded message --------- From: Unity QA bugs@unity3d.com Date: Thu, Jul 23, 2020, 3:17 PM Subject: Re: (Case 1251505) Armv7 vs Armv64 IL2CPP crashes on decompres/compress assetbundle using custom compression To: Josep Maria Calull Mercadé calullmercade@gmail.com
Josep,
Thanks for reporting this issue. It looks like the code here will do an unaligned memory access, which is not allowed on armv7, hence the crash. Mono works in this case because it generates code that is less efficient than IL2CPP, and does only aligned memory access.
With IL2CPP, we have chosen to convert the C# code as-is, so that the generated code will do unaligned access if the C# code does.
I would recommend following up with the library developer - although looking at the Github issue thread, that might already be the case.
Please let me know if you have any questions about this issue. Thanks again!
Josh Peterson Senior Software Developer
– Thank you for submitting your support request! In the meantime I would suggest checking out http://answers.unity3d.com/ and our Forums at http://forum.unity3d.com/ for additional help.
Track the status of your ticket here: https://fogbugz.unity3d.com/default.asp?1251505_l59gi75pmf7g5vch (Please do not share this url with anyone else. Doing so will give them access to all information you share with us. If you post this url on forums or blogs we cannot prevent others from viewing all your support cases and bug reports.)
-----Original Message----- From: “Josep Maria Calull Mercadé” calullmercade@gmail.com Reply-To: “Josep Maria Calull Mercadé” calullmercade@gmail.com Date: Wed, 3 Jun 2020 10:21:54 +0200 To: “Monika Pociute” bugs@unity3d.com Subject: Re: (Case 1251505) Armv7 vs Armv64 IL2CPP crashes on decompres/compress assetbundle using custom compression
Thanks. I’ll close the issue.