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

[1.20.1 Forge] Curios menu does not appear #347

Closed
MrKashew opened this issue Nov 12, 2023 · 10 comments
Closed

[1.20.1 Forge] Curios menu does not appear #347

MrKashew opened this issue Nov 12, 2023 · 10 comments
Assignees
Labels
type: bug Something isn't working

Comments

@MrKashew
Copy link

MrKashew commented Nov 12, 2023

Versions (Be specific, do not write "latest"):

image

@MrKashew MrKashew added the type: bug Something isn't working label Nov 12, 2023
@TheIllusiveC4
Copy link
Owner

That is not the default Curios GUI. You would need to report this to the developer of the mod that adds the Curios GUI as a tab like that.

@TheIllusiveC4 TheIllusiveC4 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2023
@MrKashew
Copy link
Author

@TheIllusiveC4 The normal curios tab flow is not working either however - it appears and disappears. Being the click on the icon, keybind, etc

@TheIllusiveC4
Copy link
Owner

TheIllusiveC4 commented Nov 13, 2023

What do you mean by appear and disappear? Please share screenshots of your situation if possible.

Also, this may be a result of the mod that has added the Curios GUI as a tab in your original post so be sure to remove that mod first before testing in order to isolate a 3rd party mod conflict.

@Darkosto
Copy link

Darkosto commented Nov 26, 2023

Hey C4! I've been getting this exact same issue too and I initially thought it was the mod adding the tabs like in the original post. The tabs are added by the mod L2Library: https://www.curseforge.com/minecraft/mc-mods/l2library

L2Library is not the cause of the disappearance though. I was able to get this to happen on my client without L2Library installed. I'm not quite sure if I can recreate it with only Curios at the moment. But, I do have a log entry that happens when attempting to click on the Curios button in the inventory GUI:

[25Nov2023 17:03:00.029] [Render thread/ERROR] [net.minecraft.util.thread.BlockableEventLoop/FATAL]: Error executing task on Client
java.lang.IndexOutOfBoundsException: Index 46 out of bounds for length 46
   at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
   at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
   at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?]
   at java.util.Objects.checkIndex(Objects.java:359) ~[?:?]
   at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
   at net.minecraft.core.NonNullList.get(NonNullList.java:47) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.world.inventory.AbstractContainerMenu.m_38853_(AbstractContainerMenu.java:287) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.world.inventory.AbstractContainerMenu.m_182410_(AbstractContainerMenu.java:582) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.client.multiplayer.ClientPacketListener.m_6837_(ClientPacketListener.java:1163) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.network.protocol.game.ClientboundContainerSetContentPacket.m_5797_(ClientboundContainerSetContentPacket.java:44) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.network.protocol.game.ClientboundContainerSetContentPacket.m_5797_(ClientboundContainerSetContentPacket.java:11) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.network.protocol.PacketUtils.m_263899_(PacketUtils.java:22) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:156) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:130) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:115) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1106) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718) ~[client-1.20.1-20230612.114412-srg.jar%23660!/:?]
   at net.minecraft.client.main.Main.main(Main.java:218) ~[1.20.1.jar:?]
   at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
   at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
   at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
   at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
   at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:126) ~[loader-47.1.47.jar:47.1]
   at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:114) ~[loader-47.1.47.jar:47.1]
   at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.runService(CommonClientLaunchHandler.java:24) ~[loader-47.1.47.jar:47.1]
   at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.lambda$launchService$4(CommonLaunchHandler.java:108) ~[loader-47.1.47.jar:47.1]
   at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?]
   at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?]
   at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?]
   at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?]
   at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?]
   at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?]
   at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?]
   at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?]
   at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
   at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
   at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
   at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
   at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:58) ~[?:?]

Another strange issue is that when this disconnect/disappearance happens the Trash Slot mod shows an error in-game that the server does not have Trash Slot enabled despite it being on my client and in the mod list. Another error that happens in the log is when a Sophisticated Backpack is slotted in a Curios slot:

[25Nov2023 17:03:29.811] [Render thread/ERROR] [sophisticatedbackpacks/]: Error getting backpack wrapper - Unable to find backpack at slot index 0 in "curios" inventory handler

Let me know how I can help further,
Darkosto

MC: 1.20.1
NeoForge: 47.1.79
Curios: 5.4.2

@TheIllusiveC4 TheIllusiveC4 reopened this Nov 26, 2023
@TheIllusiveC4
Copy link
Owner

Hm, interesting. I'm not quite sure what the cause could be, it could theoretically be anything that touches the player inventory screen. The fact that Trash Slot is also showing errors despite being seemingly unrelated makes me wonder if it's some kind of network error from something else that is cascading to Curios for some reason.

Are you able to reproduce this reliably? If so, reproduction steps and a mod list could help me narrow this issue down further.

Also, is this in single player or on a server?

@Darkosto
Copy link

Heya @TheIllusiveC4 ,

I'm working on getting more information for you right now on stream. I'm thinking this issue may be related to Trash Slot. I am working on an instance with Just Trash Slot and Curios to see what happens. This issue occurs in Single Player, I have not tested on a server yet.

On my modpack instance, it was reliably happening close to 100% of the time. Since removing Trash Slot, it has seemingly stopped. This issue may be related: TwelveIterationMods/TrashSlot#104

I'll get back to you with more information as I find it

@BlayTheNinth
Copy link

BlayTheNinth commented Nov 27, 2023

This seems to be some loading / packet handling race condition.

Some factors that may be relevant:

  • It probably won't happen on dev because it seems to depend on slower world loading times
  • It seems to only happen if the inventory is opened right on world join? (not 100% confirmed)
  • Changing dimension fixes the issue, making Curios usable again
  • (The TrashSlot error mentioned above stemmed from the fact that the Inventory Screen was opened before PlayerLoggedInEvent was fired, it seems to be otherwise unrelated)

Healthy Path (only Curios in dev):

  • "Loaded 13 curio slots"
  • "Loaded 2 curio entities"
  • SERVER: Capability is attached to ServerPlayer
  • SERVER: onDatapackSync to player
  • CLIENT: SyncDataPacket is received with minecraft:player and minecraft:armor_stand
  • SERVER: EntityJoinWorldEvent for player is fired, SPacketSyncCurios sent
  • CLIENT: Capability is attached to LocalPlayer
  • SERVER: PlayerLoggedInEvent is fired
  • CLIENT: SPacketSyncCurios handled, getCuriosInventory is present
  • CLIENT: SPacketSetIcons handled

Unhealthy Path (when reproduced in modpack):

  • "Loaded 19 curio slots"
  • "Loaded 1 curio entities"
  • SERVER: Capability is attached to ServerPlayer
  • SERVER: onDatapackSync to player
  • CLIENT: SyncDataPacket is received with minecraft:player
  • CLIENT: Capability is attached to LocalPlayer
  • SERVER: EntityJoinWorldEvent for player is fired, SPacketSyncCurios sent
  • CLIENT: SPacketSyncCurios handled, getCuriosInventory claims NOT present
  • SERVER: onDatapackSync to all players (likely a reload triggered by other mods in the pack)
  • CLIENT: SPacketSyncCurios handled, getCuriosInventory claims NOT present
  • SERVER: PlayerLoggedInEvent is fired
  • CLIENT: SPacketSetIcons handled

@TheIllusiveC4
Copy link
Owner

Thanks for all the info. I do agree that it seems likely to be some kind of packet handling race condition, it would make the most sense all things considered.

Since I'm unable to reproduce this in-dev, @Darkosto would you mind testing this jar in your modpack instance(s)?

curios-forge-5.4.4-packetfix+1.20.1.zip

I've reworked some of the networking that I think is causing the issue, but I don't have a way of testing this reliably on my end.

@Darkosto
Copy link

Hey @TheIllusiveC4

Just loaded this testing jar up and it seems like the issue is fixed. I clipped testing it out in case you want to see what's going on visually: https://clips.twitch.tv/InexpensiveBovineFinchKAPOW-i7nShsjsa6PjpSml

Would you like me to send over any logs or other information to finalize the fix?

Thanks again!

@TheIllusiveC4
Copy link
Owner

That's alright, I have everything I need. Thank you very much for testing it, I'll be releasing the update with this fix very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants