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

Bug Unity iPhone 14 (iOS 11-16 build) crashes on debug builds

Discussion in 'iOS and tvOS' started by kidsgamesgo, Dec 22, 2022.

  1. kidsgamesgo

    kidsgamesgo

    Joined:
    Dec 14, 2022
    Posts:
    2
    Unity 2021.3.16

    Hello,
    I'm having an issue with a simple app that uses OnRenderImage to do some brush drawings renderings on iPhone. The crash always happens when I build with "Run in XCode as Debug" (no matter what other options are set, also with Metal Validity on and off). It only works if I remove the OnRenderImage from camera entirely. Even with empty body it will crash. (The scene has 2 cameras, only one has the script attached, the second is for UI).

    The crash:
    0x11015f770 <+136>: cmp w20, #0x2 Thread 1: signal SIGABRT

    Error:
    -[MTLDebugCommandBuffer lockPurgeableObjects]:2131: failed assertion `MTLResource 0x10575a7d0 (label: DrawableProxy), referenced in cmd buffer 0x105813600 (label: (null)) is in volatile or empty purgeable state at commit'

    Stack:
    upload_2022-12-23_0-12-16.png

    P.S. Same on iOS 16
     
    Last edited: Dec 22, 2022
  2. kidsgamesgo

    kidsgamesgo

    Joined:
    Dec 14, 2022
    Posts:
    2
    Ok, solved it...

    I've read about disabling the Metal Validation and did it... in Unity!
    Seems like Unity doesn't generate the project schema with checkbox off so you need to manually go to Product -> Scheme -> Edit Scheme -> Run -> Diagnostics and uncheck the Metal API Validation there.
     
    BrothersPicuresGame likes this.