Ludii Forum
Odd - bug - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: General (https://ludii.games/forums/forumdisplay.php?fid=1)
+--- Forum: Discussion (https://ludii.games/forums/forumdisplay.php?fid=4)
+--- Thread: Odd - bug (/showthread.php?tid=224)



Odd - bug - slimy_asparagus - 10-30-2020

We get a situation where we get the error:

"Error painting components. Loading default game (Tic-Tac-Toe)."

This is really annoying. Could it fail more gracefully so the game is not lost. I am not sure how easy it is to reproduce but it happened twice when my daughter was hesitating over a move.


RE: Odd - bug - MatthewStephenson - 10-30-2020

Hi,

Could you please give any extra details about what you were doing when you experienced this?
Where you making a specific move, were you dragging a piece at the time, etc.
If possible, could you please also send you preferences file (.pref), which should be located in the same directory as the Ludii jar file.

Cheers,
Matthew


RE: Odd - bug - slimy_asparagus - 10-30-2020

(10-30-2020, 01:17 PM)MatthewStephenson Wrote: Hi,

Could you please give any extra details about what you were doing when you experienced this?
Where you making a specific move, were you dragging a piece at the time, etc.
If possible, could you please also send you preferences file (.pref), which should be located in the same directory as the Ludii jar file.

Cheers,
Matthew
 A piece was being dragged.

I will attach the preferences file.

Also I sort of came across the same issue in a different and more reproducible context. In the attached lud file, it compiles. Moving onto the board works, but moving within the board does not. Clearly I am doing something wrong there.

However if I uncomment 

Code:
//        (from (sites "Edge"))
then I get the same error "Error painting components" error even after it compiles successfully.

(10-30-2020, 01:17 PM)MatthewStephenson Wrote: Hi,

Could you please give any extra details about what you were doing when you experienced this?
Where you making a specific move, were you dragging a piece at the time, etc.
If possible, could you please also send you preferences file (.pref), which should be located in the same directory as the Ludii jar file.

Cheers,
Matthew
Actually I did not find a ".pref" file. I assumed you meant "ludii_preferences.json" but I had to change it to a ".txt" to upload.


RE: Odd - bug - Eric Piette - 10-30-2020

Hi,


Code:
(move Step
    (from (sites "Edge"))
    (to (sites "Edge"))
)

seems wrong in your description, (you can not step to a specific set of sites, but stepping only to site at a distance of one with conditions on it). But thanks for letting us know about the exception trigger in doing that. I will add a check for it.

However I think what you want here is just a simple move (not a step) such as 

Code:
(move
    (from (sites "Edge"))
    (to (sites "Edge"))
)


Regards,
Eric


RE: Odd - bug - MatthewStephenson - 10-30-2020

Hi,

We think we have uncovered the cause of your problem, it is indeed caused by dragging pieces.
We think the error may sometimes occur when the piece is dragged outside of the normal application window. This will be fixed in the next release.

Cheers,
Matthew


RE: Odd - bug - slimy_asparagus - 10-30-2020

(10-30-2020, 02:07 PM)Eric Piette Wrote: Hi,


Code:
(move Step
    (from (sites "Edge"))
    (to (sites "Edge"))
)

seems wrong in your description, (you can not step to a specific set of sites, but stepping only to site at a distance of one with conditions on it). But thanks for letting us know about the exception trigger in doing that. I will add a check for it.

However I think what you want here is just a simple move (not a step) such as 

Code:
(move
    (from (sites "Edge"))
    (to (sites "Edge"))
)


Regards,
Eric
Eric, Thanks.

However I do want to restrict the move to one step. There are in the game spec a lot more restrictions than that. However given what I have defined so far "one step" and in the "Edge" region is the closest very rough approximation. I specifically don't want to use "StepToEmpty" because there is stacking. I want to explore the Stacking issues as soon as possible before exploring other aspects.

So I can see where my error was, but I still can't work out how to fix it.

So now I am trying:


Code:
(define "MoveWithinBoard"
    (move Step
         (to if:(is In "Edge"))
    )
)
However this does not compile.

Okay I got something to compile:

Code:
(define "MoveWithinBoard"
    (move Step
         (to if: (is In (to) (sites "Edge")))
    )
)
But it doesn't work. It just does not recognize any moves within the board.


RE: Odd - bug - Eric Piette - 11-02-2020

Hi,

If you send me a full .lud and the problems you have in it, I can take a look.

Regards,
Eric


RE: Odd - bug - slimy_asparagus - 11-02-2020

(11-02-2020, 08:21 AM)Eric Piette Wrote: Hi,

If you send me a full .lud and the problems you have in it, I can take a look.

Regards,
Eric


Eric,

Thanks for the response.

The current status of my project is expressed here: latest work.

Nicholas