Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPUImageView EXC_BAD_ACCESS #2022

Open
llinardos opened this issue Jun 10, 2015 · 27 comments
Open

GPUImageView EXC_BAD_ACCESS #2022

llinardos opened this issue Jun 10, 2015 · 27 comments

Comments

@llinardos
Copy link

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?

@svatynepi
Copy link

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..

@limagustavo
Copy link

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.

@Tagalong
Copy link

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

@vilimets
Copy link

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

@vadimavdeev
Copy link

Facing the same issue on iOS 8.3

@gonghao
Copy link

gonghao commented Jun 29, 2015

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

@kallipigous
Copy link

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

@lonkly
Copy link

lonkly commented Jul 3, 2015

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

@hudaniel
Copy link

hudaniel commented Jul 5, 2015

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?

@BradLarson
Copy link
Owner

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.

@lonkly
Copy link

lonkly commented Jul 6, 2015

@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

@lure71
Copy link

lure71 commented Jul 6, 2015

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).

@jriskin
Copy link

jriskin commented Jul 6, 2015

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.

@gonghao
Copy link

gonghao commented Jul 7, 2015

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

@sndive
Copy link

sndive commented Jul 8, 2015

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];
}
:-[[[[

@BradLarson
Copy link
Owner

@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?

@crossle
Copy link

crossle commented Jul 9, 2015

Disable GPU Frame Capture work well on iOS 8.3

@Onetaway
Copy link

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.

@schusterlich
Copy link

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 :-)

@ghost
Copy link

ghost commented Jul 26, 2015

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.

@iTA9178
Copy link

iTA9178 commented Aug 6, 2015

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.

@sndive
Copy link

sndive commented Aug 19, 2015

"@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

@IPv6
Copy link

IPv6 commented Aug 19, 2015

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

@franfran
Copy link

franfran commented Dec 4, 2015

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

@zhuhao528
Copy link

zhuhao528 commented Nov 22, 2016

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

@iTA9178
Copy link

iTA9178 commented Nov 30, 2016

nice

@jeffasd
Copy link

jeffasd commented Jan 3, 2019

// 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];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests