Search Unity

Crashes on Android after migrating to Unity 2018.3 when use AndroidJavaProxy class

Discussion in 'Android' started by IceCatGames, Feb 11, 2019.

  1. pertz

    pertz

    Joined:
    Jan 8, 2015
    Posts:
    106
    I know it's a bit off topic (different bugs), but since you all develop for Android I thought I should comment. Are you guys not being affected by these other 2 major Android bugs on 2018.3 below? This version (2018.3) is being a major nightmare for me on Android, with these 3 major bugs:

    1) https://issuetracker.unity3d.com/is...i-mask-is-not-visible-on-some-android-devices
    (this one happens with some certain GPUs, but since it doesnt produce a CRASH there are almost no votes and low priority, but makes the game completely unplayable and give lots of bad reviews)

    2) https://issuetracker.unity3d.com/is...vices-when-scripting-backend-is-set-to-il2cpp
    (this one crashes Android 9 when IL2CPP is enabled when you call Application.Quit() for example when the BACK button is pressed)

    3) (this thread) https://issuetracker.unity3d.com/is...java-proxy-while-the-app-is-in-the-background
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    Fix for this issue will be shipped with Unity 2018.3.12f1.
     
    AllanRW, Sangwe, AyMog and 1 other person like this.
  3. AKPublish

    AKPublish

    Joined:
    Dec 14, 2016
    Posts:
    9
    @
    We experience 2nd issue. Very annoying. Do you use Firebase?
     
  4. AKPublish

    AKPublish

    Joined:
    Dec 14, 2016
    Posts:
    9
    Good news! When to expect this update?
     
    toberr likes this.
  5. pertz

    pertz

    Joined:
    Jan 8, 2015
    Posts:
    106
    wtf, I posted this 1 hour ago and all links were working, but now issue #1 has just been deleted it seems, link is now broken

    EDIT: I talked with Unity QA support and they said the #1 issue vanishing was a problem caused by they trying to change the target version of the issue from 2019.2 to 2018.3, but the issue is still alive and fixed and should be rolled out in a future 2018.3 version (exactly which is not known yet).
     
    Last edited: Apr 4, 2019
  6. toberr

    toberr

    Joined:
    Oct 1, 2016
    Posts:
    36
    Thank you!
     
  7. Ogien

    Ogien

    Joined:
    Nov 21, 2012
    Posts:
    165
    Thank you!!!!
     
  8. Ogien

    Ogien

    Joined:
    Nov 21, 2012
    Posts:
    165
    I just saw 2018.3.12f1 is available for download, can you confirm that this fix is in there, the release notes don't seem to mention it.
     
    AyMog likes this.
  9. KleninDmitriy

    KleninDmitriy

    Joined:
    Nov 13, 2018
    Posts:
    5
    Today I will make a new build and publish on Google Play. In 2-3 days I will report the results when the statistics are collected.
     
  10. YuriBazila

    YuriBazila

    Joined:
    Feb 1, 2013
    Posts:
    47
    I just built my project with 2018.3.12 and run some tests.
    It successfully passed 20 tests in firebase testlab and pre launch tests in google play. Looks good
     
  11. pertz

    pertz

    Joined:
    Jan 8, 2015
    Posts:
    106
    Can you confirm if fix was published on this version? I couldnt find anything related to this bug on the release notes
     
  12. Ogien

    Ogien

    Joined:
    Nov 21, 2012
    Posts:
    165
    Can someone from Unity please confirm that this issue fix is included in 2018.3.12f1.
     
  13. toberr

    toberr

    Joined:
    Oct 1, 2016
    Posts:
    36
    I did not try but I think there is no fix. Because in 2019.2 in release notes it was written in 2018.3.12 - not =(
     
  14. KleninDmitriy

    KleninDmitriy

    Joined:
    Nov 13, 2018
    Posts:
    5
    It has been 10 hours since the publication of the new version and I still have the error:
    java.lang.Error
    location: $ Proxy7.onUnityAdsReady

     
    nvtuan96 likes this.
  15. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    I'm seeing contradictory information in our records. I see .12 everywhere except the release notes where it's .13.
    I'm trying to figure it out.
     
    iMobilityTeam and nvtuan96 like this.
  16. nvtuan96

    nvtuan96

    Joined:
    Oct 12, 2017
    Posts:
    12
    it seems this bug isn't included in 2018.3.12 version :(
     
  17. nvtuan96

    nvtuan96

    Joined:
    Oct 12, 2017
    Posts:
    12
    Could you please confirm whenever this bug will be fixed ? :( My vital ARNs on Google Play Console is pretty high.
     
  18. YuriBazila

    YuriBazila

    Joined:
    Feb 1, 2013
    Posts:
    47
    The problem is still here, nothing changed with 2018.3.12
    It's almost 2 months we are waiting for the fix. Crash rate very high due to this bug
     

    Attached Files:

  19. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    Got confirmation from release management that the fix will come out in 2018.3.13, missed the train for .12 :(
     
    iMobilityTeam and Nomibuilder like this.
  20. pertz

    pertz

    Joined:
    Jan 8, 2015
    Posts:
    106
    Ok, thanks for the info!
     
  21. AKPublish

    AKPublish

    Joined:
    Dec 14, 2016
    Posts:
    9
    We are waiting for a fix in 2018. It is so sad, it is not there still
     
  22. Ogien

    Ogien

    Joined:
    Nov 21, 2012
    Posts:
    165
    This is very frustrating, I have not been able to update my app for a month now. You guys need to do better. Much better.
     
  23. Nomibuilder

    Nomibuilder

    Joined:
    Apr 24, 2014
    Posts:
    20
    When we can expect the new version UNITY 2018.3.13 please?
     
    AyMog and dicastyle like this.
  24. nvtuan96

    nvtuan96

    Joined:
    Oct 12, 2017
    Posts:
    12
    Could you let me know whenever new 2018.3.13 will be released ?
     
  25. pertz

    pertz

    Joined:
    Jan 8, 2015
    Posts:
    106
    Should be next Monday... From what I understand Unity is following a weekly update calendar starting with 2018
     
    nvtuan96 likes this.
  26. toberr

    toberr

    Joined:
    Oct 1, 2016
    Posts:
    36
    we released on 2019.1.0f1 and crashes disapeared. But we have few new crashes =)
     
    triangle154 likes this.
  27. AyMog

    AyMog

    Joined:
    May 29, 2018
    Posts:
    2
    How does the new crash rate compare to the previous problem?
     
  28. nvtuan96

    nvtuan96

    Joined:
    Oct 12, 2017
    Posts:
    12
    Yes, Thanks for your info
     
  29. toberr

    toberr

    Joined:
    Oct 1, 2016
    Posts:
    36

    I can't say for sure yet, but it seems less
    In fact, the failure is only one and only on Android 9
    Anyone know such a problem?

    java.lang.Error

    android.view.ViewGroup.dispatchApplyWindowInsets

    Code (CSharp):
    1. java.lang.Error: FATAL EXCEPTION [main]
    2. Unity version     : 2019.1.0f1
    3. Device model      : Xiaomi MI MAX 3
    4. Device fingerprint: Xiaomi/nitrogen/nitrogen:9/PKQ1.181007.001/V10.2.1.0.PEDMIXM:user/release-keys
    5. Caused by
    6.   at android.view.ViewGroup.dispatchApplyWindowInsets (ViewGroup.java:7081)
    7.   at android.view.ViewRootImpl.dispatchApplyInsets (ViewRootImpl.java:1707)
    8.   at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2120)
    9.   at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1505)
    10.   at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7352)
    11.   at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1065)
    12.   at android.view.Choreographer.doCallbacks (Choreographer.java:877)
    13.   at android.view.Choreographer.doFrame (Choreographer.java:808)
    14.   at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1051)
    15.   at android.os.Handler.handleCallback (Handler.java:873)
    16.   at android.os.Handler.dispatchMessage (Handler.java:99)
    17.   at android.os.Looper.loop (Looper.java:201)
    18.   at android.app.ActivityThread.main (ActivityThread.java:6806)
    19.   at java.lang.reflect.Method.invoke (Native Method)
    20.   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547)
    21.   at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)
     
    AyMog likes this.
  30. pertz

    pertz

    Joined:
    Jan 8, 2015
    Posts:
    106
    @toberr that crash seems to be this:
    https://forum.unity.com/threads/crashes-on-huawei-android-9-devices.632944/#post-4347559
     
    toberr likes this.
  31. pertz

    pertz

    Joined:
    Jan 8, 2015
    Posts:
    106
    Well, I've been refreshing the release page all day and still no 2018.3.13f1... and Monday is almost over in Denmark, so I guess it will only be released tomorrow (or next week?). Any confirmation on the date of the update?
     
    Khonkaengame likes this.
  32. Khonkaengame

    Khonkaengame

    Joined:
    Aug 17, 2018
    Posts:
    4
    I have been doing the same thing.
     
    KleninDmitriy likes this.
  33. Ogien

    Ogien

    Joined:
    Nov 21, 2012
    Posts:
    165
    Another week has passed, can someone from Unity give us an update on this issue. Its not like our businesses are deepening on this or anything!
     
  34. AikenParker

    AikenParker

    Joined:
    May 16, 2018
    Posts:
    9
    I was able to confirm a workaround for that crash with the following "quit" code but we're still waiting for a proper fix.

    Code (CSharp):
    1. if (IsAndroid9)
    2. {
    3.     using (AndroidJavaClass javaClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
    4.     using (AndroidJavaObject javaActivity = javaClass.GetStatic<AndroidJavaObject>("currentActivity"))
    5.     {
    6.         javaActivity.Call<bool>("moveTaskToBack", true);
    7.     }
    8. }
    9. else
    10. {
    11.     Application.Quit();
    12. }
     
    toberr likes this.
  35. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    The 2018.3.13 was delayed due to regressions found (don't know what they are). It will be shipped once those are resolved (well, I hope so, I'm not in charge of making releases).
     
  36. toberr

    toberr

    Joined:
    Oct 1, 2016
    Posts:
    36
    Thanks! We also made this and made a bulid with Mono backend.
    Due to the fact that we have been waiting for fix from the Unity for 3 months, we lost 90% of the traffic, so I can say with confidence that this helped only in a couple of days.
     
  37. Ogien

    Ogien

    Joined:
    Nov 21, 2012
    Posts:
    165


    Thanks for the update, I just saw 2019.1 was released, does that version solve this issue?
     
  38. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    Yes, the fix should be in 2019.1.
    It has landed to 2018.3, just the release is delayed due to other issues found in it. Hopefully those will be resolved soon.
     
    Grawnya likes this.
  39. Grawnya

    Grawnya

    Joined:
    Apr 5, 2018
    Posts:
    9
    I have encountered these errors too. Such as the below exceptions. On raising a bug report I was told the issue was fixed in 2018.3.8. I have upgraded to 2018.3.12 and am still seeing these crashes. I can't reproduce this in my editor or on my test devices - both Unity Ads and IAP code are working correctly. Some customers have been able to buy the in-app product, so this looks like an intermittent problem - and possibly only occurs on some devices.

    On these forums I have come various fix suggestions:
    - Run initialisation code in a separate thread
    - Don't use il2cpp
    - Disable crash reporting

    But these issues seem persistent. Has anyone got any new insight? I've re-opened my bug report here:

    https://fogbugz.unity3d.com/default.asp?1145547_ldnaccgm319joqcq

    Asus ZenFone Max M1 (ZB555KL) (ASUS_X00P_4), Android 8.0
    Report 1 of 1
    java.lang.Error: FATAL EXCEPTION [main]
    Unity version : 2018.3.3f1
    Device model : asus ASUS_X00PD
    Device fingerprint: asus/WW_X00PD/ASUS_X00P_4:8.0.0/OPR1.170623.032/15.00.1901.96:user/release-keys
    Caused by
    at com.unity3d.player.ReflectionHelper.nativeProxyInvoke (Native Method)
    at com.unity3d.player.ReflectionHelper.a (Unknown Source)
    at com.unity3d.player.ReflectionHelper$1.invoke (Unknown Source:6)
    at java.lang.reflect.Proxy.invoke (Proxy.java:913)
    at $Proxy7.onUnityAdsReady (Unknown Source)
    at com.unity3d.ads.api.Listener$1.run (Listener.java:17)
    at android.os.Handler.handleCallback (Handler.java:789)
    at android.os.Handler.dispatchMessage (Handler.java:98)
    at android.os.Looper.loop (Looper.java:169)
    at android.app.ActivityThread.main (ActivityThread.java:6595)
    at java.lang.reflect.Method.invoke (Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:767)


    Huawei HUAWEI Y6 2018 (HWATU-QG), Android 8.0
    Report 1 of 1
    java.lang.UnsatisfiedLinkError:
    at com.unity3d.player.ReflectionHelper.nativeProxyInvoke (Native Method)
    at com.unity3d.player.ReflectionHelper.a (Unknown Source)
    at com.unity3d.player.ReflectionHelper$1.invoke (Unknown Source:6)
    at java.lang.reflect.Proxy.invoke (Proxy.java:913)
    at $Proxy14.OnProductsRetrieved (Unknown Source)
    at com.unity.purchasing.common.UnityPurchasing.OnProductsRetrieved
    (UnityPurchasing.java:24)
    at
    com.unity.purchasing.googleplay.GooglePlayPurchasing.NotifyUnityOfProducts
    (GooglePlayPurchasing.java:620)
    at com.unity.purchasing.googleplay.GooglePlayPurchasing.access$400
    (GooglePlayPurchasing.java:44)
    at
    com.unity.purchasing.googleplay.GooglePlayPurchasing$6.onQueryInventoryFinished
    (GooglePlayPurchasing.java:579)
    at com.unity.purchasing.googleplay.IabHelper$4.workWith (IabHelper.java:884)
    at com.unity.purchasing.googleplay.BillingServiceManager$2.run
    (BillingServiceManager.java:146)
    at java.util.concurrent.ThreadPoolExecutor.runWorker
    (ThreadPoolExecutor.java:1162)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run
    (ThreadPoolExecutor.java:636)
    at java.lang.Thread.run (Thread.java:784)
     
  40. Ogien

    Ogien

    Joined:
    Nov 21, 2012
    Posts:
    165
    Should be?
     
    Khonkaengame likes this.
  41. AyMog

    AyMog

    Joined:
    May 29, 2018
    Posts:
    2
    Are you using 2019.1.0f1 or 2019.1.0f2? Would you know if this issue was fixed in 2019.1.0f2?
     
  42. AbhishekW

    AbhishekW

    Joined:
    Apr 2, 2019
    Posts:
    4
    I have one doubt though, is the game really crashing or just throwing the crash log ?? Because while we were testing our app for >2 days, not once the game crashed on our devices, and we checked on all Android OS versions.
     
  43. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    It's not a game crash. When this issue happens, the Unity is unloaded. However, on some devices this produces a user-visible crash dialog with your app name. And if you use Unity unload feature in your app, it will kill your app.
     
  44. pertz

    pertz

    Joined:
    Jan 8, 2015
    Posts:
    106
    What do you mean by "Unity unload feature"? Can you elaborate a bit more? I can stop using that feature if it helps anything at all with the crashes. On the last 7 days I've had 73100 of this crash/exception affecting 1500 different players.
     
  45. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    Latest Unity versions let you to unload the engine, but keep the app running. You'd use it in case you have an Android app where the Unity game is only part of it.
     
  46. pertz

    pertz

    Joined:
    Jan 8, 2015
    Posts:
    106
    Oh ok. Thanks for the explanation. In my case it's a full Unity game, so I dont use any unload feature (I do use UnloadAssets and methods like that)
     
  47. toberr

    toberr

    Joined:
    Oct 1, 2016
    Posts:
    36
    Anybody already used 2018.3.13?
     
  48. Fronne

    Fronne

    Joined:
    Sep 25, 2014
    Posts:
    112
    I'm about to install 2018.3.13f1, I know in a few hours if the fix works, it worked on 2019.1 so I don't see a reason why it shouldn't work...
     
  49. pertz

    pertz

    Joined:
    Jan 8, 2015
    Posts:
    106
    I'm downloading right now, will roll an update today slowly (low % of users etc), so I will probably only know if it worked tomorrow.
     
  50. Ogien

    Ogien

    Joined:
    Nov 21, 2012
    Posts:
    165
    Good luck everyone!