GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

GPUImageView EXC_BAD_ACCESS

Open llinardos opened this issue 9 years ago • 27 comments

Hi. I'm getting an EXC_BAD_ACCESS (EXC_ARM_DA_ALIGN) on GPUImageView:167, when renderbufferStorage is called (EAGLContext_renderbufferStorage).

It's happening in examples too (SimpleVideoFilter).

I'm running in an iPhone 5 with iOS 8.

Any ideas?

llinardos avatar Jun 10 '15 04:06 llinardos

Facing same issue on startup of app. Feels like it only started happening after switching running device to iOS8.3 (and dev machine to Xcode 6.3.2). Before I used 8.0.2 and it worked fine..

svatynepi avatar Jun 15 '15 14:06 svatynepi

I have participated from Apple WWDC and I get this EXC_BAD_ACCESS happened on XCode 6.3.2 and XCode 7 deploing the app in iOS 8.3 and iOS 9.

What is hapening is that all Apps compiled in Release version Crashes. If you compile with Debug version you can't debug your App but the App can Run.

I have talked with the apple Engineers in the WWDC Labs and the only thing that we could figure out is if you go to Product -> Scheme -> Edit Scheme ... And for the Run Debug configuration (on left side) choose "Options" (on right side) and configure "GPU Frame Capture" as Disabled.

This is the only way to stop having this EXC_BAD_ACCESS, but this is not a solution because application still crashes if you run Release version, you still cant debug and can't make use of the Instruments too. I have tested with the Sample Code provided with the library and same error occurs.

I think that this issue is something related with race condition of some threads, but I am trying to fix it, but nothing until now.

So it appears that every app that uses GPUImage will crash when iOS 9 was released.

limagustavo avatar Jun 21 '15 02:06 limagustavo

I'm also having this issue using plain GLKit with OpenGLES in 8.3.

Tagalong avatar Jun 24 '15 08:06 Tagalong

I'm also faced with this issue. XCode 6.3.1, iOS 8.3

vilimets avatar Jun 25 '15 21:06 vilimets

Facing the same issue on iOS 8.3

vadimavdeev avatar Jun 25 '15 22:06 vadimavdeev

I'm also having the issue with simple video preview sample. Xcode 6.3.2, iOS 8.3

gonghao avatar Jun 29 '15 07:06 gonghao

Yup same issue here on 8.3 on ipad. Ios 9 beta 2 on iphone 6 plus is fine though.

kallipigous avatar Jun 29 '15 16:06 kallipigous

limagustavo, you have made my day, thank you very much.

lonkly avatar Jul 03 '15 14:07 lonkly

So the current version of GPUImage is going to be not compatible with iOS 8.4? Will compiling the app with version 0.1.6 going to cause problems with this issue?

hudaniel avatar Jul 05 '15 00:07 hudaniel

So I just had a chance to look into this, and with Xcode 6.4 and iOS 8.4 on an iPhone 6 I can't reproduce this. It's possible this was a bug in iOS 8.3 and the first beta of iOS 9, since people are reporting that the latest beta of iOS 9 doesn't exhibit this behavior. I've tested my example applications against both debug and release builds, with and without GPU frame capture enabled.

There wasn't anything special about what I was doing with that line of code. It's standard OpenGL ES rendering code for associating rendered content with a CAEAGLLayer. I've used code like that since iPhone OS 2.0 without issue.

Does anyone still see this with Xcode 6.4 and iOS 8.4 or the latest iOS 9.0 beta? If so, do any of the sample applications that ship with the framework exhibit this behavior? If I have a reproducible test case, I can look into it further.

BradLarson avatar Jul 06 '15 18:07 BradLarson

@BradLarson I am still able to reproduce it on iOS 8.4, iPhone 5s, Xcode4. Yes it really is a standard OpenGL ES rendering code, nothing special about it. Yet turning off GPU Frame Capture helps avoiding it. I will try to make a test app asap, yet you need iPhone 5s to reproduce. Still it seems to me, that it is not your fault, Apple might fix it in Xcode 8.4.1 or something

lonkly avatar Jul 06 '15 18:07 lonkly

I had this issue with iOS 8.3. After I upgraded test device operating system to iOS 8.4, it has not been exhibiting anymore (iPad 3rd generation, xCode 6.4).

lure71 avatar Jul 06 '15 18:07 lure71

I can verify I just ran in to this on iOS 8.3 and Xcode Version 6.4 (6E35b). Updating to 8.4 appeared to clear it for me. I also wonder if opening the project in the Xcode 7 Beta might have left some cruft in the project, but that's pure speculation.

jriskin avatar Jul 06 '15 19:07 jriskin

@BradLarson It works well on Xcode 6.4 and iOS 8.4. Thank you.

gonghao avatar Jul 07 '15 03:07 gonghao

killing DerivedData/ and recompiling project using xcode 6.2 did not resolve the issue for me. I have to kill GPU image usage on devices prior to 8.4 CGFloat iOSVersion = [[[UIDevice currentDevice] systemVersion] floatValue]; if(iOSVersion<8.4) { // gpuimage no longer works on ios prior to 8.4 in xcode 6.4 [self processCorners:1 forImage:uiImage]; }else { GPUImagePicture stillImageSource = [[GPUImagePicture alloc] initWithImage:uiImage]; GPUImageHarrisCornerDetectionFilter *harrisFilter = [GPUImageShiTomasiFeatureDetectionFilter new]; harrisFilter.cornersDetectedBlock = ^(GLfloat cornerArray, NSUInteger cornersDetected, CMTime frameTime) { [self processCorners:cornersDetected forImage:uiImage]; }; [stillImageSource addTarget:harrisFilter]; [harrisFilter useNextFrameForImageCapture]; [stillImageSource processImage]; } :-[[[[

sndive avatar Jul 08 '15 15:07 sndive

@sndive - I think this is only localized to 8.3. 8.2 and below worked just fine in all of my testing. Are you seeing issues deploying from Xcode 6.4 to iOS versions below 8.3?

BradLarson avatar Jul 08 '15 15:07 BradLarson

Disable GPU Frame Capture work well on iOS 8.3

crossle avatar Jul 09 '15 07:07 crossle

I have the same problem. I have an iPhone 6 on iOS 8.3, It crashed at that place. Then I update iOS to 8.4. It never crashed.

Onetaway avatar Jul 17 '15 08:07 Onetaway

Is there already a solution for it, it appears to crash only when i run it via xcode 6.4 when i kill the app and launch it without xcode it works like a charm iOS version 8.3 xCode version 6.4 Hope this will be solved :-)

schusterlich avatar Jul 24 '15 08:07 schusterlich

This problem is present on Xcode 7 Beta 4 with iOS 8.3 devices (only on debug mode), it's work with iOS 9 Beta 4 devices.

ghost avatar Jul 26 '15 22:07 ghost

Face the same issue here on Xcode 6.4 with iOS 8.3 devices like iPhone 5\iPhone 6 when debug.Now try to download 8.4 update for testing.

iTA9178 avatar Aug 06 '15 06:08 iTA9178

"@sndive - I think this is only localized to 8.3. 8.2 and below worked just fine in all of my testing. Are you seeing issues deploying from Xcode 6.4 to iOS versions below 8.3?"

works fine on 8.4, 8.0 and 7.1.2 thanks Brad

sndive avatar Aug 19 '15 15:08 sndive

same here, crashes on iPhone4s, iPhone6, iPhone6+ with vanilla 8.3

IPv6 avatar Aug 19 '15 15:08 IPv6

works fine in XCode 6.3, iOS 8.3 crashes in XCode 7.1.1, iOS 8.3

Resolved by disabled "GPU Frame Capture", thank you limagustavo

franfran avatar Dec 04 '15 07:12 franfran

i change EAGLContext *context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup:_sharegroup]; to
EAGLContext *context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; the problem solved

zhuhao528 avatar Nov 22 '16 06:11 zhuhao528

nice

iTA9178 avatar Nov 30 '16 08:11 iTA9178

// in iOS8.x CALayer *superLayer = layer.superlayer; [layer removeFromSuperlayer]; if( ! [context_ renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer] ) { NSLog(@"failed to call context"); } if (superLayer) { [superLayer addSublayer:layer]; }

jeffasd avatar Jan 03 '19 10:01 jeffasd