最近首次使用Xcode 9 编译我三个月前写的一个基于GPUImage的“美颜”相机时,发生了崩溃。

崩溃点在于
-[GPUImageContext presentBufferForDisplay]:
这就很懵逼了,GPUImage自己应该不会有问题的,并且回忆当初我收尾该项目的时候,项目是完好的。
于是乎我把关注点放在了Xcode9 以及我的iOS11上。
最后结论就是Xcode 9的问题,在Schema->Run->Options中,GPU Frame Capture默认设置为Automatically Enable,这样会导致该处崩溃。

解决方式就是将其设置为Metal或者Disabled可以解决崩溃问题:


这个崩溃也是很懵逼,我也尝试过使用OpenGLES选项,但是依旧是崩溃。不知这是不是Xcode9 beta的bug。还是期待正式版本的Xcode9了。
网友评论