MediaPipeUnityPlugin: iOS crash when changing scenes with Selfie Segmentation

Plugin Version or Commit ID

v0.10.1

Unity Version

2021.3.12f1

Your Host OS

Windows 11

Target Platform

iOS

Description

Hi, Only on iOS build (iPhone XR) when navigating between scenes several times (5-10 times), and one scene is initializing MediaPipe Selfie Segmentation sample, I get crash. It is hard to get a log when the app crashes, but sometimes I get this errors (they are watched with Sentry, but almost always only one of them at once:

System.InvalidOperationException: The table is full File "GlobalInstanceTable.cs", line 36, in Add File "Assembly-CSharp3.cpp", line 15896, in Start File "GraphRunner.cs", line 99, in Start

System.NullReferenceException: Object reference not set to an instance of an object. File "SolutionCustom.cs", line 101, in ReadFromImageSource File "ImageSourceSolutionCustom.cs", line 110, in Run

System.NullReferenceException: Object reference not set to an instance of an object. File "Assembly-CSharp1.cpp", in WaitForWebCamTexture { <lambda> } ... (1 additional frame(s) were not displayed)

Please, give some advice what can be a reason of that crash.

Code to Reproduce the issue

No response

Additional Context

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

one texture (from TextureFramePool probably) remains in memory

I’m not sure, but maybe the texture of the Screen? https://github.com/homuler/MediaPipeUnityPlugin/blob/2c8a31ae5b4232fbffd97fdc6b4f2b8f1a6370b4/Assets/MediaPipeUnity/Samples/Common/Scripts/ImageSourceSolution.cs#L14