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

iOS 10.1.1 - GPUImageContext fails to create OpenGL ES 2.0 Context #2396

Open
ar9jun opened this issue Nov 22, 2016 · 1 comment
Open

iOS 10.1.1 - GPUImageContext fails to create OpenGL ES 2.0 Context #2396

ar9jun opened this issue Nov 22, 2016 · 1 comment

Comments

@ar9jun
Copy link

ar9jun commented Nov 22, 2016

Hello!

I'm having a very weird issue where I get the following error - which comes from an NSAssert in GPUImageContext.m Line 249:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 
'Unable to create an OpenGL ES 2.0 context. 
The GPUImage framework requires OpenGL ES 2.0 support to work.'

Here is my flow:

I have a GPUImageVideoCamera, and when I am ready to record, I create a GPUImageMovieWriter that writes what I record to a folder. I am able to do this multiple times, successfully. No issues, no errors. Each time I do it, I create a new GPUImageMovieWriterinstance with:

- (id)initWithMovieURL:(NSURL *)newMovieURL 
size:(CGSize)newSize 
fileType:(NSString *)newFileType 
outputSettings:(NSMutableDictionary *)outputSettings;
  • to record new things each time. Each time it works. However, after about 20-30 minutes, I'll have a case where I get the error I wrote above - which occurs when Line 100 is called in GPUImageMovieWriter in the init method noted above.

Any one have the same issue and/or know how to fix it or even have a workaround - would be much appreciated!

@charmingtoad
Copy link

I had the exact same issue.

These are my steps to reproduce:

  1. Create a GPUImageMovieWriter
  2. Call startRecording
  3. Call finishRecording
  4. Repeat 1-3 about 120x

Around the 120th recording, in debug mode there's a crash and this is printed to the console:

Unable to create an OpenGL ES 2.0 context. The GPUImage framework requires OpenGL ES 2.0 support to work.

In release mode, there's not a crash but recordings start coming out black.

I created a pull request with a fix here:

#2549

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

2 participants