openGL iPad game on M1 with 11.3

Previously on 11.2.3 I was able to run my OpenGL game targeting my M1 Mac mini as an iPad game. After updating to macOS 11.3 I am now getting an error in Metal. Is this expected moving forward and a sign that we need to focus on porting to Metal sooner rather than later?

-[_MTLFunctionInternal baseObject]: unrecognized selector sent to instance 0x13046dab0

Crashing on:

glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, nullptr);

Thanks,
Steven Behnke
Answered by ForumsContributor in
Same error
My app is running fine on iPhone but when I deploy on MacOS 11.3.1, it crashes with error
  • [MTLIOAccelDevice registerDevices]: Zero Metal services found

  • [_MTLFunctionInternal baseObject]: unrecognized selector sent to instance 0x11de708d0

[General] -[_MTLFunctionInternal baseObject]: unrecognized selector sent to instance 0x11de708d0
.
.
.
12  GLEngine                            0x00000001e5770444 glDrawElements_ES2Exec + 280
Thanks for the reply. I can confirm it still occurs on my app as well with 11.3.1. It seems like OpenGL got broken and I don't know if Apple has any desire to fix it as it was marked deprecated.

Hi,

I got similar [General] -[_MTLFunctionInternal baseObject]: unrecognized selector sent to instance 0x129e42710 crashes with

12  GLEngine                            0x00000001e545eea4 glDrawArrays_ES2Exec + 216

It worked fine for running the iPhone app on my M1 MacBook Pro (MacOS 11.4). But after I updating static library (*.a file) or changing CocoaPods integration from dynamic to static, the crashes happened without other changes.

After a few searches, I found a workaround for running on M1 MacBook (not solving the real problem).

Maybe you can try it:

  1. Got to Edit Scheme → Run → Options → GPU Frame Capture.
  2. Change value from Automatically Enabled to OpenGL ES or Disabled.

Accepted Answer

Disable Metal validation.

openGL iPad game on M1 with 11.3
 
 
Q