Search Issue Tracker

Fixed in 5.6.0f3

Votes

0

Found in

5.6.3f1

Issue ID

948417

Regression

No

[Metal] Crash in _pthread_kill when using CommandBuffer.GetTemporaryRT on Unity 5.6

Graphics - General

-

How to reproduce:
1. Open the attached "CrashMetal" project and "ShowcaseSceneContactShadows" scene
2. Enable "Main Camera" GameObject

Result - Crash occurs on:
----------------------------------------------------------------------------------------------------
0 libsystem_kernel.dylib 0x00007fff9ca68d42 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff9c9ce420 abort + 129
2 libsystem_c.dylib 0x00007fff9c995893 basename_r + 0
3 Metal 0x00007fff8aa8de0b MTLReportFailure + 822
4 Metal 0x00007fff8aa6a73b -[MTLTextureDescriptorInternal validateWithDevice:] + 946
5 GeForceMTLDriver 0x00007fff839314c3 GeForceMTLDriver + 947395
6 GeForceMTLDriver 0x00007fff838e1060 GeForceMTLDriver + 618592
7 Unity 0x0000000102cc7961 _ZL22InitRenderSurfaceMetalR18RenderSurfaceMetal14MTLPixelFormat + 1137
8 Unity 0x0000000102cc746a _ZN5metal24CreateColorRenderSurfaceEP23ColorRenderSurfaceMetal19RenderTextureFormat + 58
9 Unity 0x0000000102cbadbe _ZN14GfxDeviceMetal32CreateColorRenderSurfacePlatformEP17RenderSurfaceBase19RenderTextureFormat + 14
10 Unity 0x0000000101a67740 _ZN15GfxDeviceWorker10RunCommandER20ThreadedStreamBuffer + 1984
11 Unity 0x0000000102cbdbdc GfxDeviceWorkerAutoreleasePoolProxy + 60
12 Unity 0x0000000101a70a54 _ZN15GfxDeviceWorker3RunEv + 116
13 Unity 0x0000000101a66e71 _ZN15GfxDeviceWorker18RunGfxDeviceWorkerEPv + 81
14 Unity 0x00000001022430fa _ZN6Thread16RunThreadWrapperEPv + 90
15 libsystem_pthread.dylib 0x00007fff9cb5393b _pthread_body + 180
16 libsystem_pthread.dylib 0x00007fff9cb53887 _pthread_body + 0
17 libsystem_pthread.dylib 0x00007fff9cb5308d thread_start + 13
----------------------------------------------------------------------------------------------------

Reproducible with - 5.6.0a5, 5.6.3p3, 2017.1.0b1
Not reproducible with - 2017.1.0b2 (fixed in this version) and later

Fixed in - 5.6.6f2

Note: Crash seems to be caused by this line of code "computeShadowsCB.GetTemporaryRT(cShadow, -1,-1,0, FitlerMode.Billinear, RenderTextureFormat.R8);" in the NGSS_ContactShadows.cs file. Commenting it prevents the crash

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.