From: Erik V. <eri...@xs...> - 2014-08-29 12:58:57
|
Hello Martin, The probable cause is that the CGR has no home hexes, and that getHomeHexes() in such a case returns null instead of an empty array. Most uses of getHomeHexes() does not check for this, so more bugs could be imminent. I would suggest to initialize PublicCompany.homeHexes as an empty array instead of null. A quick check showed me that there is at least one place where a check for null is done (in MapManager), which check will become redundant after my proposed change. I don't know if there are any places where the code positively relies on the result being null; you should definitely check all uses of getHomeHexes(). Best regards, Erik > -----Original Message----- > From: Dr. Martin Brumm [mailto:dr....@t-...] > Sent: Friday, August 29, 2014 8:39 AM > To: Erik Vos; Stefan Frey; Development list for Rails: an 18xx game > Subject: Bug in relayBase Token reported by Pieter Lust > Importance: High > > Hello Erik, Hello to the Rest, > > In ORUIManager - relayBaseToken theres a special Case for the > BadenHexUpgrade where the Codes sorts the Tokens. This apparently has > sideeffects for games that have also two stops with at least one stop > tokened. > > For my eye the Collections.sort tries to sort an Object (ORUiManager) vs the > occupied Stop at least in the context of this save game 1856. > > As a workaround one can disable that check for any game besides 1835, and > then the game continues as expected. > > But i would love to have you (Erik) a deeper look at things because you > orginally coded that part and i'll probably miss the clues here :) > > Regards, > Martin > |