Search Unity

[Unity 5.0.1] Device filter Fat(Armv7 + x86) but Unity always load arm lib. Game crash on x86 device

Discussion in 'Android' started by MinhDao, Jun 24, 2015.

  1. MinhDao

    MinhDao

    Joined:
    Oct 28, 2013
    Posts:
    155
    Hi everyone!

    I'm working on a 3D game right now. The game runs fine on Arm device. But when publishing to x86 device (my device is zenphone 5), game crash immediately.

    Android show log :
    F/libc (24674): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 24674

    I found cause of problem is Unity always load arm lib instead x86 lib, although I chose Device filter Fat(Armv7 + x86). When i choose Device filter x86 only. Game run fine.
    So Device filter : Fat not working.

    Any pointers/help appreciated. Thanks!
     
    Last edited: Jun 24, 2015
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Some devices have an emulation layer (called houdini) that actually translates ARM instructions to x86.
    This is used to enable support for apps / games written for ARM to run on x86 devices.

    That can explain why an ARM build crashes on your device, but a FAT APK should load the appropriate libraries...
    We have actually started using FAT as our default option and we tested it on both x86 and ARM devices, and it works fine for us.

    Can you post the full log from logcat ?
     
  3. MinhDao

    MinhDao

    Joined:
    Oct 28, 2013
    Posts:
    155
    Thank you!
    I've resolved problem. I have native lib with option ARM cpu only, switch to cpu any and game run fine. So if you have native lib run on ARM cpu only. Unity will load ARM lib and game crash