From: Erik V. <eri...@xs...> - 2010-10-28 19:10:19
|
As far as I can test, the problem is now completely fixed. The root cause was a combination of - the need for the UI to access certain data that it must obtain via the GameManager (in this case: which private is blocking a hex), - the fairly new method to find the GameManager via getInstance(), which needs NDC.get() to return a value that must be separately initialized in each thread that might need the GM, - bypassing the normal setup window caused the UI event thread to incompletely initialised until some action (such as laying a tile) is performed. The UI classes now all use the GameUIManager to find the GM. The fact that map painting stopped where it did (at hex J12) was probably caused by an error in finding data relating to the blocked hex I13 (by the B&O private), which was painted just before J12. As always, the fix will be in the next release. Erik. -----Original Message----- From: Erik Vos [mailto:eri...@xs...] Sent: Thursday 28 October 2010 00:09 To: 'Development list for Rails: an 18xx game' Subject: RE: [Rails-devel] Fwd: [Rails-users] 1.4, 1830,whole map not displaying I have committed code that partially fixes the map display problem. The map still isn't completely displayed the first time that it shows up after loading a game this way. But there shouldn't be any more exceptions when tiles are laid. Moreover, once a new tile is laid and the scroll bar is moved a little, the whole map suddenly appears. It isn't yet clear to me why map display stops halfway, in particular because the first undisplayed hex (J12) is just plain empty space. I still suspect that it is an initialization issue. If this code path is unmaintained, is there any reason not to remove it? ---Brett. I said that *I* did not maintain RunGame. Not sure who wrote it. But its the only start class through which the game can be loaded this way, and I think it was meant to be the ultimate replacement for GameTest. Perhaps I should stop ignoring it. Erik. On Tue, Oct 26, 2010 at 2:58 PM, Erik Vos <eri...@xs...> wrote: > Indeed I can reproduce the half map when starting from the command line, > although I don't see any exception. > > My guess is that some difference has crept in between the initialization > sequences of RunGame.loadGame() and GameSetupWindow.loadAndStartGame(). (BTW > I never use RunGame myself, and don't maintain it). I will try to have > another look later this week. > > Erik. > > ________________________________ > From: Phil Davies [mailto:de...@gm...] > Sent: Tuesday 26 October 2010 20:33 > To: Development list for Rails: an 18xx game > Subject: [Rails-devel] Fwd: [Rails-users] 1.4, 1830, whole map not > displaying > > Forwarding Marks mail from the users list, along with a save file showing > the issue > I've tried loading this under the current SVN revision and the issue is > definitely there. When you launch using the start game window it loads > perfectly fine, but loading from the command line breaks the map and makes > laying tiles impossible. I can't see any obvious differences in the setup > code. There are a couple of mostly similar steps but they converge > at gameUIManager.startLoadedGame(); so from that point on I would expect > them to behave identically. > Phil > ---------- Forwarded message ---------- > From: Mark Hamzy <ha...@ya...> > Date: 24 October 2010 21:46 > Subject: [Rails-users] 1.4, 1830, whole map not displaying > To: rai...@li... > > > I am seeing an issue with the map not displaying the whole 1830 map on rails > 1.4. I can reproduce this problem both on Windows [Windows XP 2.14, > Java(TM) SE Runtime Environment (build 1.6.0_22-b04)] and Linux [RHEL 5.5, > OpenJDK Server VM (build 1.6.0-b09, mixed mode)]. > > If I play my turn via the command line rails.bat/sh and pass in the saved > rails file, then I see the problem. If I, instead, load the saved rails > file from the "New Game" dialog, then I do not see the problem. > > The problem that I am seeing is that I only see half of the 1830 map. I can > force parts of the unseen map to redraw. But I cannot lay a tile. I see > the following exception: > > Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException > at rails.ui.swing.hexmap.GUITile.<init>(GUITile.java:54) > at rails.ui.swing.hexmap.GUIHex.dropTile(GUIHex.java:766) > at rails.ui.swing.ORUIManager.tileSelected(ORUIManager.java:704) > at rails.ui.swing.UpgradesPanel.mouseClicked(UpgradesPanel.java:417) > at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source) > at java.awt.Component.processMouseEvent(Unknown Source) > at javax.swing.JComponent.processMouseEvent(Unknown Source) > at java.awt.Component.processEvent(Unknown Source) > at java.awt.Container.processEvent(Unknown Source) > at java.awt.Component.dispatchEventImpl(Unknown Source) > at java.awt.Container.dispatchEventImpl(Unknown Source) > at java.awt.Component.dispatchEvent(Unknown Source) > at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) > at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) > at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) > at java.awt.Container.dispatchEventImpl(Unknown Source) > at java.awt.Window.dispatchEventImpl(Unknown Source) > at java.awt.Component.dispatchEvent(Unknown Source) > at java.awt.EventQueue.dispatchEvent(Unknown Source) > at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown > Source) > at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) > at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown > Source) > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > at java.awt.EventDispatchThread.run(Unknown Source) > > Any ideas what might be wrong? > > -- > Mark > > ----- > http://audio.hamzy.info/MandatoryBlackVelvetQualye.mp3 > > You must be the change you wish to see in the world. -- Mahatma Gandhi > Worrying is praying for that you do not wish to happen. > > Home Page: http://www.hamzy.info/ > Work Project: http://linux-ha.org/ > http://omniprint.sourceforge.net/ > > > > > ---------------------------------------------------------------------------- -- > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Rails-users mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-users > > > ---------------------------------------------------------------------------- -- > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > ---------------------------------------------------------------------------- -- Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |