Note that there are some explanatory texts on larger screens.

plurals
  1. POOpenGL ES is crashing when rendering code is loaded while rendering
    primarykey
    data
    text
    <p>I have a tree structure of Renderers. If I load them up <strong>before rendering</strong> everything works fine, but if I load them <strong>while rendering</strong> I get a memory dump.</p> <pre><code>02-07 17:50:00.721: INFO/DEBUG(2355): signal 11 (SIGSEGV), fault addr 00000000 02-07 17:50:00.721: INFO/DEBUG(2355): r0 00000000 r1 4bf22eb0 r2 00000010 r3 00000004 02-07 17:50:00.721: INFO/DEBUG(2355): r4 0023d2e8 r5 0023e154 r6 00000000 r7 00000004 02-07 17:50:00.721: INFO/DEBUG(2355): r8 00000010 r9 00000010 10 00000000 fp 00000001 02-07 17:50:00.721: INFO/DEBUG(2355): ip 00000001 sp 4b7bdaa8 lr 81b06b70 pc 81b30dc0 cpsr 80000010 02-07 17:50:00.721: INFO/DEBUG(2355): d0 6472656767756265 d1 0000000000000000 02-07 17:50:00.721: INFO/DEBUG(2355): d2 000000640024c100 d3 0000000044936800 02-07 17:50:00.721: INFO/DEBUG(2355): d4 0000000000000000 d5 0000000000000000 02-07 17:50:00.721: INFO/DEBUG(2355): d6 000000000012eca8 d7 0000000000000000 02-07 17:50:00.721: INFO/DEBUG(2355): d8 0000000000000000 d9 0000000000000000 02-07 17:50:00.721: INFO/DEBUG(2355): d10 0000000000000000 d11 0000000000000000 02-07 17:50:00.721: INFO/DEBUG(2355): d12 0000000000000000 d13 0000000000000000 02-07 17:50:00.721: INFO/DEBUG(2355): d14 0000000000000000 d15 0000000000000000 02-07 17:50:00.721: INFO/DEBUG(2355): d16 c1d0a059b6bb9581 d17 3f50624dd2f1a9fc 02-07 17:50:00.721: INFO/DEBUG(2355): d18 41c9bc2c66800000 d19 3fe000000025a36b 02-07 17:50:00.721: INFO/DEBUG(2355): d20 4008000000000000 d21 3fd99a27ad32ddf5 02-07 17:50:00.721: INFO/DEBUG(2355): d22 3fd24998d6307188 d23 3fcc7288e957b53b 02-07 17:50:00.721: INFO/DEBUG(2355): d24 3fc74721cad6b0ed d25 3fc39a09d078c69f 02-07 17:50:00.721: INFO/DEBUG(2355): d26 0000000000000000 d27 0000000000000000 02-07 17:50:00.721: INFO/DEBUG(2355): d28 0000000000000000 d29 0000000000000000 02-07 17:50:00.721: INFO/DEBUG(2355): d30 0000000000000000 d31 0000000000000000 02-07 17:50:00.721: INFO/DEBUG(2355): scr 20000012 02-07 17:50:00.815: INFO/DEBUG(2355): #00 pc 00030dc0 /system/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so 02-07 17:50:00.823: INFO/DEBUG(2355): #01 lr 81b06b70 /system/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so 02-07 17:50:00.823: INFO/DEBUG(2355): code around pc: 02-07 17:50:00.823: INFO/DEBUG(2355): 81b30da0 e781410c e28cc001 e15c0003 3afffffa 02-07 17:50:00.823: INFO/DEBUG(2355): 81b30db0 e8bd8010 e92d4010 e3a0c000 ea000004 02-07 17:50:00.823: INFO/DEBUG(2355): 81b30dc0 e5904000 e5014008 e5904004 e0800002 02-07 17:50:00.827: INFO/DEBUG(2355): 81b30dd0 e5014004 e15c0003 e2811008 e28cc001 02-07 17:50:00.831: INFO/DEBUG(2355): 81b30de0 3afffff6 e8bd8010 e92d4010 e3a0c000 02-07 17:50:00.831: INFO/DEBUG(2355): code around lr: 02-07 17:50:00.835: INFO/DEBUG(2355): 81b06b50 e3530000 1a000005 e59c0028 e1a03007 02-07 17:50:00.835: INFO/DEBUG(2355): 81b06b60 e59c102c e59c2024 e1a0e00f e59cf034 02-07 17:50:00.838: INFO/DEBUG(2355): 81b06b70 e2866001 e2855004 e5942ec0 e3a03001 02-07 17:50:00.838: INFO/DEBUG(2355): 81b06b80 e1560002 3affffeb e088800a e2840d77 02-07 17:50:00.838: INFO/DEBUG(2355): 81b06b90 e2888003 e280000c e1a02003 e0278799 02-07 17:50:00.838: INFO/DEBUG(2355): stack: 02-07 17:50:00.838: INFO/DEBUG(2355): 4b7bda68 00000004 02-07 17:50:00.842: INFO/DEBUG(2355): 4b7bda6c afd0bfc9 /system/lib/libc.so 02-07 17:50:00.842: INFO/DEBUG(2355): 4b7bda70 00000000 02-07 17:50:00.846: INFO/DEBUG(2355): 4b7bda74 00000001 02-07 17:50:00.846: INFO/DEBUG(2355): 4b7bda78 00000003 02-07 17:50:00.846: INFO/DEBUG(2355): 4b7bda7c 00000001 02-07 17:50:00.850: INFO/DEBUG(2355): 4b7bda80 00000000 02-07 17:50:00.854: INFO/DEBUG(2355): 4b7bda84 00000000 02-07 17:50:00.854: INFO/DEBUG(2355): 4b7bda88 000e44f0 [heap] 02-07 17:50:00.858: INFO/DEBUG(2355): 4b7bda8c 0023d2e8 [heap] 02-07 17:50:00.858: INFO/DEBUG(2355): 4b7bda90 0023e154 [heap] 02-07 17:50:00.858: INFO/DEBUG(2355): 4b7bda94 00000000 02-07 17:50:00.862: INFO/DEBUG(2355): 4b7bda98 00000004 02-07 17:50:00.862: INFO/DEBUG(2355): 4b7bda9c 00000010 02-07 17:50:00.862: INFO/DEBUG(2355): 4b7bdaa0 df002777 02-07 17:50:00.866: INFO/DEBUG(2355): 4b7bdaa4 e3a070ad 02-07 17:50:00.866: INFO/DEBUG(2355): #00 4b7bdaa8 0023d2e8 [heap] 02-07 17:50:00.866: INFO/DEBUG(2355): 4b7bdaac 81b06b70 /system/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so 02-07 17:50:00.866: INFO/DEBUG(2355): 4b7bdab0 0023d2e8 [heap] 02-07 17:50:00.866: INFO/DEBUG(2355): 4b7bdab4 00000004 02-07 17:50:00.870: INFO/DEBUG(2355): 4b7bdab8 00000004 02-07 17:50:00.870: INFO/DEBUG(2355): 4b7bdabc 00000000 02-07 17:50:00.874: INFO/DEBUG(2355): 4b7bdac0 00000005 02-07 17:50:00.874: INFO/DEBUG(2355): 4b7bdac4 00000001 02-07 17:50:00.874: INFO/DEBUG(2355): 4b7bdac8 00000004 02-07 17:50:00.874: INFO/DEBUG(2355): 4b7bdacc 81b08510 /system/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so 02-07 17:50:00.874: INFO/DEBUG(2355): 4b7bdad0 0023d2e8 [heap] 02-07 17:50:00.874: INFO/DEBUG(2355): 4b7bdad4 81b6a5fc /system/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so 02-07 17:50:00.878: INFO/DEBUG(2355): 4b7bdad8 00000004 02-07 17:50:00.878: INFO/DEBUG(2355): 4b7bdadc 00000000 02-07 17:50:00.878: INFO/DEBUG(2355): 4b7bdae0 00000005 02-07 17:50:00.878: INFO/DEBUG(2355): 4b7bdae4 81b09954 /system/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so 02-07 17:50:00.878: INFO/DEBUG(2355): 4b7bdae8 00000004 02-07 17:50:00.881: INFO/DEBUG(2355): 4b7bdaec 00000000 </code></pre> <p>All the renderer does is:</p> <pre><code>glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glBindBuffer(GL_ARRAY_BUFFER, mArraybuffer); glVertexPointer(2, GL_FLOAT, sizeof(TextureMap), NULL); glTexCoordPointer(2, GL_FLOAT, sizeof(TextureMap), (void *)offsetof(TextureMap, coord)); glBindBuffer(GL_ARRAY_BUFFER, 0); glDrawArrays(GL_TRIANGLE_STRIP, 0, mSize); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); </code></pre> <p>and I know it crashes on <code>glEnableClientState(GL_VERTEX_ARRAY)</code>. What I want to know is why is it crashing, or at least a reason why I shouldn't be doing what I'm doing?</p> <p><strong>EDIT:</strong> I have designed it to load the renderer with the code above when the screen is tapped. It generates an array buffer and assigns the array accordingly. I then add the renderer to the renderer tree, but when it first renders it crashes and get the above memory dump.</p> <pre><code> GLuint arraybuffer; glGenBuffers(1, &amp;arraybuffer); TextureMap data[] = { {{-69.573, 39.74}, {325.0/512.0, 279.75/512.0}}, {{-69.573, 83.24}, {325.0/512.0, 323.25/512.0}}, {{71.571, 39.74}, {466.45/512.0, 279.75/512.0}}, {{71.571, 83.24}, {466.45/512.0, 323.25/512.0}}, }; glBindBuffer(GL_ARRAY_BUFFER, arraybuffer); glBufferData(GL_ARRAY_BUFFER, sizeof(TextureMap) * 4, data, GL_STATIC_DRAW); TextureMapBufferRenderer *renderer = new TextureMapBufferRenderer(arraybuffer); //generates a renderer for array buffer renderer-&gt;load(); glBindBuffer(GL_ARRAY_BUFFER, 0); mManager-&gt;renderer()-&gt;addChildRenderer(renderer); </code></pre> <p>The above code is when it executed on tap. If I put the same code at the beginning it will work.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload