From: Erik V. <eri...@xs...> - 2012-02-23 13:33:57
|
Thanks for your analysis. I have followed your first suggestion and pushed a fix. Erik. > -----Original Message----- > From: Frederick Weld [mailto:fre...@go...] > Sent: Thursday, February 23, 2012 7:49 AM > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] Problem with game init (was: Problem with 1835 > PfB) > > Stefan: > > To 99% this must have been something to do with Frederick's change of > > the NDC mechanism. > > Having taken a look at the online git repos, I confirm this. But since I do not > have access to my local git clone for the next days, please feel free to push a > fix to this according to the following analysis: > > (1) Game's add to the report buffer is called in Game's constructor but the > new GameManager instance is only created in Game's setup method (called > later). > > (2) ReportBuffer retrieves the game manager instance (yielding the old one). > Before the NDC change, it was returned null and would buffer the added > message. > > Two options to fix this: > > (1) Postpone the ReportBuffer add to Game's setup (after the new game > manager is initialized). But from static analysis, it's unclear whether follow-up > issues would arise. > > (2) Clear game manager singleton instance in game's constructor (would > require an additional method to GameManager calling > "gameManagerMap.put(GM_KEY, null);") > > -- Frederick > > ---------------------------------------------------------------------------- -- > Virtualization & Cloud Management Using Capacity Planning Cloud computing > makes use of virtualization - but cloud computing also focuses on allowing > computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |