Search Unity

Input.location.Start() causes android build to crash directly after startup

Discussion in 'Scripting' started by CerberusInteractive-Morgan, Dec 1, 2016.

  1. CerberusInteractive-Morgan

    CerberusInteractive-Morgan

    Joined:
    Aug 25, 2016
    Posts:
    19
    Hello! I upgraded to Unity 5.5 today with the release, and I tried to build something I've been working on to android (as i've done before in older versions) and it builds fine, and the app launches, however after the the game shows for about half a second, the game crashes completely.

    I commented out Input.location.Start() and the app works fine :eek:

    Here is some adb logcat stuff about it where the errors start:
    Thanks for any help on how to workaorund this!
     
  2. Carpet_Head

    Carpet_Head

    Joined:
    Nov 27, 2014
    Posts:
    258
    Getting this too in 5.5
     
  3. CerberusInteractive-Morgan

    CerberusInteractive-Morgan

    Joined:
    Aug 25, 2016
    Posts:
    19
    Good to know it's not just me! Hopefully this gets some attention
     
  4. gabrielcintra

    gabrielcintra

    Joined:
    Dec 3, 2015
    Posts:
    2
    Same here. My app is working great in the previous version. After updated to 5.5, my app crashes when Input.location starts.
     
  5. danw_unity

    danw_unity

    Unity Technologies

    Joined:
    Oct 16, 2014
    Posts:
    27
  6. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Huh. Note to self: Don't upgrade to 5.5. My current projects core functionality is geolocation based.
     
    Zuicis likes this.
  7. adamnickerson

    adamnickerson

    Joined:
    Dec 7, 2016
    Posts:
    1
    Getting same thing here once we upgraded to 5.5. Any work arounds or alternate ways to get compass heading?
     
  8. Zynpo

    Zynpo

    Joined:
    May 29, 2014
    Posts:
    16
    I am getting this also. Our team upgraded to 5.5 today and we spent the day trying to figure out why our app crashes on Android. Narrowed it down to this...

    :(
     
  9. PrismKDog

    PrismKDog

    Joined:
    Jun 13, 2013
    Posts:
    1
    Same here, Android 6.0 on OnePlus3 crashes after Input.location.Start().

    Has anyone found a workaround?

    Logcat output:

    Code (CSharp):
    1. 12-09 07:41:08.374 17876-17890/? D/LocationManager: requestLocationUpdates listener=<native proxy object> packageName= com.example
    2. 12-09 07:41:08.376 1328-2675/? E/LocationManagerService: requestLocationUpdates: uid=10102, pid=17876, provider=network, package=com.example listener= android.location.ILocationListener$Stub$Proxy@71281eb intent= null
    3. 12-09 07:41:08.377 17876-17890/? D/LocationManager: requestLocationUpdates listener=<native proxy object> packageName= com.example
    4. 12-09 07:41:08.378 1328-1359/? E/LocationManagerService: requestLocationUpdates: uid=10102, pid=17876, provider=passive, package=com.example listener= android.location.ILocationListener$Stub$Proxy@950bde1 intent= null
    5. 12-09 07:41:10.346 17876-17890/? A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x13212000 in tid 17890 (UnityMain)
    6. 12-09 07:41:10.455 712-712/? A/DEBUG: pid: 17876, tid: 17890, name: UnityMain  >>> com.example <<<
    7. 12-09 07:41:10.497 712-712/? A/DEBUG:     #02 pc 0099ca88  /data/app/com.example-1/lib/arm/libunity.so
    8. 12-09 07:41:10.884 1328-17981/? W/ActivityManager:   Force finishing activity com.example/com.unity3d.player.UnityPlayerActivity
     
  10. Zuicis

    Zuicis

    Joined:
    Mar 14, 2014
    Posts:
    12
  11. Zynpo

    Zynpo

    Joined:
    May 29, 2014
    Posts:
    16
    I tried to downgrade and now my project UI elements are all broken. No idea how to fix :(
     
  12. gabrielcintra

    gabrielcintra

    Joined:
    Dec 3, 2015
    Posts:
    2
    BE CAREFUL: If you update your project to 5.5, you can't downgrade to <5.5 because all the UI elements will be broken. Make a backup first.
     
    TaleOf4Gamers likes this.
  13. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    You should have a backup before every upgrade.

    Use version control people!
     
  14. zorgzp

    zorgzp

    Joined:
    Jan 11, 2017
    Posts:
    1
    And this issue not fixed in latest 5.6 version
     
  15. Samuel411

    Samuel411

    Joined:
    Dec 20, 2012
    Posts:
    646
    Just ran into this error. Whenever starting the location services I have around a 70% chance of the app crashing upon a restart and 10% chance if I open from a fresh install.

    I'm going to try GPS systems in the Android and native plugins I bought until this is resolved. https://www.assetstore.unity3d.com/en/#!/content/67473

    I'll update you guys on the outcome. Hopefully this stops crashing, I just need to find a general proximity of the user. City at max but within a 600 meter range would be preferable. I am also just pinging for the location once upon authentication.

    [EDIT]: The asset plugin works perfectly fine! No crashes but only for android. I wouldn't doubt it if there was another plugin for iOS but android is my only target platform right now.
     
    Last edited: Jan 17, 2017
  16. Protozoaire

    Protozoaire

    Joined:
    Apr 14, 2015
    Posts:
    61
    Ho no, I create my project with 5.5, downgrade won't be easy ...
     
  17. mastermindsdei

    mastermindsdei

    Joined:
    Dec 29, 2016
    Posts:
    3
    Try calling Input.location.Stop (); before calling again Input.location.Start ();