Giter VIP home page Giter VIP logo

Comments (7)

Sesu8642 avatar Sesu8642 commented on May 12, 2024 1

I just observed it as well. I will try to re-do the UI change in a different way and see if the crash still happens.

from feudaltactics.

Sesu8642 avatar Sesu8642 commented on May 12, 2024

Thanks for reporting! This seems to be a bug in libGDX. I recently added the buttons that give you control over the enemy turn speed and the ability to skip it. Maybe the manipulation of the UI can cause this crash if it happens while rendering is in progress. It might also be caused by the changing texture of the speed button. Do you remember if you pressed that button when the crash happened?

from feudaltactics.

kyrashelwo avatar kyrashelwo commented on May 12, 2024

Interesting! Thanks for the quick response. I don't recall changing the speed, but I can't rule it out 100% sadly. I will observe it more closely if the crash happens again.

from feudaltactics.

kyrashelwo avatar kyrashelwo commented on May 12, 2024

I observed it again, same callstack after Your Turn console log. This time I am sure I only clicked the end turn button. The crash happened immediately after clicking the "end turn" button, the moves of the enemy were not executed (or at least not displayed, even though I have set it to 300ms).

Possibly an additional related bug: I think restoring from the saved game allowed me to skip the enemy turn.

from feudaltactics.

Sesu8642 avatar Sesu8642 commented on May 12, 2024

When the exception happens, only the UI thread crashes. The bots still do their turns and when they are done, an autosave happens. It would be better if all threads ended in case of an exception. Not sure if there is an easy way to do this.

from feudaltactics.

kyrashelwo avatar kyrashelwo commented on May 12, 2024

Ok, if just the animation is missing, but everything is saved and resumed correctly then it is not a big issue to me, especially if it only happens in case of an exception which usually will be rare. Thanks for the investigation!

from feudaltactics.

Sesu8642 avatar Sesu8642 commented on May 12, 2024

Changing from one set of buttons to the other was triggered by a change of the game state which was triggered by the bot AI thread. It looks like the UI classes from libGDX are not thread-safe. When the button change happened at the same time as the rendering thread tried to render the UI, this exception (and possibly others) could occur.
If something similar happens again, please re-open.

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.