I’ve created a simple app which displays something like this: http://puu.sh/5ZFFF.png. It works nicely on most smartphones I’ve tested it (Galaxy S2, Galaxy S3, Nexus 4, HTC ONE X, HTC ONE,…) However, when I put setDisplayFps(false); inside the simpleInitApp() method, it turns into this: http://puu.sh/5ZEAo.png on all listed devices except S2 and S3.
I’ve managed to determine the problem more precisely; It’s not about the fps, it’s about empty guiNode as a result of hiding fps. The following code works perfectly well, however, as soon as I remove everything from guiNode (hide stats & fps, and remove the text), is starts bugging. The same bug appears when there are only blank nodes attached to the guiNode.
In short, the bug appears when guiNode is empty, or when there are only blank nodes on it.
@development said:
I've managed to determine the problem more precisely; It's not about the fps, it's about empty guiNode as a result of hiding fps. The following code works perfectly well, however, as soon as I remove everything from guiNode (hide stats & fps, and remove the text), is starts bugging. The same bug appears when there are only blank nodes attached to the guiNode.
In short, the bug appears when guiNode is empty, or when there are only blank nodes on it.
Interesting. Have you tested to see if this happens on desktop as well? Is there an error thrown?
I never ported it to the 3.0.x branch though since no one had ever complained about it.
Wait so that was really a bug…
I had tht as well in my gui lib, and got so far around it by useing more detailed cullhints for empty nodes, but thats good to know. Was never sure if its a real bug or designed to be like this.
@Empire Phoenix said:
Wait so that was really a bug...
I had tht as well in my gui lib, and got so far around it by useing more detailed cullhints for empty nodes, but thats good to know. Was never sure if its a real bug or designed to be like this.
Well, the regular culling has a null check. Only the gui culling didn’t. So I made them behave the same.
There is no error thrown, the game works normally, and when I display text on guiNode, everything is displayed normally until the text is removed, then the bug is back. It only happens on some mobile phones, on desktop it works normally.
I’ve noticed that S2 and S3 phones (devices without this bug) use android kernel 3.0.x, while other tested devices (devices with this bug) use android kernel 3.4.x, however, I have no idea how to determine if that’s the case.
@development said:
There is no error thrown, the game works normally, and when I display text on guiNode, everything is displayed normally until the text is removed, then the bug is back. It only happens on some mobile phones, on desktop it works normally.
I’ve noticed that S2 and S3 phones (devices without this bug) use android kernel 3.0.x, while other tested devices (devices with this bug) use android kernel 3.4.x, however, I have no idea how to determine if that’s the case.
Did you try it on desktop? Does it fail on desktop? It would be good if you could try it on desktop and tell us how it does. On desktop, does it do the same thing?
I wonder if it throws an error or does the same thing if you run it on desktop.
@pspeed said:
Did you try it on desktop? Does it fail on desktop? It would be good if you could try it on desktop and tell us how it does. On desktop, does it do the same thing?
I wonder if it throws an error or does the same thing if you run it on desktop.
As I said, this bug only appears on some mobile phones, on desktop everything works as it should.
I’m using 3.0.4 stable, although there was no NPE reported in the application nor in the ADB log. Also, the jME HelloWorld (the floating blue cube) application doesn’t have this bug even with an empty guiNode.
@development said:
I'm using 3.0.4 stable, although there was no NPE reported in the application nor in the ADB log. Also, the jME HelloWorld (the floating blue cube) application doesn't have this bug even with an empty guiNode.
If you haven’t removed the StatsAppState then there is always something in the guiNode. Calling setDisplayStatsView(false) only hides it.
looks like I can confirm the bug with setDisplayFps(false); on my android (2.2), it turns (parts of) my screen black and generally confuses the color scheme on parts of my 3D-nodes on screen.
On desktop there is no prob at all.
It is not a problem of a empty nifty-node, but a prob of a not-empty layer.
I have no black screen as long the layer is empty with setDisplayFps(false) and setDisplayStatView(false). If I put in xml a panel inside the layer in screen, bug appears.
If I have displayed FPS my nifty code makes no probs, screen works like on desktop.
I hit that issue in my game too.
I have no clue to what it’s due, it looks like it’s a depth write issue but couldn’t manage to track the problem to the source…
I guess I’ll look more into it.