I am using LibGDX. When my application starts, it creates a screen. When the screen is loaded, it calls the static function Module.createStyles() .
This function creates a bunch of styles that will be used throughout the rest of the application (LibGDX built-in styles such as WindowStyle, LabelStyle, TextButtonStyle - all types of objects that are used to create user interface objects).
When the screen is done, it calls Module.disposeStyles() .
In any case, according to my Google Analytics crash reports, I accidentally get a NullPointerException when I try, for example, to create a dialog with Module.dialogStyle:
ExitDialog exitDialog = new ExitDialog("Are you sure?", Module.dialogStyle);
Thread: GLThread 2089, Exception: java.lang.IllegalArgumentException: style cannot be null. at package.Window.setStyle(Window.java:181) at package.Window.<init>(Window.java:63) at package.Dialog.<init>(Dialog.java:65) at package.ExitDialog$1.<init>(ExitDialog.java:38)
There is absolutely no reason why Module.dialogStyle should be null. The only place where I null this field is in Module.disposeStyles() , and this function is called only in one specific place of the application (at the very end).
I would suggest that this was a mistake in my code, although 95% of users have never experienced this. However, all 5% that they really experience seem to be Galaxy users, and I'm not sure if this is a coincidence:
- Galaxy S4
- Galaxy S III
- GALAXY Tab 3 lite
Does anyone have any ideas? Galaxy devices don't have a built-in RAM manager? Will this have anything to do with this?