From: Erik V. <eri...@xs...> - 2011-02-08 19:59:14
|
It seems to be a general problem: this error occurs if a file is saved in any game before any player action is executed (well, I tried only 1830 and 1889). I have applied a quick fix that works around it. The bug was in code developed by Stefan Frey that I haven't well studied, so I'm not sure that my solution is optimal, but it works for me. Erik. > -----Oorspronkelijk bericht----- > Van: Phil Davies [mailto:de...@gm...] > Verzonden: dinsdag 8 februari 2011 8:07 > Aan: st...@ro...; Development list for Rails: an 18xx game > Onderwerp: Re: [Rails-devel] Bug starting 1889 game in 1.4.1 > > I just tried this and found that if you finish the initial packet distribution then > you can save, hardly ideal and I'll take a look at this later when I'm back on a > machine with a dev environment installed, but you can at least play out the > packet selection over email, have one person input the results and carry on > with the game for the moment. > > Phil > > On 8 February 2011 00:41, Steve Undy <ste...@gm...> wrote: > > This fails for me using Sun Java on my work Windows XP system. Looks > > like Rails 1.4.1 is pretty broken for 1889. > > > > Steve Undy > > st...@ro... > > > > > > On Mon, Feb 7, 2011 at 5:22 PM, Justin Rebelo > > <jus...@gm...> > > wrote: > >> > >> That's often a reasonable point, however, I've tested the exact same > >> scenario in a freshly unpacked copy of rails-1.4 and had no such > >> issue. > >> > >> Furthermore, as I mentioned already, I've been using non-Sun version > >> of java thus far without any issue (playing dozens of games over a > >> year). > >> > >> On 2/7/11, Steve Undy <ste...@gm...> wrote: > >> > I've never had much luck with non-Sun versions of Java. > >> > > >> > Steve Undy > >> > st...@ro... > >> > > >> > > >> > On Mon, Feb 7, 2011 at 5:08 PM, Justin Rebelo > >> > <jus...@gm...>wrote: > >> > > >> >> If the subject line is incorrect and this is not a bug at all but > >> >> me doing something wrong, I apologize up front, but this seems to > >> >> be 100% reproducible on this computer system which has always been > >> >> just fine in the past until trying to start this game using 1.4.1. > >> >> > >> >> I am running Ubuntu 10.10. > >> >> > >> >> % java -version > >> >> java version "1.6.0_20" > >> >> OpenJDK Runtime Environment (IcedTea6 1.9.5) (6b20-1.9.5- > 0ubuntu1) > >> >> OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode) > >> >> > >> >> > >> >> As you can see here, the game seems to start OK: > >> >> > >> >> (**)Game is 1889. > >> >> Player 1 is Steve. > >> >> Player 2 is Costas. > >> >> Player 3 is Justin. > >> >> Each player receives ¥420 from the Bank. > >> >> The Bank has ¥5740. > >> >> Start of phase 2. > >> >> Bank size is ¥5740 > >> >> ================ Start of initial round ================ Steve > >> >> has the Priority Deal > >> >> > >> >> > >> >> > >> >> But when I choose File -> Save, I get the following exception > >> >> dumped to the shell: > >> >> > >> >> > >> >> > >> >> % sh rails.sh > >> >> log4j.configuration = log4j.properties Cmdline profile selection > >> >> = null Profile selection = user Loading games list from > >> >> GamesList.xml Exception in thread "AWT-EventQueue-0" > >> >> java.lang.NullPointerException > >> >> at > >> >> rails.game.ReportBuffer.getLatestReportItems(ReportBuffer.java:298 > >> >> ) > >> >> at > >> >> rails.ui.swing.GameUIManager.saveGame(GameUIManager.java:741) > >> >> at > >> >> rails.ui.swing.StatusWindow.actionPerformed(StatusWindow.java:631) > >> >> at > >> >> > >> >> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java > >> >> :2012) > >> >> at > >> >> > >> >> > javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton. > >> >> java:2335) > >> >> at > >> >> > >> >> > javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonMo > >> >> del.java:404) > >> >> at > >> >> > javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java: > >> >> 259) > >> >> at > >> >> javax.swing.AbstractButton.doClick(AbstractButton.java:374) > >> >> at > >> >> > >> >> javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.jav > >> >> a:829) > >> >> at > >> >> > >> >> > javax.swing.plaf.basic.BasicMenuItemUI$Handler.menuDragMouseReleas > >> >> ed(BasicMenuItemUI.java:939) > >> >> at > >> >> > javax.swing.JMenuItem.fireMenuDragMouseReleased(JMenuItem.java:585 > >> >> ) > >> >> at > >> >> > javax.swing.JMenuItem.processMenuDragMouseEvent(JMenuItem.java:482 > >> >> ) > >> >> at > >> >> javax.swing.JMenuItem.processMouseEvent(JMenuItem.java:428) > >> >> at > >> >> > >> >> > javax.swing.MenuSelectionManager.processMouseEvent(MenuSelectionMa > >> >> nager.java:320) > >> >> at > >> >> > >> >> > javax.swing.plaf.basic.BasicPopupMenuUI$MouseGrabber.eventDispatch > >> >> ed(BasicPopupMenuUI.java:860) > >> >> at > >> >> > >> >> java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit > >> >> .java:2378) > >> >> at > >> >> > >> >> java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.j > >> >> ava:2270) > >> >> at > >> >> java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2228) > >> >> at > >> >> java.awt.Component.dispatchEventImpl(Component.java:4432) > >> >> at > >> >> java.awt.Container.dispatchEventImpl(Container.java:2163) > >> >> at java.awt.Component.dispatchEvent(Component.java:4362) > >> >> at > >> >> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4 > >> >> 461) > >> >> at > >> >> > java.awt.LightweightDispatcher.processMouseEvent(Container.java:41 > >> >> 25) > >> >> at > >> >> java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055) > >> >> at > >> >> java.awt.Container.dispatchEventImpl(Container.java:2149) > >> >> at java.awt.Window.dispatchEventImpl(Window.java:2478) > >> >> at java.awt.Component.dispatchEvent(Component.java:4362) > >> >> at java.awt.EventQueue.dispatchEvent(EventQueue.java:604) > >> >> at > >> >> > >> >> > java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchT > >> >> hread.java:275) > >> >> at > >> >> > >> >> > java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThre > >> >> ad.java:200) > >> >> at > >> >> > >> >> > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchT > >> >> hread.java:190) > >> >> at > >> >> > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:1 > >> >> 85) > >> >> at > >> >> > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:1 > >> >> 77) > >> >> at > >> >> java.awt.EventDispatchThread.run(EventDispatchThread.java:138) > >> >> > >> >> > >> >> > >> >> ------------------------------------------------------------------ > >> >> ------------ The ultimate all-in-one performance toolkit: Intel(R) > >> >> Parallel Studio > >> >> XE: > >> >> Pinpoint memory and threading errors before they happen. > >> >> Find and fix more than 250 security defects in the development cycle. > >> >> Locate bottlenecks in serial and parallel code that limit performance. > >> >> http://p.sf.net/sfu/intel-dev2devfeb > >> >> _______________________________________________ > >> >> Rails-devel mailing list > >> >> Rai...@li... > >> >> https://lists.sourceforge.net/lists/listinfo/rails-devel > >> >> > >> > > > > > > > ---------------------------------------------------------------------- > > -------- The ultimate all-in-one performance toolkit: Intel(R) > > Parallel Studio XE: > > Pinpoint memory and threading errors before they happen. > > Find and fix more than 250 security defects in the development cycle. > > Locate bottlenecks in serial and parallel code that limit performance. > > http://p.sf.net/sfu/intel-dev2devfeb > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > ---------------------------------------------------------------------------- -- > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |