Search Unity

Video Player crash when playing video on Windows 7 machines

Discussion in 'Audio & Video' started by mahdi_jeddi, Jul 24, 2018.

  1. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    45
    Our games crash on Windows 7 64bit machines when a video starts playing. The videos are all standard H.264 1080p files that correctly play on Windows 10 and consoles. We're building the video files into asset bundles and load them from StreamingAssets folder.
    After trying Transcode option, one of the videos plays properly and the other one really slowly. And it crashes anyway if stop the playback.

    Is there a known issue or resolution limitation on Windows 7?

    I attached the crash dump files to this post.
     

    Attached Files:

  2. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    45
    Update: I tried lowering the resolution to 720p and seems to have fixed the immediate crashes. But the build still crashes after a few videos. Looks like a memory leak in Unity's video player to me.
     
  3. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    45
    Another Update: There is an error message when the video is being played:

    WindowsVideoMedia error 0xc00d36b2 while reading archive:/CAB-2d16d79b9859a6cd28f19559f209a262/CAB-2d16d79b9859a6cd28f19559f209a262.resource
    Context: IMFSourceReader::SetStreamSelection
    Error details: The request is invalid in the current state.
    Track types:
    Audio Track, type:
    (Filename: C:\buildslave\unity\build\Modules/Video/Public/Media/WindowsMedia/WindowsVideoMedia.cpp Line: 2456)
    WindowsVideoMedia error 0xc00d36b3 while reading archive:/CAB-2d16d79b9859a6cd28f19559f209a262/CAB-2d16d79b9859a6cd28f19559f209a262.resource
    Context: IMFSourceReader::WaitForSample
    Error details: The stream number provided was invalid.
    Track types:
    (Filename: C:\buildslave\unity\build\Modules/Video/Public/Media/WindowsMedia/WindowsVideoMedia.cpp Line: 2456)
     

    Attached Files:

  4. David_Fenner

    David_Fenner

    Joined:
    Dec 14, 2015
    Posts:
    1
    Hi!! I'm having the same issue. Have you found a solution?
     
  5. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    45
  6. zach_unity281

    zach_unity281

    Joined:
    Jun 22, 2019
    Posts:
    1
    Seeing this too in 2018.3.14! Any updates?
     
  7. LightArc

    LightArc

    Joined:
    Nov 11, 2013
    Posts:
    3
    On 2019.1.8f1 we are hitting Windows 7 only crash. Its a 4 minute 1080p video, with transcoding flagged set. Has been on auto and now forced to H264. User logs show following stack but looks like it might be wrong thread.

    ========== OUTPUTTING STACK TRACE ==================
    0x000007FED53CACDE (UnityPlayer) PAL_Timer_WaitForAtLeast
    0x000007FED473E04E (UnityPlayer) UnityMain
    0x000007FED4D02AB4 (UnityPlayer) UnityMain
    0x000007FED4D04111 (UnityPlayer) UnityMain
    0x000007FED4D04248 (UnityPlayer) UnityMain
    0x000007FED4CF6BB3 (UnityPlayer) UnityMain
    0x000007FED490D999 (UnityPlayer) UnityMain
    0x000007FED490E9FC (UnityPlayer) UnityMain
    0x000007FED490DAB7 (UnityPlayer) UnityMain
    0x000007FED490DE30 (UnityPlayer) UnityMain
    0x000007FED490EF33 (UnityPlayer) UnityMain
    0x000007FED49B28C9 (UnityPlayer) UnityMain
    0x0000000076D759CD (kernel32) BaseThreadInitThunk
    0x0000000076EAA561 (ntdll) RtlUserThreadStart
    ========== END OF STACKTRACE ===========

    I tried H265 and user reported it just hangs on black screen rather than crashing. Any ideas?
     
  8. LightArc

    LightArc

    Joined:
    Nov 11, 2013
    Posts:
    3
    Note. Some shorter vids we have seem to work ok with same settings.
     
  9. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    45
    Our issue seemed like a memory leak because we would get a crash after player a few videos. Shorter videos may not crash immediately, but the subsequent playbacks may finally crash the game. As I said we could wait for a solution from Unity, so we decided to have an alternative MJPG version of all of our videos and show them when we detect a Win7 machine. It's not an elegant solution but can't see any other one.
     
  10. LightArc

    LightArc

    Joined:
    Nov 11, 2013
    Posts:
    3
    Thanks for getting back to me. I've reported to Unity also, but might copy your approach. At the moment I've just disabled / skipped the vids for win 7 so at least they can play the rest of the game.
     
  11. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    45
    Thanks for reporting the bug. I don't remember if I reported a bug back then or not, but it never hurts to have multiple bug reports for the same issue.
     
  12. CarlT17

    CarlT17

    Joined:
    May 2, 2017
    Posts:
    1
    Hi all!

    We're also experiencing this issue in 2018.3.7f1.

    WindowsVideoMedia error 0xc00dd36b2 while reading .../Project_Data/sharedassets2.resource
    Context: IMFSourceReader: SetStreamSelection
    Error details: The request is invalid in the current state.
    Track types:
    Video track [1920 x 1080], type: H264

    WindowsVideoMedia error 0xc00dd36b3 while reading .../Project_Data/sharedassets2.resource
    Context: IMFSourceReader: WaitForSample
    Error details: The stream number provided was invalid.
    Track types:


    In our project, the videos break immediately. The two videos are both 1920x1080 encoded as H.264 and are 01:07 and 02:17 in duration. The problem is only seen on Windows 7. They appear to work more often at lower resolutions.

    @LightArc, have you heard anything from Unity regarding your report?
     
  13. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    157
    I am experiencing the same problem with 2018.4.3f1, a 1.5 minute 1080p video h264 works like a charm on W10, crashes with the same error messages you guys got on a W7 machine (with a ton of free ram, so it doesn't really look like a leak somehow).

    Anybody had any luck with any of the workarounds beside adding an additional player?
     
  14. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    157
    Is there any news about this one? We are one month from release, and while VP8 transcoded-videos work, they have horribile performances even on good test machines (on low end test machines the videos stutter so much that they are impossible to watch).

    How is it possible that such a big bug is still unsolved? The amount of Windows 7 machines is pretty big on the Steam store, I can't just ignore them unfortunately. Or has it been solved and I am missing something? I am still running on 2018.4 LTS.