Search Unity

Video Unity build crashes on second launch playing a video.

Discussion in 'Audio & Video' started by livingtarget, Jun 15, 2017.

  1. livingtarget

    livingtarget

    Joined:
    Apr 21, 2015
    Posts:
    83
    I was wondering if anyone seen any video player crashes which outright kills the application on PC usually the second time you run the application? I had a rogue video.Stop(); which I believe was the culprit when called at loopPointReached.

    Code (CSharp):
    1.     private void OnPrepareCompleted(VideoPlayer source)
    2.     {
    3.         // play video
    4.         video.Play();
    5.         video.loopPointReached += OnVideoEnd;
    6.     }
    7.  
    8.     private void OnVideoEnd(VideoPlayer source)
    9.     {
    10.         // crash here, removing this makes everything ok
    11.         video.Stop();
    12.  
    13.         SceneManager.LoadScene("My Funky Scene");
    14.     }
    Can't really be bothered to submit a bug report, but just leaving this here. Note that it was fine in the editor.
     
  2. tanveerm

    tanveerm

    Joined:
    Feb 24, 2016
    Posts:
    22
    even I'm experiencing crash at same point when I try to stop the video player. I'm using Unity 5.6.2f1
     
  3. highlyinteractive

    highlyinteractive

    Joined:
    Sep 6, 2012
    Posts:
    116
    Yes, I'm having the exact same issue.

    Unity 5.6.3f1
     
  4. game176

    game176

    Joined:
    Jan 12, 2015
    Posts:
    1
    loopPointReached will crash on android and windows