I’m in Chapter 12 (near the end) and all of a sudden, I started crashing, stopping
at Model.Render.drawIndexedPrimitives. I tracked it down to some code in
Fragment.metal. I put some extra code in to try and target the “crash”, specifically
just paint everything orange.
The area is where I just added stuff about using the IdTexture.
The following is the code which does NOT crash
material.baseColor = vector_float3(0.9, 0.5, 0.0);
if (!is_null_texture(idTexture)) {
material.baseColor = vector_float3(0.9, 0.5, 0.0);
}
The following is the code which does crash
// material.baseColor = vector_float3(0.9, 0.5, 0.0);
if (!is_null_texture(idTexture)) {
material.baseColor = vector_float3(0.9, 0.5, 0.0);
}
All I’ve done is comment out the material.baseColor assignment.
Anyone have any idea why this is crashing? I could move to another Xcode
(currently running Version 16.0 (16A242d)) as I see a 16.1 (Beta 2 16B5014f),
but I’m not sure that’ll solve my issue (and then, I’m an old coder so I’m a little
adverse to “beta” anything).
Of course, I’m open to the fact that I’m just doing something really dumb.