title: Segmentation fault with glCompressedTexImage2D
body: <p>I'm running an OpenGL ES application on a device that supports the <code>GL_OES_texture_compression_astc</code> extension. I have a 3000x2000 pixel texture, and when I call <code>glTexImage2D</code>, everything runs fine.</p>
  
  <p>To compress the image, I downloaded the <a href="https://github.com/ARM-software/astc-encoder" rel="nofollow noreferrer">ASTC encoder</a> and executed the following command:</p>
  
  <p><code>./astcenc.exe -c player.png player.astc 6x5 -medium</code></p>
  
  <p>But when I use player.astc in <code>glCompressedTexImage2D</code>, the function causes a segmentation fault. Here's my code:</p>
  
  <p><code>glActiveTexture(GL_TEXTURE0);
  glBindTexture(GL_TEXTURE_2D, tids[0]);
  glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_ASTC_6x5_KHR, 3000, 2000, 0, size, data);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glBindTexture(GL_TEXTURE_2D, 0);</code></p>
  
  <p>I've checked <code>size</code> and <code>data</code>, and they appear to be fine. Is there anything I can do to fix the problem?</p>