Android OpenGL Fatal signal 11 (SIGSEGV), code 2 -


i'm getting error

fatal signal 11 (sigsegv), code 2, fault addr 0xa4b7b000 in tid 10818 (glthread 54114) 

when app starts up. i'm testing rendering lots of points. it's crashing 10,000 points , worked fine 3,000.

public class pointrenderer implements glsurfaceview.renderer {     private int size = 10000;     private floatbuffer floatbuffer;      public void onsurfacecreated(gl10 gl, eglconfig config) {         floatbuffer = bytebuffer.allocatedirect(4*2*size).asfloatbuffer();          random r = new random();         (int = 0; < 2*size; i++) {             floatbuffer.put(r.nextfloat()*100);         }     }      public void onsurfacechanged(gl10 gl, int w, int h) {         gl.glviewport(0, 0, w, h);     }      public void ondrawframe(gl10 gl) {         gl.glclearcolor(0.0f, 0.0f, 0.0f, 1.0f);         gl.glclear(gl10.gl_color_buffer_bit | gl10.gl_depth_buffer_bit);         gl.glpushmatrix();             gl.glcolor4f(1.0f, 0.0f, 0.0f, 1.0f);             gl.glenableclientstate(gl10.gl_vertex_array);             gl.glvertexpointer(2, gl10.gl_float, 0, floatbuffer);             gl.gldrawarrays(gl10.gl_points, 0, size);             gl.gldisableclientstate(gl10.gl_vertex_array);         gl.glpopmatrix();     } } 


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -