Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Crash - Concurrency problems when integrated with AVPro Media Capture

Discussion in 'Unity Render Streaming' started by gnp89, Jul 26, 2022.

  1. gnp89

    gnp89

    Joined:
    Jun 25, 2012
    Posts:
    36
    I integrated AVPro Media Capture to record a render texture with the webRTC video feed.
    The purpose is to record what a VR user is seeing in real time.

    Target platform is iOS.
    I'm getting the following error when trying to record:

    2022-07-26 14:23:36.821896-0300 MyProject[66755:5003449] -[AGXA10FamilyCommandBuffer renderCommandEncoderWithDescriptor:], line 380: error 'A command encoder is already encoding to this command buffer'
    -[AGXA10FamilyCommandBuffer renderCommandEncoderWithDescriptor:]:380: failed assertion `A command encoder is already encoding to this command buffer'
    dyld4 config: DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib

    When I don't start the WebRTC session, and try to record, the issue goes away.
    Even if I establish a WebRTC connection with no Streams, the bug is still there. I tried removing the video stream but still crashing.

    Any idea about what might be causing this? Maybe some semaphore or mutex could be added to avoid it?