Search Unity

Game Crash due to Handheld.PlayFullScreenMovie

Discussion in 'Android' started by The_Devil, Jun 30, 2016.

  1. The_Devil

    The_Devil

    Joined:
    Jun 6, 2015
    Posts:
    36
    I have a video that I have to play in my game at a certain point. There are some images on which a fade in and then a fade out animation is carried out using mecanim. After the animation is done, I have to play a video and then continue with the game flow. The issue is that this cause a freeze followed by a crash on certain devices(eg. Moto G 3rd Gen). If i disable the video playback, the game works fine without a crash. The device logs once the game freezes is:

    --------- beginning of main
    W/Adreno-GSL(28957): <ioctl_kgsl_syncobj_create:2103>: (22, 9, 37797) fail 24 Too many open files
    W/Adreno-EGLSUB(28957): <SwapBuffers:1334>: gsl_device_3d_add_fence_event failed
    W/Adreno-EGL(28957): <qeglDrvAPI_eglSwapBuffers:3788>: EGL_BAD_SURFACE
    W/Adreno-GSL(28957): <gsl_ldd_control:427>: ioctl fd 33 code 0xc0140933 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 24 Too many open files
    W/Adreno-GSL(28957): <ioctl_kgsl_syncobj_create:2103>: (22, 9, 37806) fail 24 Too many open files
    W/Adreno-GSL(28957): <gsl_ldd_control:427>: ioctl fd 33 code 0xc0140933 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 24 Too many open files
    W/Adreno-GSL(28957): <ioctl_kgsl_syncobj_create:2103>: (22, 9, 37809) fail 24 Too many open files
    W/Adreno-EGLSUB(28957): <SwapBuffers:1334>: gsl_device_3d_add_fence_event failed
    W/Adreno-EGL(28957): <qeglDrvAPI_eglSwapBuffers:3788>: EGL_BAD_SURFACE
    W/Adreno-GSL(28957): <gsl_ldd_control:427>: ioctl fd 33 code 0xc0140933 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 24 Too many open files
    W/Adreno-GSL(28957): <ioctl_kgsl_syncobj_create:2103>: (22, 9, 37818) fail 24 Too many open files
    W/Adreno-GSL(28957): <gsl_ldd_control:427>: ioctl fd 33 code 0xc0140933 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 24 Too many open files
    W/Adreno-GSL(28957): <ioctl_kgsl_syncobj_create:2103>: (22, 9, 37821) fail 24 Too many open files
    W/Adreno-EGLSUB(28957): <SwapBuffers:1334>: gsl_device_3d_add_fence_event failed
    W/Adreno-EGL(28957): <qeglDrvAPI_eglSwapBuffers:3788>: EGL_BAD_SURFACE
    W/Adreno-GSL(28957): <gsl_ldd_control:427>: ioctl fd 33 code 0xc0140933 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 24 Too many open files
    W/Adreno-GSL(28957): <ioctl_kgsl_syncobj_create:2103>: (22, 9, 37830) fail 24 Too many open files
    W/Adreno-GSL(28957): <gsl_ldd_control:427>: ioctl fd 33 code 0xc0140933 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 24 Too many open files
    W/Adreno-GSL(28957): <ioctl_kgsl_syncobj_create:2103>: (22, 9, 37833) fail 24 Too many open files
    W/Adreno-EGLSUB(28957): <SwapBuffers:1334>: gsl_device_3d_add_fence_event failed
    W/Adreno-EGL(28957): <qeglDrvAPI_eglSwapBuffers:3788>: EGL_BAD_SURFACE


    I have tried calling the video in a function using invoke, coroutine and a separate thread. Any ideas on how to fix this?
     
  2. The_Devil

    The_Devil

    Joined:
    Jun 6, 2015
    Posts:
    36
    Fixed it by enabling multithreaded rendering.
     
    Manuj likes this.
  3. Manuj

    Manuj

    Joined:
    Aug 2, 2016
    Posts:
    2
    Thanks Devil, this saved me a ton of time.

    For reference, here was my setup:

    I was playing an mp4 video in Andorid in Scene A, then I would load Scene B. Scene B would freeze after 14 seconds of loading but the background music would continue to play.

    Using your solution fixed my problem.
     
  4. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Looks like yet another crazy quirk with Adreno chips... seriously samsung?! Not sure if anything else uses these, lol...

    Good to know it's fixed either way. I wonder what Multithreaded rendering fixed...
     
  5. The_Devil

    The_Devil

    Joined:
    Jun 6, 2015
    Posts:
    36
    No idea...it was trial and error. Saw some really old posts that said turning off multithreading worked for them but in my case multithreading was already off. So I simply tried turning it on and it worked.