Menu

#2796 Unable to end turn - game waits forever (v 0.11.2)

Fixed_0.11.6
closed-fixed
nobody
None
5
2016-08-27
2015-01-15
martinv
No

Game waits forever while Indians do their turn.

Repro:
- start version 0.11.2 (Revision 6b10521)
- load attached saved game t3.fsg
- select "End turn"
- message "Waiting for: Iroquois" appears
- waiting, and waiting and waiting... forever.

Environment: Windows 7 En

1 Attachments

Discussion

1 2 > >> (Page 1 of 2)
  • Calebrw

    Calebrw - 2015-01-15

    This replicated for me too. The attached log is when it got stuck on the end of turn dialog waiting for the Iroquois. I believe this is with [277d9c].

    FreeCol.log

    This is what happens when I close the the program:

    net.sf.freecol.client.gui.GUI$1 componentResized
    INFO: Window size changes to java.awt.Dimension[width=1588,height=801]
    Thu Jan 15 16:50:52 CST 2015
    Thread: 24
    net.sf.freecol.common.resources.ResourceManager$1 run
    INFO: Background thread preloaded 1477 resources.
    Thu Jan 15 16:50:52 CST 2015
    Thread: 71
    net.sf.freecol.common.networking.ReceivingThread run
    INFO: Finished: FreeColClient:martinv-ReceivingThread-[Connection FreeColClient:martinv (Socket[addr=localhost/127.0.0.1,port=3541,localport=62552])]
    Thu Jan 15 16:51:07 CST 2015
    Thread: 56
    net.sf.freecol.common.networking.ReceivingThread run
    INFO: Finished: FreeColServer:-ReceivingThread-[Connection FreeColServer: (Socket[addr=/127.0.0.1,port=62552,localport=3541])]
    Thu Jan 15 16:51:07 CST 2015
    Thread: 55

     

    Related

    Commit: [277d9c]


    Last edit: Calebrw 2015-01-15
  • hackerjacksf

    hackerjacksf - 2015-01-20

    Getting the same problem I think (warnings about units), playing with 8 Europeans (as Russia), hanging on Portugal, just took an Arawak settlement if that helps.

    Here's the section of the log file, the End Turn bit starts at Tue Jan 20 13:39:50 GMT 2015:

    Edit(wintertime): I moved the log into an attachment for bugtracker readability.

     

    Last edit: wintertime 2015-01-20
  • wintertime

    wintertime - 2015-01-20

    I think Mike would like to have a savefile from you, too. But I noticed you are using an old Java version, maybe it helps if you download a new one from Oracle website and start a new game?

     

    Last edit: wintertime 2015-01-20
  • hackerjacksf

    hackerjacksf - 2015-01-20

    I've had a few issue with newer versions of Java with other apps unfortunately.

    I've attached the fsg.

     

    Last edit: hackerjacksf 2015-01-20
    • Mike Pope

      Mike Pope - 2015-01-22

      Same behaviour as the other game. The bug is easily reproducible with the saved game, but it is caused by corruption that happened some time earlier. We need a game that is not corrupt but is known to go bad.

      Java versions might indeed be implicated here. The corruption is due to some objects in a Map of WeakReferences disappearing when they should not. It is possible that differences between Java library implementations are to blame. That would explain why only a few people are seeing this.

       
  • martinv

    martinv - 2015-01-20

    Unfortunately I don't have a log from the same date when save game was created. I'm attaching current log. Following line might be related to the problem: java.lang.ClassCastException: net.sf.freecol.common.model.Colony cannot be cast to net.sf.freecol.server.model.ServerColony.

     
    • Mike Pope

      Mike Pope - 2015-01-20

      Unfortunately I don't have a log from the same date when save game was created.

      OK. We are stuck for now then.

      I'm attaching current log. Following line might be related to the problem: java.lang.ClassCastException: net.sf.freecol.common.model.Colony cannot be cast to net.sf.freecol.server.model.ServerColony.

      That part is easy to reproduce. Those crash messages are a consequence of the incomplete serialization I mentioned above. To make progress we need to go back and catch the failure that caused the game to become corrupt.

       
  • Mike Pope

    Mike Pope - 2015-01-21
    • status: open --> open-needs-info
     
  • martinv

    martinv - 2015-01-23

    Ok. This problem is quite common in the current version on my computer. I'll supply new savegame along with the current log when it occurs next time.

     
    • Mike Pope

      Mike Pope - 2015-01-24

      If you set the autosave interval to 1, such that there is an autosave file generated every turn, you are bound to catch it.

      Are you able to build from trunk? I am contemplating a few changes that may make the problem more visible.

       
  • BadCop

    BadCop - 2015-01-26

    Same bug
    java updated to 8.31
    Win 7 Ultimate

     
    • Mike Pope

      Mike Pope - 2015-01-26

      Same bug

      Same blockage.

      Once again: the problem here is due to the game getting corrupted. To debug this we need a saved game from just before the corruption happens, and repeatable steps to get to a corrupted state from there. The first bit should be fairly straightforward with an autosave interval of 1, the second might be harder. The other possible useful thing is a log file that includes the point where things broke.

      All the reports so far include games that nicely illustrate the corruption, and minimal log files that just contain data from loading the game and ending the turn. These are fine for convincing us there is a bug, but unhelpful in tracking it down.

       
  • BadCop

    BadCop - 2015-01-26

    the log to the bug

     
  • BadCop

    BadCop - 2015-01-27

    The log.txt above is a full log. I attach two savegames. One right before the bug and one right after the bug occurs. I couldnt reproduce the bug, but i will continue to do this.

     
    • Mike Pope

      Mike Pope - 2015-01-27

      Cool. I can confirm that Frühling is ok and Herbst is corrupt. However you did not say what you did to get from one to the other. I tried just ending the turn twice but the hang did not occur.

      The log.txt above is a full log

      Not in the sense I mean. It does not contain records from the year when the game went bad. AFAICT it only contains a game load and end turn. Do you have the log for the 1607 game/s above? I am looking for multiple end of turn events.

       
  • BadCop

    BadCop - 2015-01-27

    I am not sure... but i think i had the same bug sometime before. If i am right it may be a bug that occurs if two ships (one of yours and one from another nation) try to use the same field when returning or travel to europe.

     
    • Mike Pope

      Mike Pope - 2015-01-27

      ...it may be a bug that occurs if two ships...

      That bug had the same visible effect (game hangs), but a completely different underlying cause. The most important difference is that that one is fixed.

       
  • hackerjacksf

    hackerjacksf - 2015-02-09

    I may have made some progress on this, I've been able to fairly consistently force a corruption via savescumming after a unit is destroyed. I don't have any logs but it seems to be more consistent than to be a coincidence. Perhaps something is not cleared down properly when a game is loaded?

     
    • Mike Pope

      Mike Pope - 2015-02-09

      Perhaps something is not cleared down properly when a game is loaded?

      Perhaps. Or perhaps it is at the point the unit dies. Or perhaps elsewhere. Once again: do you have a saved game without the problem, and instructions on how to get from there to a place where the game has become corrupted. We need to take the guesswork out of this with a reproducible case.

       
  • martinv

    martinv - 2015-02-17

    Attaching a current frozen savegame along with log.

     
    • Mike Pope

      Mike Pope - 2015-02-19

      See my remark immediately above, and indeed further up. More games from after the corruption occurs are not going to help.

       
  • Mike Pope

    Mike Pope - 2015-02-20

    Tdoay a couple of improvements have been committed to trunk that make the corruption caused by this bug recoverable on reload. So if you are able to build from the trunk sources, there is at least now a workaround for this nasty bug (just save and reload).

    The real bug remains at large. Still hoping someone will provide a reproducible case (see above).

     
  • Focew

    Focew - 2015-03-06

    Hi,

    I have attached three savegames.
    First is a mid-turn save:
    1709_1_Frühling.fsg
    The second I have saved just before the end of the turn, and it is already corrupted:
    1709_1_Frühling_corrupted.fsg
    Then I re-played the turn from the first save with the same steps (as much as I could), and now it is ok:
    1709_1_Frühling_v4.fsg

    Unfortunately I could not find what is the specific move/action that corrupts the savegame.

    I have not attacked any indian settlement, only attacked/captured some English and Spanish ones.

    Hope this helps to find the issue.

     

    Last edit: Focew 2015-03-06
    • Mike Pope

      Mike Pope - 2015-03-06

      Cool. That gives us the best chance yet of seeing this bug occur. Can I assume the sequence of events was:

      1. Saved 1709_1_Frühling.fsg
      2. Played for a bit, saved 1709_1_Frühling_corrupted.fsg
      3. Reloaded 1709_1_Frühling.fsg
      4. Played for a bit, saved 1709_1_Frühling_v4.fsg

      If so, this is interesting, and suggestive that it is indeed a garbage collection issue.

       
  • Focew

    Focew - 2015-03-06

    Yes, this was the sequence.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.