Bugs in engine native code ( GLSurfaceView.java line 878 and 877)

  Hi Corona Team.

  I build my game with CoronaEnterprise and use Crashlytics for analysis. Recently it’s kept reporting me these errors. I have no idea where they come from. I attached some images, so please take a look to help me  :frowning:

          Pm4kvE5.jpg

  Here is another:

owxG9h8.jpg

Hey! Can you post some code we can take a look it? 

Thanks!

  Hi Sonic.

  These errors happen by Native Code ( as you see logs in half-bottom of the images ).  I test my game on Simulator, some devices but everything runs okay. I just only catch them by reporting of Crashlytic. 

I believe that exception can only happen if the GPU does not meet Corona’s minimum OpenGL version requirement (must be at least 2.0).  I’ve never heard of this happening to a Corona Simulator built Android app before.  So, I’m thinking that your Corona Enterprise built app is missing a setting in its “AndroidManifest.xml” file.
 
Do you have the following <uses-feature> element within your “AndroidManifest.xml” file’s <manifest> block?

\<manifest ...\> \<!-- Informs the app store that this app requires OpenGL ES 2.0 as a minimum. Required by Corona. --\> \<uses-feature android:glEsVersion="0x00020000"/\> \</manifest\>&nbsp;

The above is needed to prevent Android devices that only support OpenGL ES 1.x from downloading/purchasing your app from the Google Play store.

 Hi Joshua,

 I checked my Manifest and see this line remains.

 If you check my attached images, you can see these errors happen on Samsung GT I9300 ( Galaxy SIII ), so I don’t think problem is due to OpenGL.

  Could you please check the file GLSurfaceView.java and see what it does in line 877 and 878?

I already did check the GLSurfaceView.java file.  It’ll throw this exception if it’s not an OpenGL ES 2.0 or better device.  Meaning that catching this exception on our end is useless since we cannot get the GPU to render OpenGL ES 2.0 content.

I’m still thinking that the <uses-feature> element that I’ve mentioned above is the issue.  It’s either in the wrong place in your AndroidManifest.xml or Google Play is failing to read it.  I’m not sure what else it could possibly be.  You can verify which OpenGL ES versions Google Play *thinks* your APK supports by going to the Google Play developer console.  Go to the APK tab, select the “Production” tab, and then click on your newest APK from the list.  This will display an “APK DETAIL” dialog.  There should be a row named “OpenGL ES versions” in it.  Verify that it is set to “2.0+”.

 Hi Joshua. 

 I did check in my Google Play developer console. It shows that “OpenGL ES versions 2.0+”

 Any idea else :frowning: ? Crashlytics still inform me about this error. 

 Thanks for your help, 

If this is an exception that gets rarely reported on Google Play, then honestly, I would just blow it off and assume that there is something wrong with those devices.  For example, it might be possible that the end-user of such as device forcefully upgraded it to a new Android OS versions that is incompatible with the hardware because the cellular service or manufacturer did not provide an update.  In that case, they might not have the correct OpenGL video driver installed for the hardware.  If this is the case, then you have nothing to worry about.

 Hi Joshua,

 Sorry for my late reply. I keep receiving reports of this bug but not frequently. Guess I can do nothing more to deal with it.

 Thank for your help :slight_smile:

We’ll keep an eye out if anyone else brings up a similar issue.

Interestingly enough, we have that exact same Samsung Galaxy SIII model (GT-I9300) and it works fine for us.  But I’ve also noticed in your screenshot that 100% of all devices raising this exception are “rooted”.  Normally, a rooted device is not an issue, but like I said up above, I’m wondering if the end-user forcefully upgraded the device to a newer OS version that doesn’t have the correct drivers for the device.  I’ve seen someone do this before and couldn’t access the camera afterwards.

  Yeap, I’ve been seeing that all problems came from devices which are “rooted”. Maybe it causes this error :frowning:

Hey! Can you post some code we can take a look it? 

Thanks!

  Hi Sonic.

  These errors happen by Native Code ( as you see logs in half-bottom of the images ).  I test my game on Simulator, some devices but everything runs okay. I just only catch them by reporting of Crashlytic. 

I believe that exception can only happen if the GPU does not meet Corona’s minimum OpenGL version requirement (must be at least 2.0).  I’ve never heard of this happening to a Corona Simulator built Android app before.  So, I’m thinking that your Corona Enterprise built app is missing a setting in its “AndroidManifest.xml” file.
 
Do you have the following <uses-feature> element within your “AndroidManifest.xml” file’s <manifest> block?

\<manifest ...\> \<!-- Informs the app store that this app requires OpenGL ES 2.0 as a minimum. Required by Corona. --\> \<uses-feature android:glEsVersion="0x00020000"/\> \</manifest\>&nbsp;

The above is needed to prevent Android devices that only support OpenGL ES 1.x from downloading/purchasing your app from the Google Play store.

 Hi Joshua,

 I checked my Manifest and see this line remains.

 If you check my attached images, you can see these errors happen on Samsung GT I9300 ( Galaxy SIII ), so I don’t think problem is due to OpenGL.

  Could you please check the file GLSurfaceView.java and see what it does in line 877 and 878?

I already did check the GLSurfaceView.java file.  It’ll throw this exception if it’s not an OpenGL ES 2.0 or better device.  Meaning that catching this exception on our end is useless since we cannot get the GPU to render OpenGL ES 2.0 content.

I’m still thinking that the <uses-feature> element that I’ve mentioned above is the issue.  It’s either in the wrong place in your AndroidManifest.xml or Google Play is failing to read it.  I’m not sure what else it could possibly be.  You can verify which OpenGL ES versions Google Play *thinks* your APK supports by going to the Google Play developer console.  Go to the APK tab, select the “Production” tab, and then click on your newest APK from the list.  This will display an “APK DETAIL” dialog.  There should be a row named “OpenGL ES versions” in it.  Verify that it is set to “2.0+”.

 Hi Joshua. 

 I did check in my Google Play developer console. It shows that “OpenGL ES versions 2.0+”

 Any idea else :frowning: ? Crashlytics still inform me about this error. 

 Thanks for your help, 

If this is an exception that gets rarely reported on Google Play, then honestly, I would just blow it off and assume that there is something wrong with those devices.  For example, it might be possible that the end-user of such as device forcefully upgraded it to a new Android OS versions that is incompatible with the hardware because the cellular service or manufacturer did not provide an update.  In that case, they might not have the correct OpenGL video driver installed for the hardware.  If this is the case, then you have nothing to worry about.

 Hi Joshua,

 Sorry for my late reply. I keep receiving reports of this bug but not frequently. Guess I can do nothing more to deal with it.

 Thank for your help :slight_smile:

We’ll keep an eye out if anyone else brings up a similar issue.

Interestingly enough, we have that exact same Samsung Galaxy SIII model (GT-I9300) and it works fine for us.  But I’ve also noticed in your screenshot that 100% of all devices raising this exception are “rooted”.  Normally, a rooted device is not an issue, but like I said up above, I’m wondering if the end-user forcefully upgraded the device to a newer OS version that doesn’t have the correct drivers for the device.  I’ve seen someone do this before and couldn’t access the camera afterwards.