Games Common crash error with my Invaders game

andymc

Well-Known Member
Licensed User
Longtime User
I'm getting the following crash report for my Invaders game but can't figure out what's causing it:

java.lang.RuntimeException:

at android.os.Handler.<init> (Handler.java:200)

at android.os.Handler.<init> (Handler.java:114)

at android.app.Dialog.<init> (Dialog.java:152)

at android.app.AlertDialog.<init> (AlertDialog.java:202)

at android.app.AlertDialog$Builder.create (AlertDialog.java:1105)

at anywheresoftware.b4a.BA.ShowErrorMsgbox (BA.java:260)

at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:224)

at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:170)

at anywheresoftware.b4a.libgdx.LibGDX$b.render (SourceFile:136)

at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame (SourceFile:439)

at android.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1647)

at android.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1352)


Any one got any ideas?
 

ilan

Expert
Licensed User
Longtime User
Maybe it has something to do with the msgbox u are showing when you click on back key.

If u r using modal dialog it will hold the app and it may be the reason for that.

I would recommend u to replace the msgbox with a own libgdx msg dialog. I mean showing a text with 2 options and maybe an lgtexture behind that may be the background.
 

wonder

Expert
Licensed User
Longtime User
@ilan is right, once LibGDX kicks in, forget about system dialogs, you'll run into problems.
 

andymc

Well-Known Member
Licensed User
Longtime User
@Erel Hi, no it's not starting any services, except google play services for leaderboards and achievements.
If the player presses the back button during gameplay, then it pops up a standard system msgbox2 dialog. I've not been able to replicate the crash on my test devices using the back button here. the area I'm focusing on now is the google play services buttons on my main menu, they do crash for me sometimes.
 

andymc

Well-Known Member
Licensed User
Longtime User
It's a different error but this is another one causing a lot of crash reports:
Screenshot_20171018-101658.png
I recently added google play services, do I need to add a check that it's managed to connect first or just wait a little longer before loading achievements?
 

LucaMs

Expert
Licensed User
Longtime User

An Schi

Well-Known Member
Licensed User
Do you maybe have a b4a version before starter service was introduced? (Not sure, maybe <6)
 
Top