Search Unity

An exception appears in VideoPlayer on UWP

Discussion in 'Windows' started by manakami, Jun 18, 2018.

  1. manakami

    manakami

    Joined:
    May 23, 2018
    Posts:
    13
    Hi everyone!

    We are playing mp4 using the VideoPlayer component in UWP.
    It looks like it is working.
    However, exception comes out every frame in VS output.
    We do not know the cause or workaround for it.

    If necessary can also submission the min sample.
    Please help me.

    Info
    Unity2018.1.2f1
    script backend: .NET / IL2CPP (Both)
    Scriot Runtime Version: .NET 4.x Equivalent
    Api Compatibility Level .NET 4.x
    mp4 Path: /StreamingAssets/***.mp4
     
  2. manakami

    manakami

    Joined:
    May 23, 2018
    Posts:
    13
    Log
    (Japanese: It is hard to read, but it will be better than nothing)

    Exception thrown at 0x00007FFEFAB8A388 (KernelBase.dll) in TestMovieUWP.exe: WinRT originate error - 0xC00D36B3 : '提供されたストリーム番号は無効です。'.
    Exception thrown at 0x00007FFEFAB8A388 in TestMovieUWP.exe: Microsoft C++ exception: _com_error at memory location 0x000000B1A76F5728.
    Exception thrown at 0x00007FFEFAB8A388 in TestMovieUWP.exe: Microsoft C++ exception: _com_error at memory location 0x000000B1A76F5728.


    The last exception is output for all frames that play Movie.
     
    Last edited: Jun 18, 2018
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,676
    I would not worry about it. These exceptions are likely thrown inside Windows Media Foundation libraries and caught within, which makes them harmless. You should just be able to ignore them.
     
  4. manakami

    manakami

    Joined:
    May 23, 2018
    Posts:
    13
    Thank you!

    We aer worried about ignoring exceptions, but I will follow your advice.
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,676
    Look at it this way:

    Code (csharp):
    1. try
    2. {
    3.     File.ReadAllLines("aaa.txt");
    4. }
    5. catch (FileNotFoundException)
    6. {
    7.     // file didn't exist, carry on
    8. }
    What it generally means is that some code inside Microsoft libraries throw an exception, but they are caught as they're expecting them. It's no different as when you do it in your C# code.