I have an App,use Metal-api, it worked well at Xcode12, but when I upgrade Xcode13.0,things changed, it always crash at newFunctionWithName
.
How do I get my metal library:
- My app is multiple-render-backend, so my shader is
.glsl
, useglslangValidator
turn it to.metal
- get metallib,refrence : Building a Library with Metal's Command-Line Tools,
- use
dispatch_data_create
to load metallib, and callnewLibraryWithData
to get MTLLibrary, then callnewFunctionWithName
to get MTLFunction , crash here.
Because it's my company's code,so SORRY, I can't share the code or screenshot.
The same code, worked on Xcode11 and Xcode12,but crash at Xcode13.0 when use Xcode to debug.
Xcode13.0: crash at debug, but successfully run on independent or in Xcode-Instrument.
I have no clue, what should I do to solve this problem on Xcode13.0, or it's the bug on Xcode13.0?
@Apple
ps: (that problem above occurred on x86_64-mac,macOS 11.5)
Hi BenjaminLee,
When launching your application via Xcode, a the app is subject to a few environment changes that Xcode does in order to help you test your application. The debugger is connected to the program, the Metal Debug and Validation layers may be enabled, there might even be instrumentation that halts the app if a memory problem is detected.
If you can share what the platform error message you are obtaining is, we might be able to help you narrow down the cause. If this is not possible, I would recommend to start disabling debugging capabilities in the Xcode scheme to make your app's environment more closely resemble a standalone launch. That way you can narrow down which component is triggering the crash.