title: Activity pause timeout after calling GLSurfaceView.onPause()
body: <p>I have a game using OpenGL. I've built off of the examples, for the most part, having the Main Thread, Renderer Thread (GLSurfaceView.Renderer) and added a GameLogic thread as well. When the game is executed, everything seems to run through perfectly. When back is pressed and onPause() is fired, I'm also firing the GLSurfaceView()'s onPause, but I'm having a "crash" at that point. Here's the MainActivity's onPause:</p>
  
  <pre><code>@Override
  protected void onPause() {
      Log.d("Main", "Pre- Super onPause");
      super.onPause();
      Log.d("Main", "Post- Super onPause");
      mGSGLView.onPause();
      Log.d("Main", "Post- GL onPause");
  }
  </code></pre>
  
  <p>Each log point is reached except the last. In logcat, immediately following the "Post Super onPause" line, I get an Activity pause timeout.</p>
  
  <p>I am not overriding onPause in the GLSurfaceView class... and as far as I know this had been working for me for some time, but recently started occurring when I started getting a completely black screen on the second time I tried to run my game which sits until finally getting an ANR. 95% of my game runs natively. Similar to the San Angeles example, the Renderer calls to onDraw, for instance call a NativeDraw function instead of java. The same is true for the onSurfaceCreated, onSurfaceChanged, and I also call a native GameLogic method in the logic thread (basically all that is called there is a thread sleep and that logic method.)</p>
  
  <p>I hope I've given enough information, please let me know if there is anything else I should be providing.</p>
  
  <p>EDIT - Well... I've actually narrowed down the issue to a native function call where I'm freeing certain pointers that had previously had memory allocated for them with malloc(). My code there looks okay, but if I omit the call, everything works okay, so my free() calls must be corrupting something...</p>