Forums - Crash in LinkProgram on Adreno 330/320

12 posts / 0 new
Last post
Crash in LinkProgram on Adreno 330/320
Evan
Join Date: 5 Mar 13
Posts: 34
Posted: Sun, 2015-05-03 16:16

Attempting to link this pair of shaders causes a crash in glLinkProgram on both Nexus 4 and Moto X 2nd Gen devices (Nexus is runing 5.1, Moto is running 5.0).

https://gist.github.com/eodabash/db7a20b47214a232ef66

Commenting out either of these two lines in the fragment shader seems to stop the crash:

Material material = _material;

vec3 eyePos = _camera.EyePos;

 

 

  • Up0
  • Down0
Ayo Moderator
Profile picture
Join Date: 23 Jan 15
Posts: 31
Posted: Thu, 2015-05-21 15:35

Hello Evan, and apologies for the late response.

We were able to reproduce the issue and it is being investigated.

We'll keep you informed of any resolution regarding the crash.

Many thanks for the report.

  • Up0
  • Down0
Kalle
Join Date: 3 Jun 16
Posts: 6
Posted: Fri, 2016-06-03 01:57

Any updates on this? I have the same problem. The process enter glLinkProgram() and exits the process. It probably hits an assert or something down there because there is no tombestone generated.

06-03 10:55:04.503 23458-23475/com.example.app I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build:  (Ifd751822f5)
                                                                     OpenGL ES Shader Compiler Version: XE031.06.00.05
                                                                     Build Date: 01/26/16 Tue
                                                                     Local Branch: AU12_SBA
                                                                     Remote Branch: 
                                                                     Local Patches: 
                                                                     Reconstruct Branch: 

 

 

 
 
  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Fri, 2016-06-03 15:33

Hi Kalle..  Can you confirm which device and build/date you are running this app on?

thanks...

  • Up0
  • Down0
Kalle
Join Date: 3 Jun 16
Posts: 6
Posted: Sun, 2016-06-05 09:39

Hi,

Thanks for looking into this!

I'm using CyanogenMod 13.0-20160602-osprey on a MotoG3.

The offending program can be found at https://gist.github.com/kalle/9837fb063eaaf99696c0ba38f1684f1e (vertex shader at the bottom). This happen with unoptimized code as well.

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Tue, 2016-06-07 12:21

This is turning out to be a bit more difficult to diagnose, as we can not repropduce and need more information about the exact version of  shader compiler that was used in this CyanogenMod build.  Can you provide any additional information and perhaps log files generated during the program run?

 

 

  • Up0
  • Down0
Kalle
Join Date: 3 Jun 16
Posts: 6
Posted: Sun, 2016-06-12 04:32

Hello,

I have created an Android project that can repeat the crash on my phone: https://github.com/kalle/gllinkcrash

When I run the app it will log this:

06-12 13:19:09.703 963-985/com.example.gllinkcrash I/OffscreenThread: Initiating off screen surface
06-12 13:19:09.713 963-985/com.example.gllinkcrash D/Grafika: EGLContext created, client version 2
06-12 13:19:09.728 963-985/com.example.gllinkcrash I/OffscreenThread: EGL_CLIENT_APIS = OpenGL_ES
06-12 13:19:09.728 963-985/com.example.gllinkcrash I/OffscreenThread: EGL_VENDOR = Android
06-12 13:19:09.729 963-985/com.example.gllinkcrash I/OffscreenThread: EGL_VERSION = 1.4 Android META-EGL
06-12 13:19:09.729 963-985/com.example.gllinkcrash I/OffscreenThread: EGL_EXTENSIONS = EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_swap_buffers_with_damage EGL_KHR_image EGL_KHR_image_base EGL_KHR_lock_surface EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_fence_sync EGL_KHR_create_context EGL_EXT_create_context_robustness EGL_ANDROID_image_native_buffer EGL_KHR_wait_sync EGL_ANDROID_recordable EGL_KHR_partial_update 
06-12 13:19:09.729 963-985/com.example.gllinkcrash I/OffscreenThread: GL_VENDOR = Qualcomm
06-12 13:19:09.729 963-985/com.example.gllinkcrash I/OffscreenThread: GL_VERSION = OpenGL ES 3.0 [email protected] AU@  (GIT@Ifd751822f5)
06-12 13:19:09.729 963-985/com.example.gllinkcrash I/OffscreenThread: GL_RENDERER = Adreno (TM) 306
06-12 13:19:09.750 963-985/com.example.gllinkcrash I/GLProgram: Before glLinkProgram
 

 

  • Up0
  • Down0
Kalle
Join Date: 3 Jun 16
Posts: 6
Posted: Tue, 2016-06-21 00:45

Hi,

Did you had a chance to look at this?

   ///Kalle

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Wed, 2016-06-22 08:37

Our current investigation is leading to the conclusion that the shader compiler version reported (XE031.06.00.05) should not be used with the class of graphics hardware for the MotoG3  device (Adreno 320/330).

  • Up0
  • Down0
Kalle
Join Date: 3 Jun 16
Posts: 6
Posted: Wed, 2016-06-22 09:45

OK. Perhaps I posted this in the wrong thread. The MotoG3 as an Adreno 306 and not a 320/330 as the title of this thread suggest.

Is shader compiler correct for that GPU?

  • Up0
  • Down0
Kalle
Join Date: 3 Jun 16
Posts: 6
Posted: Wed, 2016-06-22 12:11

This has nothing to do with Cyanogen putting the wrong compiler into its distribution.

I ran the test app on a couple of Adreno mobiles on Google's Could Test Lab with pretty dissapointing results. On Nexus 4 and 5 the app crashed on two different Android versions. But on Nexus 6 it did work (but EGLContext v3 was created despite that the app asked for a v2 context).

Here are the log outputs: https://gist.github.com/kalle/f9d884fca3ea6710f526ca3e7bbd107b

 

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Fri, 2016-07-15 10:22

After a bit more research, this problem is not unique to Cyanogen builds.  The problem is a known bug, but fixed in recent drivers.  However unfortunately we are dependent on our OEMs updating the drivers in their released builds.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.