[Bug] failed to create context, error: 12297 - EGL_BAD_MATCH
Unity Version
2022.3.8f1
AVPro Movie Capture Version
not sure, downloaded end of august 2024
Which platform(s) are you using?
Android
Which OS version(s) are you using?
Android 10 (actually i believe quest3 is on android 12)
Which rendering API(s) are you using?
OpenGLES
Hardware
oculus quest 3
Which capture component are you using?
Capture From Texture
Capture mode
Realtime
Which output mode are you using?
Video file
Video codecs
H264
Audio source
None
Audio codecs
AAC
Any other component configuration
No response
The issue
i'm not sure how to reproduce it outside of one of our projects. We have build a sample project with this and it runs and generates a video with no problems on the same device. However, when we try to run the same sample scene, no other scenes, and as stripped down as we can as far as android manifest, android versions, settings match etc..it doesn't generate a non corrupt video file (it does generate a file though)
when looking at both logcats, for the project that doesn't work, i'm seeing createVideoCodec lines. Maybe this can help hint at what the problem is? (left side is project that works to generate a video, the right side is a project that doesn't work)
Log output
when comparing logcats, i see a few differences, but the one that stands out the most is
"setupContext - failed to create context, error: 12297 - EGL_BAD_MATCH"
09-06 02:09:42.205 985 6409 D SimpleC2Component: Using output block pool with poolID 359 => got 359 - 0
09-06 02:09:42.205 5984 6410 I AVProMovieCapture: ⌠(VideoCaptureOpenGLES.cpp:405) VideoCaptureOpenGLES::setupContext - failed to create context, error: 12297 - EGL_BAD_MATCH
09-06 02:09:42.205 5984 6006 I AVProMovieCapture: ðŸ'¬ï¸ (PluginState.cpp:67) PluginState::RegisterRecorder - Registered handle 17760
09-06 02:09:42.205 5984 6006 I AVProMovieCapture: ðŸ'¬ï¸ (PluginInterface.cpp:212) AVPMC_CreateRecorderVideo: newRecorderHandle = 17760
09-06 02:09:42.207 5984 6413 I AVProMovieCapture: ⌠(VideoCaptureOutputOpenGLESPixelBuffer.cpp:563) VideoCaptureOutputOpenGLESPixelBuffer::copyFramebuffersToPixelbuffersThread - failed to create context, error: 12297 - EGL_BAD_MATCH
09-06 02:09:42.224 760 6405 E QC2Comp : [avcE_46] Returning work with no/empty input buffer and not marked EOS
09-06 02:09:42.229 5984 6400 D CCodecBufferChannel: [c2.qti.avc.encoder#807] flushed work; ignored.
Is low overhead mode enabled in the oculus plug-in?
yep that fixed it!
Did we miss this somewhere in the documentation?
No, it's a recent development that's given us trouble with AVPro Video so thought I would ask before trying to reproduce it.
oh, well, here is a confirmation of the problem you know about :)
thanks for the very quick response!
A fix for this will make it into the next release (version 5.3.2)
AVPro Movie Capture version 5.3.2 has been released. Please let us know if it has not fixed your issue.