gpt4 book ai didi

ios - SIGSEGV/SEGV_ACCERR 导致 GPUImage 框架 iOS 崩溃

转载 作者:行者123 更新时间:2023-11-29 12:43:49 33 4
gpt4 key购买 nike

我从我的应用程序中集成的 crittercism 工具获得了 SIGSEGV/SEGV_ACCERR 崩溃报告,这是因为拍摄视频并在从 sleep 模式恢复后将应用程序置于 sleep 模式 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

最佳答案

我从开发 GPUImage 过滤器 api 的 BradLarson 那里得到了解决方案,他从 github 资源中回复。当我们使用 gpuimagevideocamera 时,它总是渲染 opengl,所以当它进入后台模式或 sleep 模式时也会渲染 opengl,然后会发生崩溃,因此,在应用程序移动到后台之前停止相机捕获并删除添加到相机和 picturewriter 的过滤器它解决了问题。谢谢

关于ios - SIGSEGV/SEGV_ACCERR 导致 GPUImage 框架 iOS 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24162503/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com