我们在ios14上遇到了一个与OpenGL相关的崩溃。它与应用程序背景无关。绝大多数崩溃发生在IOS 14低端设备上,目前还不清楚如何解决这些问题。
唯一可能的线索是,崩溃可能与打开WebView有关。
监视器类型: Unix信号异常类型: EXC_CRASH (SIGABRT)异常代码: 0x00000000 at 0x00000001c7517414崩溃线程:0
Pthread id: 10322737
Thread 0 Crashed:
0 libsystem_kernel.dylib __pthread_kill + 8
1 libsystem_pthread.dylib pthread_kill + 272
2 libsystem_c.dylib abort + 104
3 AppleMetalGLRenderer GLDContextRec::flushContextInternal() + 852
4 GLEngine gliPresentViewES_Exec + 188
5 OpenGLES -[EAGLContext presentRenderbuffer:] + 76
6 myapp -[EJCanvasContextWebGLScreen present] (EJCanvasContextWebGLScreen.m:142)
7 QuartzCore CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 664
8 QuartzCore display_timer_callback(__CFMachPort*, void*, long, void*) + 280
9 CoreFoundation __CFMachPortPerform + 176
10 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
11 CoreFoundation __CFRunLoopDoSource1 + 596
12 CoreFoundation __CFRunLoopRun + 2360
13 CoreFoundation CFRunLoopRunSpecific + 600
14 GraphicsServices GSEventRunModal + 164
15 UIKitCore -[UIApplication _run] + 1072
16 UIKitCore UIApplicationMain + 168
17 myapp main (main.m:36)
18 libdyld.dylib start + 4发布于 2021-05-23 18:25:28
我100%确定presentRenderBuffer在iOS14中工作得很好。
根据错误消息,这似乎是线程问题。
在我的例子中,我使用一个队列来详细说明所有的OpenGL内容。
dispatch_sync(queue, ^{
// All of the OpenGL things
[self bindCurrentRenderBuffer];
[self presentRenderBuffer];
});您可以在Github:IRPlayer中查看我的OpenGL项目
https://stackoverflow.com/questions/65283396
复制相似问题