Search Issue Tracker

Fixed in Unity 2018.2

Votes

1

Found in

2017.2.0p4

Issue ID

981074

Regression

No

[Metal] Crash in ReadPixelsToImage() at TextureReadbackMetal.mm:55

Graphics - General

-

-

Priority: 2Necessary for shipping a final release

-

Severity: 1Crash, freeze, data loss, work stops

Reproduction steps:
1. Open the attached project.
2. Build it.
3. Click "Left corner partially" a few times.
- Application will crash
4. Restart the application and repeat step 3 again if the application will not crash (50% chance for me).

iOS:
* thread #14, name = 'UnityGfxDeviceWorker', stop reason = EXC_BAD_ACCESS (code=1, address=0x1110f4000)
frame #0: 0x00000001acdb103c AGXMetalA11
frame #1: 0x00000001acdad878 AGXMetalA11
frame #2: 0x00000001acd9788c AGXMetalA11
frame #3: 0x0000000187a4a3c8 Metal`-[MTLIOAccelTexture getBytes:bytesPerRow:fromRegion:mipmapLevel:] + 76
frame #4: 0x00000001a973e298 MetalTools`-[MTLDebugTexture getBytes:bytesPerRow:fromRegion:mipmapLevel:] + 220
* frame #5: 0x0000000104670e18 ProductName`::ReadPixelsToImage() at TextureReadbackMetal.mm:55 [opt]
frame #6: 0x00000001046706e0 ProductName`::ReadPixelsToImage() at TextureReadbackMetal.mm:62 [opt]
frame #7: 0x00000001046707e0 ProductName`::ReadbackImage() at TextureReadbackMetal.mm:96 [opt]
frame #8: 0x0000000104931438 ProductName`::RunCommand() at GfxDeviceWorker.cpp:1208 [opt]
frame #9: 0x0000000104666904 ProductName`::GfxDeviceWorkerAutoreleasePoolProxy() at GfxDeviceMetal.mm:3603 [opt]
frame #10: 0x0000000104936e8c ProductName`::RunExt() [inlined] ProcessGfxCommands at GfxDeviceWorker.cpp:142 [opt]
frame #11: 0x0000000104936e64 ProductName`::RunExt() at GfxDeviceWorker.cpp:348 [opt]
frame #12: 0x000000010492f990 ProductName`::RunGfxDeviceWorker() at GfxDeviceWorker.cpp:309 [opt]
frame #13: 0x000000010481a9fc ProductName`::RunThreadWrapper() at Thread.cpp:35 [opt]
frame #14: 0x000000018599832c libsystem_pthread.dylib`_pthread_body + 308
frame #15: 0x00000001859981f8 libsystem_pthread.dylib`_pthread_start + 312
frame #16: 0x0000000185996c38 libsystem_pthread.dylib`thread_start + 4

macOS:
Receiving unhandled NULL exception
Obtained 15 stack frames.
//Empty space, no call stack

Reproduced with:
5.6.5f1, 2017.1.3f1, 2017.2.1p1, 2017.3.0p1, 2018.1.0a7
iPhone 8 Plus iOS 11
iPhone6S iOS 11
macOS

Not reproducible with:
iPhone 7 Plus iOS 10.3.2 (Metal)
iPod Touch 6th gen 10.2.1 (Metal)
iPad Mini 2 iOS 9.2.1 (Metal)
iPad Pro 10.5” iOS 10.3.3 (Metal)
GLES(iOS)
OpenGLCore(macOS)
Editor(Metal)

Comments (2)

  1. A20f156d997d039faf2ddf6c5789086d?d=mm

    pradeep_unity119

    Jul 06, 2018 09:21

    Is there a patch for 5.6?

  2. Dc99f5d9b2a25937f6dd0f2be2940d93?d=mm

    GlennSnyder

    Jan 07, 2018 21:12

    Having a very similar issue specifically on the iPhone 8. Consistent, but seemingly random crashes while interacting with a scene. Not showing the same on the iPhone 6s, 6s+, 7, 7+, 8+, X, or iPads.

    The only error I have seen other than a hard crash is:
    Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED

All about bugs

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