-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rare NPE in GlyphLayout #7582
Comments
Most likely this is related to threading. Are you doing any multithreading/http requests and mutating state/labels without making sure those mutations are running on main thread? |
Yes there is stuff happening in the background but I am running UI related code only on the main thread because I know that libgdx is not threadsafe. |
Yeah, it definitely sounds like a multithreading issue. It can be super rare. I would verify you aren't mutating label states from another thread, you can do this even without getting a crash.
You can just ThreadUtils.setGdxThread(Thread.currentThread()), in your create method of application listener. Then use gdxThreadSafetyCheck() anywhere you suspect it may be happening. You can do this in conditional breakpoints on libgdx methods too with your debugger if you have lots of different access points. |
Looks interesting, I will certainly look into it, thank you. |
I have an Android app in the Play Store.
Rarely I see exceptions like this in the Google Play Console:
or:
or, maybe related:
It happens in different labels, but only in labels, and I'm not able to reproduce it.
libgdx version: 1.12.1
Any idea?
The text was updated successfully, but these errors were encountered: