SIGSEGV / SEGV_ACCERR导致GPUImage框架iOS崩溃

时间:2014-06-11 12:04:00

标签: ios iphone xcode uiimagepickercontroller gpuimage

我从我的应用程序中集成的关键工具获取了SIGSEGV / SEGV_ACCERR崩溃报告,这是因为在从睡眠模式恢复后应用程序崩溃后拍摄视频并将应用程序置于睡眠模式15-20分钟在我的情况下这是阻碍问题。请提前解决,建议解决方案 以下显示了使用的示例代码:

GPUImageiOSBlurFilter   * blurFilterObj = [[GPUImageiOSBlurFilter alloc] init];
    blurFilterObj.blurRadiusInPixels = 4.5f ;
    blurFilterObj.downsampling = 2.5f ;
    blurFilterObj.saturation = 1.0f;



GPUImageVideoCamera  *liveVideo = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPresetMedium cameraPosition:AVCaptureDevicePositionFront];
    liveVideo.outputImageOrientation = UIInterfaceOrientationPortrait;
    liveVideo.horizontallyMirrorFrontFacingCamera = YES ;

    //Add Targets to live video
    [liveVideo addTarget:blurView];
   [liveVideo addTarget:blurFilterObj];
 [blurFilterObj addTarget:blurView];

   CSBlurView  *blurView = [[CSBlurView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    [self.view addSubview:blurView];

GPUImageVideoCamera  *liveVideo = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPresetMedium cameraPosition:AVCaptureDevicePositionFront];
    liveVideo.outputImageOrientation = UIInterfaceOrientationPortrait;
    liveVideo.horizontallyMirrorFrontFacingCamera = YES ;

    //Add Targets to live video
    [liveVideo addTarget:blurView];
   [liveVideo addTarget:blurFilterObj];
 [blurFilterObj addTarget:blurView];

以下代表崩溃报告

libGPUSupportMercury.dylib 0x322d48f6 gpus_ReturnNotPermittedKillClient + 1 
IMGSGX543GLDriver 0x2c7e282d SubmitPackets + 125
GLEngine 0x2fc44c3d gliPresentViewES + 17   
OpenGLES 0x2fc4f139 -[EAGLContext presentRenderbuffer:] + 65    
0x0006f2a3 -[GPUImageContext presentBufferForDisplay] (GPUImageContext.m:196)
0x00074a75 -[GPUImageView presentFramebuffer] (GPUImageView.m:220)
0x0004e23d runSynchronouslyOnVideoProcessingQueue (GPUImageOutput.m:27
0x00074cdd -[GPUImageView newFrameReadyAtTime:atIndex:] (GPUImageView.m:385)    
0x0002096f -[GPUImageVideoCamera      updateTargetsForVideoCameraUsingCacheTextureAtWidth:height:time:] (GPUImageVideoCamera.m:640) 
0x00020ceb -[GPUImageVideoCamera processVideoSampleBuffer:] (GPUImageVideoCamera.m:738) 
0x000216bf __74-[GPUImageVideoCamera  captureOutput:didOutputSampleBuffer:fromConnection:]_block_invoke  (GPUImageVideoCamera.m:966)    
libdispatch.dylib 0x38246d1b _dispatch_call_block_and_release + 11  
libdispatch.dylib 0x3824d273 _dispatch_queue_drain$VARIANT$mp + 375 
libdispatch.dylib 0x3824d06b _dispatch_queue_invoke$VARIANT$mp + 43
libdispatch.dylib 0x3824dce1 _dispatch_root_queue_drain + 77
libdispatch.dylib 0x3824df59 _dispatch_worker_thread2 + 57  
libsystem_pthread.dylib 0x38388dbf _pthread_wqthread + 299  
libsystem_pthread.dylib 0x38388c84 start_wqthread + 8

1 个答案:

答案 0 :(得分:1)

我从开发GPUImage过滤器api的BradLarson那里得到了解决方案,他从github资源回复。当我们使用gpuimagevideocamera时,它总是呈现opengl,所以当它进入后台模式或睡眠模式时也会渲染opengl然后崩溃​​将发生,所以,在app移动到后台停止相机捕获并删除添加到相机和图片编写器的过滤器它解决了这个问题。谢谢