Closed awb95 closed 1 year ago
Thanks for reporting! I couldn't reproduce it so far but I will try to have a closer look.
Hey,
I'm just hijacking this to report my own game crash (rather than re-opening my own crash report), because the game just crashed for me as I was re-generating a new random level.
I was on the level select screen and clicked the die a few times to find a playable/win-able starting position, and at one point, the game just closed/crashed.
I have the same crash problems. I tried to catch logs. Could you look at them and tell me if they are helpful? If not I'll try again. Thanks for this nice little addicting game, @Sesu8642 !
Thanks for the logs, @FabulousOne. There could be useful information in the logcat but the snipped you included doesn't unfortunately. I suspect the error looks something like this:
02-25 15:46:39.522 18950 18976 E AndroidRuntime: FATAL EXCEPTION: GLThread 952
02-25 15:46:39.522 18950 18976 E AndroidRuntime: Process: de.sesu8642.feudaltactics, PID: 18950
02-25 15:46:39.522 18950 18976 E AndroidRuntime: java.lang.RuntimeException: TEST
02-25 15:46:39.522 18950 18976 E AndroidRuntime: at de.sesu8642.feudaltactics.FeudalTactics.create(FeudalTactics.java:34)
02-25 15:46:39.522 18950 18976 E AndroidRuntime: at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:281)
02-25 15:46:39.522 18950 18976 E AndroidRuntime: at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1557)
02-25 15:46:39.522 18950 18976 E AndroidRuntime: at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1272)
I am not sure though. I need to put in some more work and make it easy for users to get debug information in crash situations.
OK, I'll check and try again.
@Sesu8642 check that, please:
Thanks, @FabulousOne. This is exactly what I needed.
😅
I fixed a bug that happened under these rather specific conditions:
This would cause the game to crash when the first (human) player turn started because of some non-cleared information from the previous game. This is what I could find out from @FabulousOne's log but very likely also what happened to @awb95. @d-albrecht I need logs to analyze your crash - either from the console or logcat. I'm working on making it easier to get the logs in crash situations. It will be included in the next non-bugfix release.
[de.sesu8642.feudaltactics.backend.ingame.GameController] generating a new game state with bot intelligence LEVEL_3 and MapParameters [humanPlayerNo=1, botPlayerNo=5, seed=1678650312305, landMass=150, density=0.0]
[de.sesu8642.feudaltactics.backend.ingame.GameController] generating a new game state with bot intelligence LEVEL_3 and MapParameters [humanPlayerNo=1, botPlayerNo=5, seed=1678650318025, landMass=150, density=0.0]
[de.sesu8642.feudaltactics.backend.ingame.botai.BotAi] the game crashed because of an unexpected exception
java.lang.NullPointerException: Cannot invoke "de.sesu8642.feudaltactics.backend.gamestate.Player.getType()" because the return value of "de.sesu8642.feudaltactics.backend.gamestate.GameState.getWinner()" is null
at de.sesu8642.feudaltactics.frontend.ui.screens.IngameScreen.lambda$handleGameStateChange$4(IngameScreen.java:246)
at de.sesu8642.feudaltactics.frontend.ui.screens.IngameScreen.render(IngameScreen.java:386)
at com.badlogic.gdx.Game.render(Game.java:48)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:387)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:192)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:166)
at de.sesu8642.feudaltactics.desktop.DesktopLauncher.main(DesktopLauncher.java:22)
Before I read your request for a log, it crashed several times, after I had read it, it worked flawlessly for quite some time! But finally it crashed again. This was with commit: 7103128b8476f2cd80bb1e4a12a493356c716f9b
As I described, on the level selection screen, by clicking the dice (until it crashes).
Thanks, @d-albrecht. This looks basically the same as the other stack trace. Looks like re-generating the map can also cause the crash. It should be fixed in version 1.1.3.
I just pulled the new commits and switched to the latest version. And then this happened: AI: Hard Size: Medium Density: Medium Seed: 1678814257297 Crash (reproducible) on first turn. I guess the problem in fact isn't fixed yet.
Was it the same exception as before? And how do you reproduce it? I tried your parameters and don't have any issues.
I'm pretty sure that I properly updated to 1.1.4 because after I updated and reopened the game, I got the "see changelog" dialog. But I can't reproduce the crash any more. And I only launched the game via shortcut when I reported this, so without any way to see/store the log. And opening the game via shell yields no more crashes. But just like my former installed version, I started the game, selected a match, clicked play, watched the AIs' turns, and then it crashed. But as even I can't reproduce the crash anymore, I'd suspect that I hadn't "fully" upgraded yet and ran some messed up "intermediate" version. Unless this happens again in the future.
The situation I fixed was caused by a previously played game. You probably encountered a different issue.
I can see on Google Play that someone had another crash at the same line of code. Looks like it I missed something.
The game sometimes crashes when you try to skip the Ai's first move. After restarting the game i can continue with my first move. Unfortunately, I could not reproduce the error permanently. I'm using v1.1.2