Search Issue Tracker




Found in

Issue ID




Metal crashes in multithreaded mode when changing resolution.

Mobile Rendering


Metal throws assert if you change resolution from script using Screen.SetResolution(400, 300, false, 0);. This happens both on iOS and tvOS. It doesn't crash if you pass "-force-gfx-direct" arg.

/BuildRoot/Library/Caches/ failed assertion `No valid pixelFormats set.'

#4 0x000000018409734c in MTLReportFailure ()
#5 0x0000000184096940 in -[MTLRenderPipelineDescriptorInternal validateWithDevice:] ()
#6 0x0000000107508be0 in ___lldb_unnamed_function458$$AGXMetalG4P ()
#7 0x00000001017c282c in metal::InitializeBlitFramebuffer(metal::BlitFramebufferDrawQuad&, RenderSurfaceMetal*) at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/metal/
#8 0x00000001015c49d4 in UnityBlitToBackbuffer at /Users/Smilediver/Projects/Unity/unity/PlatformDependent/iPhonePlayer/
#9 0x000000010004f58c in PreparePresentMTL at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/
#10 0x000000010004e07c in PreparePresent(UnityDisplaySurfaceBase*) at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/UnityRendering.h:206
#11 0x000000010004c3fc in -[DisplayConnection present] at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/
#12 0x000000010004d610 in __25-[DisplayManager present]_block_invoke at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/
#13 0x000000010004d2bc in -[DisplayManager enumerateDisplaysWithBlock:] at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/
#14 0x000000010004d5c4 in -[DisplayManager present] at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/
#15 0x0000000100044e48 in -[UnityAppController(Rendering) callbackPresent:] at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/
#16 0x0000000100045460 in UnityPresentContextCallback at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/
#17 0x00000001017cd434 in GfxDeviceMetal::PresentFrame() at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/metal/
#18 0x000000010178dc04 in GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:1009
#19 0x00000001017cded8 in GfxDeviceWorkerAutoreleasePoolProxy at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/metal/
#20 0x00000001017b0a88 in GfxDeviceWorker::Run() at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:331
#21 0x0000000101772d40 in GfxDeviceWorker::RunGfxDeviceWorker(void*) at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:306
#22 0x000000010104ac80 in Thread::RunThreadWrapper(void*) at /Users/Smilediver/Projects/Unity/unity/Runtime/Threads/Thread.cpp:44

Comments (10)

  1. quitebuttery

    Jul 01, 2018 04:01

    I'm getting this error in MacOS on 2018.1.6f

  2. Rich0

    Jun 21, 2018 03:32

    I think this might be a regression in 2018.1.5f1 - getting same issue.

  3. udede

    Jun 03, 2018 11:48

    [MTLRenderPipelineDescriptorInternal validateWithDevice:], line 2400: error 'No valid pixelFormats set.'
    -[MTLRenderPipelineDescriptorInternal validateWithDevice:]:2400: failed assertion `No valid pixelFormats set.'

    2018.1 version

    bug fixed?

  4. JanQGames

    Oct 17, 2017 08:51

    We still have this issue right now

    [MTLRenderPipelineDescriptorInternal validateWithDevice:], line 2400: error 'No valid pixelFormats set.'
    -[MTLRenderPipelineDescriptorInternal validateWithDevice:]:2400: failed assertion `No valid pixelFormats set.'

    Any ETA for the fix?


  5. billy-kahong-chan

    Sep 14, 2016 08:21

    It's still occur in my iPhone6 after update to 5.4.1

  6. douke_akira

    Aug 25, 2016 01:48

    Error in iphone 6 / 6S has occurred.
    The iphone 5 / 5S has started.
    However error elsewhere occurs.

  7. ranguera

    Aug 23, 2016 22:46

    Same here.. i had no issues with 5.3 but crashing now with that error on 5.4

  8. mcmorry

    Aug 23, 2016 16:21

    Up... I need a fix too. Release notes from 5.4.0f3 on don't report anything about this.
    So looks like is a regression of a regression...

  9. kenblaue

    Aug 11, 2016 18:16

    I updated to unity ver 5.4.0f3 today, and bug still exists...

  10. flashmandv

    Jul 28, 2016 08:45

    Which version is this bug fixed in ?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.