question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Graphical artifacts on OnePlus 6 phone

See original GitHub issue

Issue details

On OnePlus 6 phones, and possibly other models, there are graphical artifacts similar to low quality JPEG compression in images. It is especially obvious if there are large single colored areas. It is not equally obvious with all colors, and I have found that the color #2c2c2c reveals the issue well.

Interestingly, the artifact does not show up in screenshots, so I have tried to photograph it using another phone. It is barely visible in the photos, but on the screen of the OnePlus phone they are clearly obvious. I have marked where the issue occurs, you can (barely) see lines across the screen.

https://i.imgur.com/E8rccLa.png https://i.imgur.com/ONtum3B.png

In the test project there are lines, but in my app they are more like cubes like in badly compressed JPEG images.

The phone runs on Android 10. I have also tried on the Pixel emulator with Android 10 and Google services and have not been able to reproduce it on that. On a Sony XZ1, Samsung S5, Nexus 5, Honor 7 as well as the desktop version it runs fine.

Now I guess if none of you have a OnePlus 6 it will be hard to debug this. If someone would give me an idea of where to begin to look that would be greatly appreciated.

Reproduction steps/code

  1. Generate a blank LibGDX project
  2. Replace the code of the main ApplicationAdapter with this:
public class MyGdxGame extends ApplicationAdapter {
	SpriteBatch batch;
	Color bgColor;
	
	@Override
	public void create () {
		batch = new SpriteBatch();
		bgColor = Color.valueOf("2c2c2c");
	}

	@Override
	public void render () {
		Gdx.gl.glClearColor(bgColor.r, bgColor.g, bgColor.b, bgColor.a);
		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
	}
	
	@Override
	public void dispose () {
		batch.dispose();
	}
}
  1. Run on a OnePlus 6
  2. If the issue does not occur, try exiting and entering the app a couple of times. Maybe also kill and restart it.

Version of LibGDX and/or relevant dependencies

gdxVersion = ‘1.9.10’

Please select the affected platforms

  • Android
  • iOS (robovm)
  • iOS (MOE)
  • HTML/GWT
  • Windows
  • Linux
  • MacOS

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
crykncommented, Sep 14, 2020

This stackoverflow post seems to suggest that RGB565 was the default for GLSurfaceView. However, that doesn’t seem to be the case anymore:

If no setEGLConfigChooser method is called, then by default the view will choose an RGB_888 surface with a depth buffer depth of at least 16 bits.

3reactions
MobiDevelopcommented, Sep 2, 2020

I think it is odd that we still use RGB565 by default.

Read more comments on GitHub >

github_iconTop Results From Across the Web

YouTube 60fps artifacts or glitches - OnePlus Community
When I use the YouTube app to watch fullscreen videos in 720p60, 1080p60, or anything else in 60 FPS, I get graphical artifacts...
Read more >
Artifacts on screen, phone is not usable, artifacts keep changing
I was playing Heart Stone and all of a sudden artifacts appeared, half of the screen. Now they constantly change. They don't seem...
Read more >
Static screen during face unlock on Oneplus 6t
This bug is appearing randomly on the phone but very frequently. ... artifacts on the display, and it would happen more often on...
Read more >
Disappointed with the camera - OnePlus Community
Trouble focusing on anything close, macro shots are impossible. Video recording has weird visual artifacts and bitrate is surprisingly low. Noticeable ...
Read more >
OnePlus 6 and Android Auto unusable on Renault system (R ...
Whenever I try to change tab the graphic is completely broken and full of artifacts. All of this is happening on the CAR...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found