Ludii Forum
Having an issue with remote play - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Ludii Player Problems (https://ludii.games/forums/forumdisplay.php?fid=6)
+--- Thread: Having an issue with remote play (/showthread.php?tid=503)



Having an issue with remote play - slimy_asparagus - 03-11-2021

I have been having several issues with remote play.

None of these issues are apparent when you play a game from start to finish in a single session. I have been playing Suffragetto, closing Ludii, restarting and rejoining and so on. The game is 650. For my last three moves I have selected a piece but it has been moved to a random location different from what I intended. We are probably going to abandon this game, as a result but I will continue as long as possible to see if I spot something. I suspect it may be hard to reproduce.


RE: Having an issue with remote play - MatthewStephenson - 03-11-2021

Hi,

Could you provide some extra details on what exactly you are doing and what the result is?
From just the information on our server I can't see anything unusual.

Are you dragging a piece from one location to another, are you just selecting a piece with the intent to move it?

Do you get any unusual output printed in the status panel?
If possible could you start LudiiĀ from a terminal the next time you make a move, and see if you get anything printed there.

Also please make sure you don't have any AI agents selected or anything else that might inadvertently give this outcome (e.g. Auto From/To Moves).

Cheers,
Matthew


RE: Having an issue with remote play - slimy_asparagus - 03-11-2021

> Could you provide some extra details on what exactly you are doing and what the result is?
> From just the information on our server I can't see anything unusual.
> Are you dragging a piece from one location to another, are you just selecting a piece with the intent to move it?

I am clicking on the piece I want to move. Normally this would then show me a choice of possible moves. Instead it is just picking a destination itself. I have to admit I have been a little stressed this week. I was wondering if it was just being hypersensitive and I maybe I was unconsciously giving it a little nudge. But I don't see any evidence of this when I play locally.


> Do you get any unusual output printed in the status panel?

Not that I noticed.

> If possible could you start LudiiĀ from a terminal the next time you make a move, and see if you get anything printed there.

This might not be quite relevant as I started Ludii, did a move in the local replica of the remote game, then joined the remote game, then closed Ludii. But this is what I got.

Code:
Compiled Suffragetto successfully.

Compiled Suffragetto successfully.
Move not applied: [Pass:decision=true]
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1 >= 1
at java.base/java.util.Vector.elementAt(Vector.java:497)
at java.desktop/javax.swing.table.DefaultTableColumnModel.getColumn(DefaultTableColumnModel.java:295)
at java.desktop/javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:2083)
at java.desktop/javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1883)
at java.desktop/javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at java.desktop/javax.swing.JComponent.paintComponent(JComponent.java:797)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1074)
at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5255)
at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:246)
at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1323)
at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5203)
at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5013)
at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:865)
at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:848)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:848)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:823)
at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:772)
at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1890)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.desktop/java.awt.Dialog.show(Dialog.java:1070)
at java.desktop/java.awt.Component.show(Component.java:1716)
at java.desktop/java.awt.Component.setVisible(Component.java:1663)
at java.desktop/java.awt.Window.setVisible(Window.java:1031)
at java.desktop/java.awt.Dialog.setVisible(Dialog.java:1005)
at app.display.dialogs.util.DialogUtil.sharedInitialisation(DialogUtil.java:100)
at app.display.dialogs.util.DialogUtil.initialiseSingletonDialog(DialogUtil.java:61)
at app.display.dialogs.remote.RemoteDialog.showDialog(RemoteDialog.java:114)
at app.menu.MainMenuFunctions.checkActionsPerformed(MainMenuFunctions.java:961)
at app.DesktopApp.actionPerformed(DesktopApp.java:297)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1020)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1064)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
at java.desktop/java.awt.Component.processEvent(Component.java:6400)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
^Cnicholas@leonhartsberger:~/Ludii$


> Also please make sure you don't have any AI agents selected or anything else that might inadvertently give this outcome (e.g. Auto > From/To Moves).


This is against "DeanTheBean".


RE: Having an issue with remote play - MatthewStephenson - 03-11-2021

Hi,

Thanks for the extra details. Unfortunately I still can't see anything that might explain why this is happening....
is this phenomenon occurring consistently every time you make a move for this game specifically? If so, please don't abandon the game officially, as it's good for testing this issue to see if its fixed.

Please make sure that "Auto From Moves" and "Auto To Moves" are both disabled under the Game menu.

Could you try dragging the piece next time rather than clicking on it, and seeing if you still get the issue with the app making random moves for you. This will help us narrow down the possible causes.

Another thing (if its not too much trouble) is if you can temporarily remove/rename your ludii_preferences.json file, as it's possible that one of your options is not behaving correctly and is causing this issue.

Cheers,
Matthew


RE: Having an issue with remote play - slimy_asparagus - 03-12-2021

(03-11-2021, 09:57 PM)MatthewStephenson Wrote: Please make sure that "Auto From Moves" and "Auto To Moves" are both disabled under the Game menu.

I found that Auto From Moves were enabled but not Auto To Moves.

I have moved the preferences file aside.


RE: Having an issue with remote play - MatthewStephenson - 03-12-2021

Hi,

I might have found a possible cause for this issue.

In our current app version if you click near the edge between two cells, and there is a legal move between these cells, then the move may be performed straight away.

To prevent this, simply make sure to click right in the middle of the cell you wish to select.

This bug does also happen in local play, and is not exclusive to online games, so I'm not sure if this is the cause of your problem.

Regardless, I will fix this issue for the next release.

Cheers,
Matthew


RE: Having an issue with remote play - slimy_asparagus - 03-15-2021

Matthew,

It seems that the "Auto From" option is always on. I have no idea what it means. When I turn it off it seem to come back on and I don't see what difference it makes.

The problem seems to have gone away, so I suspect it was something in the preferences file.


RE: Having an issue with remote play - MatthewStephenson - 03-15-2021

Hi,

Great. I'm glad the preferences removal fixed it.

I've reworked a lot of the move selection code to be a lot simpler and to address some of these bugs, including removing the auto-from / auto-to options, so you shouldn't have to worry about this in the next release.

Hopefully this will also prevent this kind of issue from happening again

Cheers,
Matthew