简体   繁体   English

SIGSEGV / SEGV_ACCERR导致GPUImage框架iOS崩溃

[英]SIGSEGV/SEGV_ACCERR causes crash in GPUImage framework iOS

I was getting the SIGSEGV/SEGV_ACCERR crash report from crittercism tool integrated in my app, this was because of taking a video capturing and leaving the app in sleep mode for 15-20 minutes after coming back from sleep mode the app crashed, this is blocker issue in my case .Please suggest the solution, thanks in advance The following shows the sample code used: 我从集成在我的应用程序中的crittercism工具获取了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];

The following represents the crash report 以下代表当机报告

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

I got the solution from BradLarson who develops the GPUImage filters api,he responded from the github resource. 我从开发GPUImage过滤器api的BradLarson获得了解决方案,他从github资源中做出了回应。 When we use the gpuimagevideocamera its always renders the opengl so when it goes to background mode or sleep mode also rendering the opengl then crash will happen so, before app moves to the background stop the camera capture and remove the filters added to the camera and picturewriter it solves the problem. 当我们使用gpuimagevideocamera时,它始终会渲染opengl,因此当它进入后台模式或睡眠模式时也会渲染opengl,然后会崩溃,因此,在应用程序移至后台之前,请先停止摄像头捕获并删除添加到摄像头和图片编写器中的滤镜它解决了这个问题。 Thank you 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM