From: Stefan F. <ste...@we...> - 2010-06-20 18:11:26
|
Erik: some follow up on the issue with the broken save file in Aliza's bug report: As I had the hope I could easily make the file at least reloadable, I believe I found a trace to the potential problem: The save file breaks at the following action: Action 378 delft: SellShares: 1 of 10% CPR at $110 apiece But delft should still have the share, as he bought CPR twice before (at actions 238, 244) and sold only once (action 323). The problematic action is the following: Action 330 azure: BuyCertificate: CPR 10% share from Pool price=$110 which gets executed on the reload as: 2010-06-20 19:58:33 DEBUG Action (azure): BuyCertificate: CPR 10% share from Pool price=$110 2010-06-20 19:58:33 DEBUG >>> Start MoveSet(index=330) 2010-06-20 19:58:33 INFO azure buys a 10% share of CPR from delft for $110. 2010-06-20 19:58:33 DEBUG Done: Move PublicCertificate: CPR 10% share from delft to azure Thus Rails assume that the certificate bought stems from delf instead from the Pool! It seems that action does not correctly identify the certificate bought. I checked that this is defined by the certificate ids. Thus I guess, that due to some undo the stack of certificates got mixed, either those in the IPO or in the possession of Delft (similar to the Baden issue in 1835). Thus in the game played the other certificate in the possession of Delft was sold to the Pool in 323 and then on the reload Rails moves the wrong one out of Delft portfolio at action 330 instead getting that out of the Pool. I hope this is of some help, however I do not know how to resolve that issue easily, as I do not know, what is required to keep the ordering of certificates in portfolios "undo-robust". It might be the better solution in the long run to identify the certificates by their properties (thus share percentage and previous owner) and be agnostic about which one exactly to take. At least one should check that the current owner of the certificate is identical to the previous owner implied by the action, but this does not fix the reload problem. I have attached two trimmed save files, one before and one after the error occurs. Stefan On Sunday 20 June 2010 14:54:55 Stefan Frey wrote: > Aliza: > thanks for the savefile. > Most of the issues have to be addressed by Erik, but for the revenue > > calculation I can give some feedback: > > (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. > > Unfortunately I cannot recreate the issue you report here: > I have the same problem with reloading the file, thus I wonder if the issue > occured anytime during the game or only at the specific time you originally > saved the game? > > Do you remember what was the case (but I fear some questions are too > detailed): > > - You were in the revenue phase already, did undo and went to lay tile > directly (as the company did not have any token)? Or have you done twice an > undo? Was a special tile lay of a private company involved? Which company > was operating? > > - After undoing, did the revenue run disappear (as it should)? > > - Did the system calculate the revenue run (thus you got the messagebox > with the run), but did not take the new (different) tile lay into account? > > - Or did simply nothing happened at all, thus the old revenue value was > still entered? > > I was able to confuse the tile/token laying mechansim by undos somehow, but > even in those cases the revenue calculation still worked. But maybe fixing > those errors might fix the (potentially missing) activation of the revenue > calculation as well. I will look into that. > > Stefan > > > > --------------------------------------------------------------------------- >--- ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |