Q:

Scene2d tables turn black on one phone after a few game resets

My game screen uses both Scene2d and normal libgdx sprites. I use scene2d for the pause menus which contain some tables and textbuttons. All is ok on the pc. All is ok also on two mobile phones I'm testing the game on, but I have a pb on a third phone. It seems that after a restart or two of the game level all the scene2d elements that are supposed to appear on the screen have turned black. They are still responsive, meaning the buttons do what they are supposed to do, they move rotate and execute properly but they are all black. what could be the issue here? I don't have this pb on the pc or on the other phones.

A:

What you describe is a symptom of using a texture across a reset of the OpenGL context.  Your app contains pointers, in the Libgdx Texture objects, into OpenGL state, and when the OpenGL device is given over to another app, your pointers become stale.
LibGDX generally does a good job of restoring state across simple resets, but there are several ways to cause problems.  The most common is to (1) store LibGDX OpenGL state (e.g., a Texture) into a static property.  The JVM will get reused across application instances, so LibGDX cannot tell that this static object has become stale.  See http://bitiotic.com/blog/2013/05/23/libgdx-and-android-application-lifecycle/ for details on how to trigger the different lifecyles.
See In game Images disappear on Android device if i run from widget, but not when I install apk first time and Android static object lifecycle

