SDL: Hint for a 'out of bounds index' condition in the GLES2 render algorithm

Related SDL2 versions:

  • 2.0.18, 2.0.20

Reproducible on:

  • Android emulator API 24…28 (though never tried below 24)
  • Surely (and obviously) not an application or system memory allocation problem.

Severity hard to estimate, as currently only reproducible under the emulator.

How to reproduce:

  • Assumable drawing rectangles after images.
  • The difficulty disappears while disabling the function SDL_RenderDrawRect() usage.

Observed behaviour:

  • Malfunction in the application: missing elements (interrupted rendering), apparent memory overwrites.
  • ADB log:
E/emuglGLESv2_enc: a vertex attribute index out of boundary is detected. Skipping corresponding vertex attribute. buf=0x91bc5ab0
E/emuglGLESv2_enc: Out of bounds vertex attribute info: clientArray? 0 attribute 2 vbo 7 allocedBufferSize 648 bufferDataSpecified? 1 wantedStart 0 wantedEnd 1068

Hints:

  • The same code works fine under Linux (portable).
  • Emulator API >= 29 does not report the problem.
  • Available (‘real’) Android devices does not show the symptoms.
  • It might still be an internal emulator problem, though hardly to believe upon conditions.

Suspected code:

  • SDL_render_gles2.c
    • Especially ‘join counters’ and SDL_Vertex/SDL_VertexSolid usage.
  • Interface compatibility.
  • Comparing the HEAD, I still suspect the GLES2 implementation.

Unfortunately I cannot provide a remedy or any further evidence at the moment.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks, merged and let’s close this issue