Coder Social home page Coder Social logo

Comments (16)

Sesu8642 avatar Sesu8642 commented on June 30, 2024 1

I fixed a bug that happened under these rather specific conditions:

  1. play a game that has a winner (indicated by a popup about one side giving up)
  2. play at least another turn
  3. exit the game to the main menu
  4. start a new game in which the player is not the first to do their turn

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.

from feudaltactics.

Sesu8642 avatar Sesu8642 commented on June 30, 2024

Thanks for reporting! I couldn't reproduce it so far but I will try to have a closer look.

from feudaltactics.

d-albrecht avatar d-albrecht commented on June 30, 2024

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.

from feudaltactics.

FabulousOne avatar FabulousOne commented on June 30, 2024

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 !

feudal-tactics-logs-2023-02-25-14-16-09.zip

from feudaltactics.

Sesu8642 avatar Sesu8642 commented on June 30, 2024

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.

from feudaltactics.

FabulousOne avatar FabulousOne commented on June 30, 2024

from feudaltactics.

FabulousOne avatar FabulousOne commented on June 30, 2024

@Sesu8642 check that, please:

feudal-tactics-logs-2023-02-26-18-24-44.zip

from feudaltactics.

Sesu8642 avatar Sesu8642 commented on June 30, 2024

Thanks, @FabulousOne. This is exactly what I needed.

from feudaltactics.

FabulousOne avatar FabulousOne commented on June 30, 2024

😅

from feudaltactics.

d-albrecht avatar d-albrecht commented on June 30, 2024
[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).

from feudaltactics.

Sesu8642 avatar Sesu8642 commented on June 30, 2024

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.

from feudaltactics.

d-albrecht avatar d-albrecht commented on June 30, 2024

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.

from feudaltactics.

Sesu8642 avatar Sesu8642 commented on June 30, 2024

Was it the same exception as before? And how do you reproduce it? I tried your parameters and don't have any issues.

from feudaltactics.

d-albrecht avatar d-albrecht commented on June 30, 2024

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.

from feudaltactics.

Sesu8642 avatar Sesu8642 commented on June 30, 2024

The situation I fixed was caused by a previously played game. You probably encountered a different issue.

from feudaltactics.

Sesu8642 avatar Sesu8642 commented on June 30, 2024

I can see on Google Play that someone had another crash at the same line of code. Looks like it I missed something.

from feudaltactics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.