From: Stefan F. <ste...@we...> - 2010-08-07 15:08:03
|
The mail and the save file below contained a plethora of valuable scenarios to find various bugs. All of them should be fixed in development now, thus we only have to wait for Brett for an upcoming release. I thank Aliza for reporting all those issues, this was an invaluable help to track them down. I have attached two save files: A) 1856-CGR-formation-undo-bug_trim_329.rails This is the save file which goes back to the root undo problem. From here the game could be replayed correctly. B) 1856_replayed_591_before_cgr.rails This is the save file which I saved before the CGR formation after replaying from the save file in A) using the development version. I am quite confident that I made no mistake during the replay, but there is no guarantee. This save file will only work with the upcoming release. Stefan Some comments and details of the changes below. On Sunday 20 June 2010 05:26:12 Aliza Panitz wrote: > The attached savefile is from a test game with 3 bugs, probably all > related to undo actions: > > (1) When I undo a tile lay and do something else, the route is not > recalculated. If I don't pay attention and calculate manually, I get > the run from the previous OR. I could not recreate this behavior exactly, but I found something similar: If a company has two base tokens, one with a valid route and another without a valid route, the revenue calculation did return a result. This is the case for the CPR with a lone token in Kitchener. This potentially also explains the complains of John David Galt on the revenue calculation not working in his test of 1835 for BY: I do not have his save file, but I guess that he tokened in Nuernberg and created a similar scenario there. Quote from his mail from 06/13/10: "The route calculation logic seems correct when it gives an answer at all. But in most turns it did not even guess at a revenue number for By." > > (2) If I try an undo during CGR formation (Oh wait, I forgot to buy > the 5-train over...), the game hangs and cannot be continued. > > The CGR ended up with 2 5-trains and 4 4-trains.The next company was > unable to lay a tile. ;-) Undo of the CGR formation round is a difficult issue, as the implementation of the sequence of companies to merge is not adapted for an easy change to state variable. I used an easier approach for some progress here: By linking all CGR decisions it is possible to undo the whole formation round in one Undo, which actual works now ( at least for my test cases). I added a few fixed to improve the UI behavior after the undo and there was a more serious bug, that the train limit of the CGR could be wrong in some cases. > > (3) The savefile in question, when I reload it, is complaining about > an illegal stock action in the round before the CGR formed. Since I > started the game in Rails 1.3 and played it through without saving > until the CGR formed, I would expect any illegal stock move to have > been noticed earlier. ;-) That was indeed related to a sequence of undo actions and was already fixed by Erik a few days ago. > > - Aliza |