Login  Register

Re: My Application crashed

Posted by gouessej on Jul 03, 2012; 8:20am
URL: https://forum.jogamp.org/My-Application-crashed-tp4025350p4025387.html

Do you use vertex arrays or VBOs anywhere else in your code? As a first step, disable the use of vertex arrays in the text renderer (textRenderer.setUseVertexArrays(false)). If you don't get any crash, it means that you are doing something wrong before calling displayFlatLegendText.

I still use the text renderer in the alpha version of my (open source) game. As I use vertex arrays and VBOs very carefully, I don't get such crashes.

Sven's suggestion about locking is right but another approach consists in using this kind of loop, especially in games:
while (!exit) {
      //updates your timer(s)
      tick();
      //updates the data
      update();
      //renders the representations of these data
      render();
}

If you do that, you don't need any lock and there is no risk of reading data while changing them.
Julien Gouesse | Personal blog | Website