question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Segfault in Unity 2018.3.8 compiled on Android using IL2CPP

See original GitHub issue

When 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:closed
  • Created 4 years ago
  • Comments:30 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
pepooncommented, Jul 24, 2020

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

Thank you for your response. samsung galaxy s5 it crashes(armv7) while armv64 device will not. i just build and apk+il2cpp and play.

mono not crashing.

On Wed, Jun 3, 2020, 9:48 AM Monika Pociute bugs@unity3d.com wrote:

Hi,

Thank you for contacting Unity about your issue.

Unfortunately, we are not able to reproduce it. Are you still experiencing this problem or was it a one time issue? If you’re still facing this problem, could you please provide us with more information - the exact steps needed to reproduce on our side?

Thanks, Monika Customer QA Team

1reaction
MiloszKrajewskicommented, Apr 4, 2020

Thanks. I’ll close the issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found