Relics

Relics

10M Downloads

[Crash] [Compatibility] Crash with equipped relic when shaders are enabled with Oculus

muon-rw opened this issue ยท 10 comments

commented

Crash report here:
https://mclo.gs/3XY9Yfo

Client crash occurs when a relic is equipped and shaders are enabled

Versions:
relics-1.20.1-0.5.3
oculus-mc1.20.1-1.6.15

I have not tested if this occurs in an isolated environment with only Relics+Oculus.

Apoli and Curios are also mentioned, so just in case:
apoli-forge-1.20.1-2.9.0.4
curios-forge-5.7.0+1.20.1

commented

it does complain about minecraft:air which is the default return for item if an entry is not found within the registry (same as minecraft:pig for entity type)

Registry:

   @Deprecated public static final DefaultedRegistry<Item> ITEM = forge(ITEM_REGISTRY, "air", (registry) -> {
      return Items.AIR;
   });

ForgeRegistry:

    @Override
    public ResourceLocation getKey(V value)
    {
        return getResourceKey(value).map(ResourceKey::location).orElse(this.defaultKey);
    }
commented

i actually have this same problem. the screen goes white or black and crashes but not to desktop. it complains about air and curios relics, hopefully this log helps. it does not crash instantly and takes a few minutes sometimes or even an hour. or sometimes right away. as for the relic that was equipped it was the hunters belt from your mod and the fireward ring from mana and artifice thats it.
latest.log

commented

Same exact thing happened to me, it seems to happen after about 30 mins of playing and then your Minecraft just turns completely black and you're forced to alt+f4

commented

it does complain about minecraft:air which is the default return for item if an entry is not found within the registry (same as minecraft:pig for entity type)

Registry:

   @Deprecated public static final DefaultedRegistry<Item> ITEM = forge(ITEM_REGISTRY, "air", (registry) -> {
      return Items.AIR;
   });

ForgeRegistry:

    @Override
    public ResourceLocation getKey(V value)
    {
        return getResourceKey(value).map(ResourceKey::location).orElse(this.defaultKey);
    }

To expand on this
The default return types for the forge registries can be found in the GameData class, where those registries are created
It mostly matches vanilla (e.g. ITEM gives you minecraft:air)

The reason why getKey is tagged as @Nullable is because not every register is a DefaultedRegistry (or in forge has a default return value)

this means

https://github.com/SSKirillSS/relics/blob/d192f8aa5df9df061abde47810598fd6aab4598a/src/main/java/it/hurts/sskirillss/relics/client/models/items/CurioModel.java#L34

can theoretically never be the case (and should check / skip rendering if its minecraft:air)

commented

skip rendering if its minecraft:air

I'm not quite sure why that's even possible. Registration is exclusively for IRenderableCurio instances, which by definition cannot be minecraft:air.

commented

yeah thats pretty weird
would definitely add some logging (get item class etc.) in case it's air

(also note that if the registry returns air it doesnt mean that the item you're checking is air - it just means that said item is not registered / in the registry - though how do you get an item of sth. thats not in the registry? so maybe not the issue)

could also be some weird mcreator mod interaction, since they tend to add minecraft:air into every curios slot?
not sure how that would pass the check either though

commented

Should be fixed in 0.6.1.6. Lemme know if it works for you.

commented

Greetings.
With the latest build of relics, oculus, curios and octolib installed, I launched the game, equipped a random relic I've found in the creative tab and couldn't replicate your crash. I also tried downgrading to the oculus 1.6.15, but it didn't cause the crash either.
Please, try updating the version and reply back with the results.
Screenshot_3

commented

Unfortunately I don't know what relic caused this, it was reported me to from a player. I can't reproduce it with the few relics I tried on the latest versions either, so feel free to close.

commented

I've been experiencing the same issue while all the mods are updated
It seems to struggle with the Rage Glove primarily