Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BasicCrafting module causes crash during load after start game #5169

Closed
LoudMouthJester opened this issue Nov 8, 2023 · 5 comments
Closed
Labels
Category: Crash Requests, Issues and Changes targeting unexpected terminations, segfaults, etc. Status: Needs Author Input Requires more information by the author on the reported issue or provided changes Status: Stale Wasn't reviewed or continued for a while Topic: Stabilization Requests, Issues and Changes related to improving stablity and reducing flakyness Type: Bug Issues reporting and PRs fixing problems

Comments

@LoudMouthJester
Copy link

link to pastebin

https://pastebin.com/zwKimUJd

any help much appreciated. game looks cool. can't wait to play

@LoudMouthJester LoudMouthJester changed the title Crash during load adter start game Crash during load after start game Nov 8, 2023
@BenjaminAmos
Copy link
Contributor

This appears to be the main issue:

15:00:34.855 [main] ERROR o.t.engine.core.modes.StateLoading - Error while loading org.terasology.engine.core.modes.loadProcesses.LoadPrefabs@7d7097af
java.lang.IllegalArgumentException: Can not set java.util.SortedMap field org.terasology.crafting.listCrafting.components.ListRecipesComponent.recipes to java.util.LinkedHashMap
    at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
    at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
    at java.base/jdk.internal.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81)
    at java.base/java.lang.reflect.Field.set(Field.java:780)
    at org.terasology.reflection.reflect.ReflectionReflectFactory$ReflectionFieldAccessor.setValue(ReflectionReflectFactory.java:127)
    at org.terasology.reflection.metadata.FieldMetadata.setValue(FieldMetadata.java:173)
    at org.terasology.persistence.typeHandling.Serializer.deserializeOnto(Serializer.java:84)
    at org.terasology.persistence.typeHandling.Serializer.deserializeOnto(Serializer.java:140)
    at org.terasology.engine.persistence.serializers.ComponentSerializer.deserializeOnto(ComponentSerializer.java:185)
    at org.terasology.engine.persistence.serializers.ComponentSerializer.deserialize(ComponentSerializer.java:101)
    at org.terasology.engine.persistence.serializers.PrefabSerializer.applyComponentChanges(PrefabSerializer.java:152)
    at org.terasology.engine.persistence.serializers.PrefabSerializer.deserialize(PrefabSerializer.java:124)
    at org.terasology.engine.persistence.serializers.PrefabSerializer.deserialize(PrefabSerializer.java:104)
    at org.terasology.engine.entitySystem.prefab.internal.PrefabFormat.load(PrefabFormat.java:45)
    at org.terasology.engine.entitySystem.prefab.internal.PrefabFormat.load(PrefabFormat.java:23)
    at org.terasology.gestalt.assets.format.producer.UnloadedAssetData$AssetSourceResolver.load(UnloadedAssetData.java:311)
    at org.terasology.gestalt.assets.format.producer.UnloadedAssetData.load(UnloadedAssetData.java:181)
    at org.terasology.gestalt.assets.format.producer.AssetFileDataProducer.getAssetData(AssetFileDataProducer.java:227)
    at org.terasology.gestalt.assets.AssetType.lambda$reload$2(AssetType.java:360)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at org.terasology.gestalt.assets.AssetType.reload(AssetType.java:358)
    at org.terasology.gestalt.assets.AssetType.getNormalAsset(AssetType.java:387)
    at org.terasology.gestalt.assets.AssetType.getAsset(AssetType.java:265)
    at org.terasology.gestalt.assets.management.AssetManager.getAsset(AssetManager.java:225)
    at org.terasology.engine.core.modes.loadProcesses.LoadPrefabs.step(LoadPrefabs.java:30)
    at org.terasology.engine.core.modes.StateLoading.update(StateLoading.java:259)

The ListRecipesComponent component in the BasicCrafting module is failing to deserialise.

https://github.com/Terasology/BasicCrafting/blob/88ff60ec129287c356abca505d7250989cc977b4/src/main/java/org/terasology/crafting/listCrafting/components/ListRecipesComponent.java#L22

public class ListRecipesComponent implements Component<ListRecipesComponent>, RecipeComponent {
    public List<String> categories = Collections.singletonList("InHand");
    public SortedMap<String, ListRecipeContainer> recipes = new TreeMap<>();

I'll need to double-check if SortedMap is supported.

@BenjaminAmos
Copy link
Contributor

BenjaminAmos commented Nov 8, 2023

Did you manually enable the BasicCrafting module yourself? It still needs to be fixed but it shouldn't be enabled by-default. If you disable it then the game should load.

@LoudMouthJester
Copy link
Author

yes i did. will give it a shot. ty

@jdrueckert jdrueckert added Type: Bug Issues reporting and PRs fixing problems Topic: Stabilization Requests, Issues and Changes related to improving stablity and reducing flakyness Status: Needs Author Input Requires more information by the author on the reported issue or provided changes Category: Crash Requests, Issues and Changes targeting unexpected terminations, segfaults, etc. labels Nov 11, 2023
@jdrueckert jdrueckert moved this to ❓ Needs Author Input in Terasology Inbox Nov 11, 2023
@soloturn soloturn changed the title Crash during load after start game BasicCrafting module causes crash during load after start game Nov 26, 2023
Copy link

Hey there @ , we want to express our appreciation for your initial contribution to this issue. However, we now mark it as stale since we haven't received any response from you in the past 30 days. If you're still available, we would greatly appreciate it if you could provide answers to any open questions and/or share the requested feedback/input. Thank you for your consideration, we hope to hear from you soon!

@github-actions github-actions bot added the Status: Stale Wasn't reviewed or continued for a while label Dec 30, 2023
Copy link

Hey there @ , we want to express our appreciation for your initial contribution to this issue. However, we now mark it as closed since we haven't received any response from you in the past 90 days. If you're still available, we would greatly appreciate it if you could provide answers to any open questions and/or share the requested feedback/input. Thank you for your consideration, we hope to hear from you soon!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Crash Requests, Issues and Changes targeting unexpected terminations, segfaults, etc. Status: Needs Author Input Requires more information by the author on the reported issue or provided changes Status: Stale Wasn't reviewed or continued for a while Topic: Stabilization Requests, Issues and Changes related to improving stablity and reducing flakyness Type: Bug Issues reporting and PRs fixing problems
Projects
Status: Done
Status: Needs Author Input
Development

No branches or pull requests

3 participants