I have a graph-like object that I'm sending from server to client that contains nodes
that have adjacencyLists
.
I have something similar to this:
Clearing c1 = new Clearing(1, 134, 151);
Clearing c6 = new Clearing(6, 250, 88);
c1.adjacentByPath.add(new Path(1, c6));
c6.adjacentByPath.add(new Path(1, c1));
Each time I send the object that contains these clearings, I receive the following error:
Exception in thread "Server" java.lang.StackOverflowError
at com.esotericsoftware.kryo.Kryo.getRegistration(Kryo.java:448)
at com.esotericsoftware.kryo.util.DefaultClassResolver.writeClass(DefaultClassResolver.java:79)
......
Is there a workaround for this in Kryonet? Thanks