Terasology / LightAndShadow

Light & Shadow is an experimental game type set in a quirky Alice in Wonderland inspired setting
Apache License 2.0
8 stars 22 forks source link

Adjustments needed for engine PR 3456 #74

Closed Cervator closed 5 years ago

Cervator commented 6 years ago

Merging MovingBlocks/Terasology#3456 causes this module to no longer compile. Same issue with the Dialogs and Tasks modules, so need those fixed to be able to test Light & Shadow properly

Sending this @eviltak's way as the author of the engine PR and/or to @dacharya64 in case interested :-)

Cervator commented 6 years ago

Note: This is now tied to https://github.com/MovingBlocks/Terasology/issues/3490 instead - see it for details

llvieira commented 6 years ago

EDIT: The error I described bellow was fixed by @eviltak. He modified the type handling system to support recursive types.


Actually, there are more than just compilation errors. After adapting the module to the new serialization system, the game just crash when picking L&S from the gameplay template screen and hitting play. We get an StackOverflowError which is directly related to serialization.

Part of the stacktrace is as follows:

...

02:30:06.888 [main] WARN  o.t.p.s.ComponentSerializer - Cannot deserialize unknown field 'distanceBetweenSwimStrokes' onto 'engine:CharacterMovement'
02:30:11.358 [main] ERROR o.terasology.engine.TerasologyEngine - Uncaught exception, attempting clean game shutdown
java.lang.StackOverflowError: null
    at org.terasology.reflection.TypeInfo.<init>(TypeInfo.java:68)
    at org.terasology.reflection.TypeInfo.of(TypeInfo.java:83)
    at org.terasology.persistence.typeHandling.mathTypes.factories.Rect2fTypeHandlerFactory.create(Rect2fTypeHandlerFactory.java:32)
    at org.terasology.persistence.typeHandling.TypeSerializationLibrary.getTypeHandler(TypeSerializationLibrary.java:230)
    at org.terasology.persistence.typeHandling.TypeSerializationLibrary.getTypeHandler(TypeSerializationLibrary.java:214)
    at org.terasology.persistence.typeHandling.coreTypes.factories.ArrayTypeHandlerFactory.create(ArrayTypeHandlerFactory.java:49)
    at org.terasology.persistence.typeHandling.TypeSerializationLibrary.getTypeHandler(TypeSerializationLibrary.java:230)
    at org.terasology.persistence.typeHandling.TypeSerializationLibrary.getTypeHandler(TypeSerializationLibrary.java:214)
    at org.terasology.persistence.typeHandling.coreTypes.factories.ObjectFieldMapTypeHandlerFactory.lambda$create$0(ObjectFieldMapTypeHandlerFactory.java:59)
    at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
    at org.terasology.persistence.typeHandling.coreTypes.factories.ObjectFieldMapTypeHandlerFactory.create(ObjectFieldMapTypeHandlerFactory.java:54)
    at org.terasology.persistence.typeHandling.TypeSerializationLibrary.getTypeHandler(TypeSerializationLibrary.java:230)
    at org.terasology.persistence.typeHandling.TypeSerializationLibrary.getTypeHandler(TypeSerializationLibrary.java:214)
    at org.terasology.persistence.typeHandling.coreTypes.factories.ArrayTypeHandlerFactory.create(ArrayTypeHandlerFactory.java:49)
    at org.terasology.persistence.typeHandling.TypeSerializationLibrary.getTypeHandler(TypeSerializationLibrary.java:230)
    at org.terasology.persistence.typeHandling.TypeSerializationLibrary.getTypeHandler(TypeSerializationLibrary.java:214)
    at org.terasology.persistence.typeHandling.coreTypes.factories.ObjectFieldMapTypeHandlerFactory.lambda$create$0(ObjectFieldMapTypeHandlerFactory.java:59)
    at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)

...

02:30:11.448 [main] INFO  o.terasology.engine.TerasologyEngine - Shutting down Terasology...