OpenGL ES support on Apple Silicon Simulators

Hey folks,

I have a legacy game that is running OpenGL ES - and it no longer works on the simulators that are running Apple Silicon, ie iPhone 15 Pro, or the 13" iPads. And yes, i'm also running on Apple Silicon (M1 Max).

The apps work fine on the actual devices, but the simulator crashes on any glDrawElements with a stack that looks like the following:

I have not yet seen an announcement about this not working but i've seen mention in other apps of stopping to support GL (https://github.com/maplibre/maplibre-native/issues/2351)

Can anyone shed some light? I'm obviously going to try to fix it, or find a recent sample app from which to start to see what might be up. Or move to metal, but i hadn't bargained for that level of effort atm ;)

Any suggestions appreciated!

Answered by DTS Engineer in 790047022

This appears to be a widespread issue. Nonetheless, it's good that this is limited to the Simulator and doesn't affect actual device.

Please take a moment to file a bug report in the Feedback Assistant and we'll investigate.

Duplicate bug reports are helpful (it's like a vote) so please let us know if this issue affects your development even if you're just browsing this thread thanks.

See if this does anything. I had some issues that required it but it's been long commented out. Maybe when I was on my old MacBook and Apple was moving to Metal. I honestly don't remember.

 #if targetEnvironment(simulator)
        sceneView = SCNView(frame: .zero, options: [SCNView.Option.preferredRenderingAPI.rawValue : NSNumber(value: SCNRenderingAPI.openGLES2.rawValue)])//SCNView()//ARSCNView()
        //sceneView.renderingAPI = SCNRenderingAPI.openGLES2
#endif

I just started getting this crash in the iOS Simulator after updating to Xcode 15.4 and iOS 15.5 based simulators. iOS 15.2 based simulators still work. iOS 15.4 do not, have not tried any other version.

Thread 9: EXC_BAD_ACCESS (code=2, address=0x11279c000)

No idea how to fix it yet.

Thread 9 Queue : com.apple.opengl.cvmDoWork (serial)
0	0x000000010465f410 in _platform_memmove ()
1	0x00000001b9017ff8 in cvmsServerElementBuild ()
2	0x00000001b9013e34 in cvms_element_build_from_source ()
3	0x00000001b900a854 in cvm_deferred_build_modular(void*) ()
4	0x0000000105c8173c in _dispatch_client_callout ()
5	0x0000000105c89a30 in _dispatch_lane_serial_drain ()
6	0x0000000105c8a774 in _dispatch_lane_invoke ()
7	0x0000000105c971a8 in _dispatch_root_queue_drain_deferred_wlh ()
8	0x0000000105c96604 in _dispatch_workloop_worker_thread ()
9	0x000000010467f814 in _pthread_wqthread ()
Enqueued from com.apple.main-thread (Thread 1) Queue : com.apple.main-thread (serial)
0	0x0000000105c861d0 in _dispatch_async_f_slow ()
1	0x00000001b9009df8 in cvmObtainMonolithicFunction ()
2	0x00000001a63883a8 in gleBuildPrimitiveRenderFunc ()
3	0x00000001a63889fc in gleBeginTrianglesRender ()
4	0x00000001a632bd84 in gleDrawArraysOrElements_ExecCore ()
5	0x00000001a632afd0 in glDrawElements_ES2Exec ()

This appears to be a widespread issue. Nonetheless, it's good that this is limited to the Simulator and doesn't affect actual device.

Please take a moment to file a bug report in the Feedback Assistant and we'll investigate.

Duplicate bug reports are helpful (it's like a vote) so please let us know if this issue affects your development even if you're just browsing this thread thanks.

Bug report submitted: FB13850673 (OpenGL ES based app crashed when running on iOS Simulator)

The bug report does not seem to be available ?

I have submitted feedback for the same issue.

OpenGL ES still broken in Xcode Version 16.1 beta.

OpenGL ES support on Apple Silicon Simulators
 
 
Q