Skip to content
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

Gdx.app is not initialized yet #4155

Closed
centy opened this issue Jun 19, 2016 · 4 comments
Closed

Gdx.app is not initialized yet #4155

centy opened this issue Jun 19, 2016 · 4 comments

Comments

@centy
Copy link

centy commented Jun 19, 2016

We experience few strange crashes reported through google play console. It looks like some events come faster thant setting Gdx.graphics Gdx.app etc.

Exception java.lang.NullPointerException: Attempt to invoke interface method 'com.badlogic.gdx.Graphics com.badlogic.gdx.Application.getGraphics()' on a null object reference
com.badlogic.gdx.backends.android.AndroidMouseHandler.onGenericMotion (AndroidMouseHandler.java:62)
com.badlogic.gdx.backends.android.AndroidInputThreePlus.onGenericMotion (AndroidInputThreePlus.java:47)
android.view.View.dispatchGenericMotionEventInternal (View.java:7882)
android.view.View.dispatchGenericMotionEvent (View.java:7869)
android.view.ViewGroup.dispatchTransformedGenericPointerEvent (ViewGroup.java:1862)
android.view.ViewGroup.dispatchHoverEvent (ViewGroup.java:1606)
android.view.View.dispatchGenericMotionEvent (View.java:7859)
android.view.ViewGroup.dispatchTransformedGenericPointerEvent (ViewGroup.java:1862)
android.view.ViewGroup.dispatchHoverEvent (ViewGroup.java:1606)
android.view.View.dispatchGenericMotionEvent (View.java:7859)
android.view.ViewGroup.dispatchTransformedGenericPointerEvent (ViewGroup.java:1862)
android.view.ViewGroup.dispatchHoverEvent (ViewGroup.java:1606)
android.view.View.dispatchGenericMotionEvent (View.java:7859)
android.view.ViewGroup.dispatchTransformedGenericPointerEvent (ViewGroup.java:1862)
android.view.ViewGroup.dispatchHoverEvent (ViewGroup.java:1606)
android.view.ViewGroup.exitHoverTargets (ViewGroup.java:1688)
android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:2689)
android.view.ViewRootImpl.dispatchDetachedFromWindow (ViewRootImpl.java:3207)
android.view.ViewRootImpl.doDie (ViewRootImpl.java:5818)
android.view.ViewRootImpl.die (ViewRootImpl.java:5791)
android.view.WindowManagerGlobal.removeViewLocked (WindowManagerGlobal.java:348)
android.view.WindowManagerGlobal.removeView (WindowManagerGlobal.java:303)
android.view.WindowManagerImpl.removeViewImmediate (WindowManagerImpl.java:84)
android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:3725)
android.app.ActivityThread.access$1400 (ActivityThread.java:151)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1374)
android.os.Handler.dispatchMessage (Handler.java:110)
android.os.Looper.loop (Looper.java:193)
android.app.ActivityThread.main (ActivityThread.java:5292)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:824)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:640)
dalvik.system.NativeStart.main (NativeStart.java)

@xoppa
Copy link
Member

xoppa commented Jun 19, 2016

https://github.com/libgdx/libgdx/wiki/Issue-Tracker

@xoppa xoppa closed this as completed Jun 19, 2016
@centy
Copy link
Author

centy commented Jun 19, 2016

I still think, that it is bug in libgdx. Initialization of graphics = new AndroidGraphics() is much before
Gdx.graphics = this.getGraphics();
When AndroidGraphics, its register itself as view.setRenderer(this);

@Tom-Ski
Copy link
Member

Tom-Ski commented Jun 19, 2016

If you think you have a valid bug, submit an issue according to the template, and the link Xoppa provided.

@intrigus
Copy link
Contributor

Duplicate of #4121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants