Search Unity

Unity 2020.1.11f1c1 android crash

Discussion in 'Android' started by chengdragon198, Oct 22, 2021.

  1. chengdragon198

    chengdragon198

    Joined:
    Mar 2, 2016
    Posts:
    6
    When we released Android, we found a crash problem, but I can't confirm that the problem is willing. Can you help me see why.


    Code (CSharp):
    1. 10-18 11:22:50.822 2909 3243 E CRASH : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2. 10-18 11:22:50.823 2909 3243 E CRASH : Version '2020.1.11f1c1 (5a0e79d68ad0)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a'
    3. 10-18 11:22:50.823 2909 3243 E CRASH : Build fingerprint: 'qcom/msm8953_32/msm8953_32:8.1.0/OPM1.171019.026/207:user/jenkins-207,test-keys'
    4. 10-18 11:22:50.823 2909 3243 E CRASH : Revision: '0'
    5. 10-18 11:22:50.823 2909 3243 E CRASH : ABI: 'arm'
    6. 10-18 11:22:50.823 2909 3243 E CRASH : Timestamp: 2021-10-18 11:22:50+0800
    7. 10-18 11:22:50.823 2909 3243 E CRASH : pid: 2909, tid: 3243, name: UnityMain >>> com.app.launcher <<<
    8. 10-18 11:22:50.823 2909 3243 E CRASH : uid: 1000
    9. 10-18 11:22:50.823 2909 3243 E CRASH : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0x73682ad5
    10. 10-18 11:22:50.823 2909 3243 E CRASH : r0 00000000 r1 0dd98e70 r2 000003e8 r3 000000c5
    11. 10-18 11:22:50.823 2909 3243 E CRASH : r4 75562dd0 r5 a1bc1588 r6 73682a85 r7 aeff61b8
    12. 10-18 11:22:50.824 2909 3243 E CRASH : r8 00000000 r9 90700264 r10 00000000 r11 aeff61b8
    13. 10-18 11:22:50.824 2909 3243 E CRASH : ip aefef628 sp 8ef39df0 lr aefb188b pc 9e4a6dcc
    14. 10-18 11:22:50.824 2909 3243 E CRASH :
    15. 10-18 11:22:50.824 2909 3243 E CRASH : backtrace:
    16. 10-18 11:22:50.824 2909 3243 E CRASH : #00 pc 00009dcc /vendor/lib/egl/eglSubDriverAndroid.so (EglAndroidWindowSurface::Destroy()+88)
    17. 10-18 11:22:50.824 2909 3243 E CRASH : #01 pc 001a1d53 /vendor/lib/egl/libGLESv2_adreno.so (EglWindowSurface::Destroy()+218)
    18. 10-18 11:22:50.824 2909 3243 E CRASH : #02 pc 0018cdd1 /vendor/lib/egl/libGLESv2_adreno.so (EglApi::DestroySurface(void*, void*)+100)
    19. 10-18 11:22:50.824 2909 3243 E CRASH : #03 pc 0000b5b7 /system/lib/libEGL.so (eglDestroySurface+54) (BuildId: 3b65cc1aca616c79509b8cd744e3b704)
    20. 10-18 11:22:50.824 2909 3243 E CRASH : #04 pc 0023d66f /system/priv-app/Launcher-release-signed/Launcher-release-signed.apk (BuildId: 5b3892a41a9c6f3cdab38ad539e22fb6b8660d28)
    21. 10-18 11:22:50.824 2909 3243 E CRASH : #05 pc 0023d8e5 /system/priv-app/Launcher-release-signed/Launcher-release-signed.apk (BuildId: 5b3892a41a9c6f3cdab38ad539e22fb6b8660d28)
    22. 10-18 11:22:50.824 2909 3243 E CRASH : #06 pc 0023c6e5 /system/priv-app/Launcher-release-signed/Launcher-release-signed.apk (BuildId: 5b3892a41a9c6f3cdab38ad539e22fb6b8660d28)
    23. 10-18 11:22:50.825 2909 3243 E CRASH : #07 pc 00419199 /system/priv-app/Launcher-release-signed/Launcher-release-signed.apk (BuildId: 5b3892a41a9c6f3cdab38ad539e22fb6b8660d28)
    24. 10-18 11:22:50.825 2909 3243 E CRASH : #08 pc 00419407 /system/priv-app/Launcher-release-signed/Launcher-release-signed.apk (BuildId: 5b3892a41a9c6f3cdab38ad539e22fb6b8660d28)
    25. 10-18 11:22:50.825 2909 3243 E CRASH : #09 pc 0040ca9b /system/priv-app/Launcher-release-signed/Launcher-release-signed.apk (BuildId: 5b3892a41a9c6f3cdab38ad539e22fb6b8660d28)
    26. 10-18 11:22:50.825 2909 3243 E CRASH : #10 pc 0041a9dd /system/priv-app/Launcher-release-signed/Launcher-release-signed.apk (BuildId: 5b3892a41a9c6f3cdab38ad539e22fb6b8660d28)
    27. 10-18 11:22:50.825 2909 3243 E CRASH : #11 pc 0006d6a3 /system/priv-app/Launcher-release-signed/oat/arm/Launcher-release-signed.odex (BuildId: edf5010c569b31abd782b5559786b6dadbf05558)
    28. 10-18 11:22:50.863 3042 3547 D AIAudioTrack: on Tick: (currentFrame=5 totalFrame=100 isDataFeedEnd=false)
    29.  
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    2020.1 is no longer supported, you should switch to 2020 LTS, as for crash, it seems like it's crashing in driver.

    Also, since you cannot publish with Mono, try switching to il2cpp and see if same issue occurs.
     
  3. chengdragon198

    chengdragon198

    Joined:
    Mar 2, 2016
    Posts:
    6
    Thank you for your reply. We tried to use other versions, but they couldn't initialize unityplayer in the application, so we abandoned it. As for il2cpp, the occupation of its global-metadata.dat file will cause some problems, so we use mono for the time being.

    In addition, I see that the crash may be caused by the surface. Is this related to our modification of the surface in pause() of unityplayer?


    Code (JavaScript):
    1. public class MyUnityPlayer extends UnityPlayer {
    2.     private boolean isShow=false;
    3.     private String TAG="MyUnityPlayer";
    4.     public MyUnityPlayer(Context contextWrapper) {
    5.         super(contextWrapper);
    6.         Log.i(TAG, " new  MyUnityPlayer: --"+contextWrapper.toString());
    7.     }
    8.     public void addView(View child) {
    9.         Log.i(TAG,"addView");
    10.         if (child instanceof SurfaceView) {
    11.             final SurfaceView surfaceView = (SurfaceView) child;
    12.             surfaceView.getHolder().setFormat(PixelFormat.TRANSPARENT);
    13.             surfaceView.setZOrderOnTop(true);
    14.         }
    15.         super.addView(child);
    16.  
    17.     }
    18.  
    19.     @Override
    20.     public  void pause() {
    21.         Log.i(TAG, "pause: start--"+isShow);
    22.         if(true){
    23.             super.pause();
    24.             for (int i = 0; i < getChildCount(); i++) {
    25.                 final View child =getChildAt(i);
    26.                 if(null!=child){
    27.                     Log.i(TAG,"pause---"+child.toString());
    28.                     post(new Runnable() {
    29.                         @Override
    30.                         public void run() {
    31.                             child.setVisibility(View.GONE);
    32.                         }
    33.                     });
    34.  
    35.                 }
    36.  
    37.             }
    38.             windowFocusChanged(false);
    39.             isShow=false;
    40.         }
    41.         Log.i(TAG, "pause: end");
    42.     }
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    Without investigation it's hard to tell. In any case, even if there's a bug, Unity 2020.1 won't receiving any bug fixes, since it's not supported.