#187 No Reset of board pieces after game

Board (55)

I have just upgrades to Snowleopard and although I have been using Jin 2.14.1 for many years without a problem I now seem to have an issue. I do not know if they are connected but it seems suspicious!

When I have finished a game and seek a new game the new game starts but the pieces remain at the final position of the old game. Slowly as pieces are moved the position rebuilds itself but this is almost like blindfold chess for the first 15 moves.

Could you please investigate?



  • It seems Apple have introduced quite a few issues with Snow Leopard. I'm going to wait at least until 10.6.1 before I start investigating and working around problems.

  • Yes - I have exactly the same issue. THanks for reporting this.

  • Workaround: you can drag a piece over the board, jin repaints the pieces underneath the dragged image.

  • Doug Bateman
    Doug Bateman

    I had a similar problem once. It was caused by delayed batch painting, which is legally allowed by the AWT specification. You might try adding a call to java.awt.Toolkit.getDefaultToolkit.sync() to see if that fixes the issue.

  • Jim Showalter
    Jim Showalter

    I have this same problem with Ubuntu 9.04 / KDE 4.2.2. Resizing the board refreshes the entire board. But it is confusing and costs valuable time in fast games.

  • I need a Show Leopard user to help me test a possible fix. Send me a note on ICC if you're available (user: DuckStorm).

  • Doug Bateman
    Doug Bateman

    Attached is a potential fix. Sadly, I can't test it, because I don't have a mac. However, I'm hoping one of the mac users above can give it a whirl and let us know. To install, just download the attached util.jar and replace the util.jar in your Jin directory. (I'm also attacking FixedJPanel.java for sasha-m in the event the fix works.)

  • Doug Bateman
    Doug Bateman

    Bah, I don't have permissions to attach files. So I've uploaded it to my server instead:

  • Doug, I downloaded your util.jar file and tried it, but Jin won't open. I get these error messages:

    Error type: java.lang.NoSuchMethodError
    Error message: free.util.swing.SwingUtils.makeIconButton(Ljavax/swing/AbstractButton;Ljavax/swing/Icon;Ljavax/swing/Icon;Ljavax/swing/Icon;)V

  • One big problem is the removing of the monospaced font in snow leopard that is widely used by jin as a non editable internal font.... Too bad. A reason for me not to move on to snow leopard on most of my Macs...

  • Doug Bateman
    Doug Bateman

    Okay, here's another attempt at testing a fix. This time drop off this Jar in the plugins directory. It should add a "Refresh" menu item to the Actions menu. If this works, then we'll know how to fix it, and it'll just be a matter of figuring out how to make the refresh occur automatically so you don't have to keep going to the menu.

  • Thanks for your efforts doug. I tried putting the refresh.jar in the plugins folder, I get the following exception when starting jin:

    at free.jin.ui.ActionsMenu.updateActionMenuItems(Unknown Source)
    at free.jin.ui.ActionsMenu.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Container.java:2622)
    at javax.swing.JComponent.addNotify(JComponent.java:4685)
    at javax.swing.JMenuBar.addNotify(JMenuBar.java:692)
    at java.awt.Container.addNotify(Container.java:2622)
    at javax.swing.JComponent.addNotify(JComponent.java:4685)
    at java.awt.Container.addNotify(Container.java:2622)
    at javax.swing.JComponent.addNotify(JComponent.java:4685)
    at javax.swing.JRootPane.addNotify(JRootPane.java:739)
    at java.awt.Container.addNotify(Container.java:2622)
    at java.awt.Window.addNotify(Window.java:662)
    at java.awt.Frame.addNotify(Frame.java:470)
    at free.jin.ui.AbstractUiProvider.restoreFrameGeometry(Unknown Source)
    at free.jin.ui.SdiUiProvider$FramePluginUIContainer.loadState(Unknown Source)
    at free.jin.ui.SdiUiProvider$FramePluginUIContainer.show(Unknown Source)
    at free.jin.ui.SdiUiProvider$FramePluginUIContainer.setVisible(Unknown Source)
    at free.jin.ui.AbstractUiProvider.sessionEstablished(Unknown Source)
    at free.jin.ConnectionManager.fireSessionEvent(Unknown Source)
    at free.jin.ConnectionManager.login(Unknown Source)
    at free.jin.ConnectionManager.start(Unknown Source)
    at free.jin.ui.SdiUiProvider.start(Unknown Source)
    at free.jin.Jin.start(Unknown Source)
    at free.jin.JinApplication.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at apple.launcher.LaunchRunner.run(LaunchRunner.java:115)
    at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
    at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)

  • Correction... the AbstractMethodError exception occurs when connecting to FICS (not at application startup).

  • Doug Bateman
    Doug Bateman

    Okay, 4th time's a charm. Try again :-). Same URL for the download.

  • Tom Crossland
    Tom Crossland

    Thanks for tying again doug... unfortunately I still get the AbstractMethodError exception. I've had a quick look at the code and I was wondering if an explicit board.repaint() might solve the problem. Haven't quite figured out where would be best to put it, but the init() method in BoardPanel looks like a good candidate. Will experiment and see if it helps.