From: Bill R. <ro...@gm...> - 2011-01-25 10:42:10
|
Hi Phil, I encounter this error when playing a new game created in the trunk code. If it works for others, it's probably some sort of misconfiguration on my end. As far as I can tell I have the latest version of the source, but I'm not very familiar with Eclipse. Bill On 2011-01-25, at 18:23 , Phil Davies wrote: > Bill, > > I've just checked this against the trunk code checked out today and I > don't have this problem. > > Are you using a saved game made with 1.4? There has been a change to > the tile manifest to 1889 (tile 440 was broken) so it's likely that > your saved game won't work with the trunk code because of this change. > Starting a new game from scratch and using B's power worked okay for > me. > > Phil > > > On 25 January 2011 09:57, Bill Rosgen <ro...@gm...> wrote: >> Hello, >> >> Hopefully this is the right place to post this. I've recently checked the source out of svn and have been playing around with rails (so that I can play 18EU on my laptop with small screen). When playing 1889 I run into a problem that the owner of private B cannot lay the port tile, but only if I use the code I've checked out of svn -- version 1.4 works correctly. >> >> Specifically, when the user clicks on a map space where he can lay the port tile there's a NullPointerException thrown from line 106 of UpgradesPanel.populate(). It looks like the call to layTile.getTileColours() returns a null pointer for at least one of the tiles in the list (I assume it's the port tile, since it's a special tile, so the constructed of LayTile is called for the SPECIAL_PROPERTY case where LayTile.tileColours does not get set. >> >> I have a savegame that can be used as a test-case, but I encounter this problem literally anytime the owner of private B attempts to lay the port tile (which can be as early as the first tile lay), so I'm not sure it's worth sending out. >> >> I am able to get around the problem my testing that layTile.getTileColours() returns non-null, but as I'm not familiar with the code, I'm not sure if that will break anything else. Specifically, if I change lines 104-115 of UpgradesPanel.populate() to the following: >> >> for (TileI tile : tiles) { >> // Skip if not allowed in LayTile >> if (layTile.getTileColours() != null && layTile.getTileColours().get(tile.getColourName()) < 1) continue; >> >> // special check: does the tile increase the colour number? >> // this avoids that a special tile lay down or equalgrades existing tiles >> // TODO EV: I'm not sure if this is a necessary precaution. >> if (layTile.getTileColours() != null && !layTile.isTileColourAllowed(tile.getColourName())) continue; >> >> if (!orUIManager.tileUpgrades.contains(tile)) >> orUIManager.tileUpgrades.add(tile); >> } >> >> then it seems that the private power works correctly. >> >> I'd send a patch, but I'm not convinced that UpgradesPanel is the right place to make this change and I'm also not sure that the bug isn't some artifact of me misconfiguring Eclipse. >> >> Thanks, >> Bill Rosgen >> >> >> ------------------------------------------------------------------------------ >> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! >> Finally, a world-class log management solution at an even better price-free! >> Download using promo code Free_Logger_4_Dev2Dev. Offer expires >> February 28th, so secure your free ArcSight Logger TODAY! >> http://p.sf.net/sfu/arcsight-sfd2d >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel >> > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |