CodinGame / codingame-game-engine

CodinGame Engine
https://www.codingame.com
MIT License
112 stars 41 forks source link

Internal error #56

Closed Mortis66666 closed 2 years ago

Mortis66666 commented 2 years ago

I have an error when I try to run the multiplayer game I'm working on, it's working at the start, but now it shows an internal server error. Error screenshot

Also, another problem, the web server doesn't show anything, only a black screen without gameplay (although it still works when I export it and upload to Codingame)

CGjupoulton commented 2 years ago

It would help if you could provide a link to the contribution

Mortis66666 commented 2 years ago

Here you go: https://www.codingame.com/contribute/view/16053655d4c27cf93d03a18ec3f266622ef89

CGjupoulton commented 2 years ago

@Mortis66666 your game hangs on the first turn, you have an infinite loop in canGo, the same problem happens locally

CGjupoulton commented 2 years ago

@Mortis66666 on our production servers that canGo method can end up hanging because of this:


java.lang.OutOfMemoryError: Java heap space
    at java.base/java.util.LinkedList.linkLast(LinkedList.java:146)
    at java.base/java.util.LinkedList.add(LinkedList.java:342)
    at com.codingame.game.Player.calculateFreeSpace(Player.java:140)
    at com.codingame.game.Referee.abort(Referee.java:102)
    at com.codingame.game.Referee.gameTurn(Referee.java:74)```
CGjupoulton commented 2 years ago

We'll be adding some extra details to the "internal error" message to make it clear when the problem comes from a timeout