googlecreativelab / ar-drawing-java

A simple AR drawing experiment build in Java using ARCore.
https://experiments.withgoogle.com/ar/arcore-drawing
Apache License 2.0
416 stars 96 forks source link

app crash at launch #5

Open doums opened 6 years ago

doums commented 6 years ago

Hi,

App crash when we try to launch it on samsung S7 edge

03-22 14:17:35.813 28240-28240/? E/Zygote: v2 03-22 14:17:35.814 28240-28240/? E/Zygote: accessInfo : 0 03-22 14:17:36.236 28240-28240/com.googlecreativelab.drawar E/NdkImageReader: AImageReader_getWindow 03-22 14:17:36.382 28240-28261/com.googlecreativelab.drawar E/LineShaderRenderer: Error compiling shader: 0:24: L0002: Undeclared variable 'f' 0:27: L0002: Undeclared variable 'f' 0:30: L0002: Undeclared variable 'f' 03-22 14:17:36.384 28240-28261/com.googlecreativelab.drawar E/AndroidRuntime: FATAL EXCEPTION: GLThread 11128 Process: com.googlecreativelab.drawar, PID: 28240 java.lang.RuntimeException: Error creating shader. at com.googlecreativelab.drawar.rendering.ShaderUtil.loadGLShader(ShaderUtil.java:55) at com.googlecreativelab.drawar.rendering.LineShaderRenderer.createOnGlThread(LineShaderRenderer.java:170) at com.googlecreativelab.drawar.DrawAR.onSurfaceCreated(DrawAR.java:396) at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1530) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1262)

shreyanshbangar commented 6 years ago

Crash is because OpenGL in unable to understand 'f'.

Just open 'line_frag.glsl' file and remove 'f' is suffix of floating numbers.

App will not crash then.

brijeshshah13 commented 6 years ago

Closed by #7.