We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Invalid OpenGL Surface in Rare Scenario (Android - pre JellyBean)
Invalid OpenGL Surface in Rare Scenario (Android - pre JellyBean)
Bug #3295 [Closed]
Redmine issue system is closed, we are using github issue system instead.
This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8270
Status: | Closed | |
---|---|---|
Start date: | 2013-11-28 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | android | |
Target version: | - |
Hi,
In some cases the GLSurfaceView can fail to be re-created. The best way to reproduce this is to launch another activity while your activity is starting (I am doing this to launch pre-roll ads in my case). One the bug occurs you get a black screen and the only way to recover from it is to press the back button, then re-enter (note: home button doesn’t fix it).
Here’s the error you get:
On stackoverflow is a post that could explain this: [[http://stackoverflow.com/questions/12855103/eglcreatewindowsurface-fails-with-java-lang-illegalargumentexception]]
I tried this solution out and it worked fine. Basically I back-ported GLSurfaceView from Android Level 19 and had Cocos2dxGLSurfaceView extend that version of GLSurfaceView. I also had to make the following change:
This fixes the problem for me. Unfortunately the GLSurfaceView from level 19 is incompatible with Android 2.2 - so now I’m looking into backporting an older version.
Has anybody experienced this issue? Any better ideas for fixing this?
Thanks