Problems with graphic on some devices

Thanks that you are on it, nehon.
Yes, I guessed that cause I dont develop on ‘nightys’, so it might be not the fix that causes the prob.

Interesting: I tested that when setDisplayStatView is true no black-screen bug appears too.
So as long as a stats-hud is shown all works, hiding them seems to confuse nifty on android (does one have an android that can have both stats-huds to false without the ‘black-screen-bug’ when the screen-layer is filled?).

As a temporary fix, one could always push the stats off-screen. /shrug

Coll, I did not know that: Can you explain more in detail, or show how to do that with a code example?

@hermetic
I just meant that while someone figures out the actual problem, you could always move the stats panel to something like:

statPanel = made up name for the stats view

statPanel.move(-statPanel.getWidth(),0,0)

It won’t be visible at this point but the gui node will not be empty either. This is a very temporary solution for getting it out of the way when you don’t need it.

Thank you very much, t0neg0d.
Took me some time go get this going cause I used the FpsText, because its smaller. Sadly it scales only the text, the background layer still darkens the place, its not scaled. Here is what I tried, for those who are interested:
[java]
BitmapText fpsText = stateManager.getState(StatsAppState.class).getFpsText();
fpsText.setLocalScale(0.1f);[/java]
I will try to use the statPanel instead, hope t0neg0ds tip works better.

<br><br>
Update:
Sadly Statsview gives me NullPointerException, do I do something wrong? (this needs to be in simpleInitApp(), to make it work in android, right?):
[java]StatsView statsView = stateManager.getState(StatsAppState.class).getStatsView();[/java]

Where do you call that?

in simpleInitApp(), like I read here in forum.
Strange thing is, that [java]stateManager.getState(StatsAppState.class).getFpsText()[/java]
on the same place works, but not: [java]stateManager.getState(StatsAppState.class).getStatsView();[/java]

If the android-bug is fixed, I would really like to hide both stats, like it should work in jmonkey,
[java]setDisplayStatView(false)
setDisplayFps(false)[/java]
there was no fix maybe lately?

Well, then I’m done debugging exceptions without a stack trace. Post the stack trace.

[java] ****statsview!null
Jun 16, 2014 12:40:16 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at shogunWars.Main.simpleInitApp(Main.java:192)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:722)
[/java]

code is:
[java]189 setDisplayStatView(true);
190 StatsView statsView = stateManager.getState(StatsAppState.class).getStatsView();
191 System.out.println("****statsview!" + statsView);
192 statsView.move(0,0,0);
… /setDisplayStatView(false);
//workaround, make fpstext small (hide)
Node fpsText = stateManager.getState(StatsAppState.class).getFpsText();
fpsText.setLocalScale(0.1f);
/
//setDisplayFps(false);
[/java]

Does statsView work on your JME3?

The StatsView object isn’t created until the StatsAppState is initialized which happens after simpleInitApp(). If you put this initialization logic in an app state then it will run after StatsAppState has been initialized… and will be easy to add to other projects as needed, also.

Ok, seems like it goes a bit over my head. Where to put that code then, are there examples?
I tried in initialize() and other places, same error.

In simpleRender() it seems to work, but guess its ugly?

And by the way, the stats-text itsself is moved by statsView.move(-100,0,0); ,but the transparent-darkish background stays, the same prob like in fpsText.setLocalScale(0.1f);, how to get this hidden too?

Great, seems the ‘workaround’ does not work as good as t0neg0d hoped.

It would really be easier if someone of the ‘big-guys/grls’ can search the bug in JME, why on android one of the stats/fps-views need to stay, or nifty gets strange results?

http://hub.jmonkeyengine.org/javadoc/com/jme3/app/StatsAppState.html#setDarkenBehind(boolean)