FTBTeam / FTB-Mods-Issues

Any mod issues, be it FTB Teams, Quests or any other of our mods can be reported here!
22 stars 1 forks source link

[Bug]: Immediate crash when editing quest #770

Closed twothe closed 1 year ago

twothe commented 1 year ago

Mod

FTB Quests

Mod version

ftb-quests-forge-1902.4.12-build.216.jar

Forge / Fabric version

1.19.2 43.2.8

Modpack & version

No response

What issue are you having?

When editing the text of an already existing quest after upgrading to the latest FTB Quest version the game immediately crashes.

Crashlogs

Description: mouseClicked event handler

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
    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) ~[?:?] {re:mixin}
    at java.util.ArrayList.get(ArrayList.java:427) ~[?:?] {re:mixin}
    at dev.ftb.mods.ftbquests.gui.quests.ViewQuestPanel.appendToPage(ViewQuestPanel.java:728) ~[ftb-quests-forge-1902.4.12-build.216.jar%23341!/:1902.4.12-build.216] {re:classloading}
    at dev.ftb.mods.ftbquests.gui.quests.ViewQuestPanel.lambda$editDescLine0$17(ViewQuestPanel.java:687) ~[ftb-quests-forge-1902.4.12-build.216.jar%23341!/:1902.4.12-build.216] {re:classloading}
    at dev.ftb.mods.ftblibrary.config.ui.EditConfigFromStringScreen.doAccept(EditConfigFromStringScreen.java:127) ~[ftb-library-forge-1902.3.18-build.208.jar%23340!/:1902.3.18-build.208] {re:classloading}
    at dev.ftb.mods.ftblibrary.config.ui.EditConfigFromStringScreen$2.onClicked(EditConfigFromStringScreen.java:61) ~[ftb-library-forge-1902.3.18-build.208.jar%23340!/:1902.3.18-build.208] {re:classloading}
    at dev.ftb.mods.ftblibrary.ui.Button.mousePressed(Button.java:61) ~[ftb-library-forge-1902.3.18-build.208.jar%23340!/:1902.3.18-build.208] {re:classloading}
    at dev.ftb.mods.ftblibrary.ui.Panel.mousePressed(Panel.java:275) ~[ftb-library-forge-1902.3.18-build.208.jar%23340!/:1902.3.18-build.208] {re:classloading}
    at dev.ftb.mods.ftblibrary.ui.BaseScreen.mousePressed(BaseScreen.java:313) ~[ftb-library-forge-1902.3.18-build.208.jar%23340!/:1902.3.18-build.208] {re:classloading}
    at dev.ftb.mods.ftblibrary.ui.ScreenWrapper.m_6375_(ScreenWrapper.java:47) ~[ftb-library-forge-1902.3.18-build.208.jar%23340!/:1902.3.18-build.208] {re:classloading}
    at net.minecraft.client.MouseHandler.m_168084_(MouseHandler.java:88) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MouseHandlerAccessor,pl:mixin:APP:supplementaries-common.mixins.json:MouseHandlerMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.gui.screens.Screen.m_96579_(Screen.java:522) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:configured:set_background_texture_2,pl:runtimedistcleaner:A,re:computing_frames,pl:accesstransformer:B,xf:fml:configured:set_background_texture_2,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:configured:set_background_texture_2,pl:mixin:APP:kubejs-common.mixins.json:ScreenMixin,pl:mixin:APP:controlling.mixins.json:AccessScreen,pl:mixin:APP:balm.mixins.json:ScreenAccessor,pl:mixin:APP:iceberg.mixins.json:ScreenMixin,pl:mixin:APP:legendarytooltips.mixins.json:ScreenMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.MouseHandler.m_91530_(MouseHandler.java:85) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MouseHandlerAccessor,pl:mixin:APP:supplementaries-common.mixins.json:MouseHandlerMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.MouseHandler.m_168091_(MouseHandler.java:185) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MouseHandlerAccessor,pl:mixin:APP:supplementaries-common.mixins.json:MouseHandlerMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:103) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
    at net.minecraft.client.MouseHandler.m_91565_(MouseHandler.java:184) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MouseHandlerAccessor,pl:mixin:APP:supplementaries-common.mixins.json:MouseHandlerMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43) ~[lwjgl-glfw-3.3.1.jar%23138!/:build 7] {}
    at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.3.1.jar%23130!/:build 7] {}
    at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3403) ~[lwjgl-glfw-3.3.1.jar%23138!/:build 7] {}
    at com.mojang.blaze3d.systems.RenderSystem.m_69495_(RenderSystem.java:204) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:flywheel.mixins.json:RenderTexturesMixin,pl:mixin:A}
    at com.mojang.blaze3d.platform.Window.m_85435_(Window.java:337) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:kubejs-common.mixins.json:WindowMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1143) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:rubidium.mixins.json:core.MixinMinecraftClient,pl:mixin:APP:neat.mixins.json:MinecraftMixin,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:blueprint.mixins.json:client.MinecraftMixin,pl:mixin:APP:bettercombat.mixins.json:client.MinecraftClientAccessor,pl:mixin:APP:bettercombat.mixins.json:client.MinecraftClientInject,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:iceberg.mixins.json:MinecraftMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:700) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:rubidium.mixins.json:core.MixinMinecraftClient,pl:mixin:APP:neat.mixins.json:MinecraftMixin,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:blueprint.mixins.json:client.MinecraftMixin,pl:mixin:APP:bettercombat.mixins.json:client.MinecraftClientAccessor,pl:mixin:APP:bettercombat.mixins.json:client.MinecraftClientInject,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:iceberg.mixins.json:MinecraftMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23419!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:A,pl:runtimedistcleaner:A}
    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.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.2.8.jar%2395!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2382!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2382!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2382!/:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2382!/:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2382!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2382!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2382!/:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {}

Steps to reproduce

  1. Open any quest
  2. Edit description
  3. Save description

Anything else to note?

No response

katubug commented 1 year ago

Same issue here.

ACrazyD commented 1 year ago

Can agree - Tho mine happened when looking into the new "Page Break Function" - As soon as I clicked on It my game stalled and crashed out with an error quite the same as above

desht commented 1 year ago

I need precise instructions on reproducing the problem from one or more of you, since whatever I've tried, I can't get it to crash.

Update: OK, found the problem. Add -> Text will crash on an empty quest description.

You can get round the problem for now by using Edit -> Description (or just pressing D). I'll get a fix out shortly.

ACrazyD commented 1 year ago

Here, was waiting for my game to reboot to give some more info -

This issue affects quests made before the new description system (Btw Very Nice new system, Much wow)

Any quests made before this change seems to have something wrong with their information and is unable to be edited (Sometimes) - I admit, I'm unsure if the issue exists before a new quest is made under the new system forcing all the quests to migrate, or if the crash caused my game to correct the issue as I'm no longer crashing.

Update: saw the update as I was typing out, that I also just noticed so nice timing - Wee Minor bugs!

desht commented 1 year ago

There should be no need to migrate anything - the new version mainly adds the multiline editor plus the page break functionality, which is fully backwards compatible. This has been tested successfully on existing quest data (e.g. the FTB Skies quest book). Any more info you have on what isn't working would be useful to know.

ACrazyD commented 1 year ago

Ahh k, Ill admit I'm unsure if the lack of descriptions is an issue on my side due to files getting lost/misplaced (Or if I just had way less with desc. then I thought.)

Adding an Image via the Add Button does appear to crash it as well tho on an empty quest.

desht commented 1 year ago

Yep the fix I just made will fix adding images too.

ACrazyD commented 1 year ago

Coolio, Assuming now its just a waiting game for merge, then CF approval?

desht commented 1 year ago

Yep, will need the PR approved & merged.

ACrazyD commented 1 year ago

Sounds good, Ill wait about tell thats up then and report back if I notice anything else out of the "Why am I stupid" branch of strange or broken :)

desht commented 1 year ago

It's likely to be a good few hours away, everyone who can approve is asleep right now :) But the problem is easy to work around in the short term, use the multiline editor (it's much nicer to work with in any case).

ACrazyD commented 1 year ago

Sounds good, Im quite Impressed with this editor, I have been wanting a lot of its features for ages now - good to see some headway on that.

ACrazyD commented 1 year ago

There is a bit of a strange scale issue - Not scaling, button placement (Had someone talking to me and I guess I typed out my brains thoughts a bit) image if its something worth looking into is beyond me, as it only effects a user in editing mode

desht commented 1 year ago

Yeah, that could happen with lower screen resolutions. I'll take a look at that for the next major release.

desht commented 1 year ago

Fixed in 1902.4.13 release. I also merged the Edit & Add button dropdowns into a single Edit dropdown. Two buttons were a bit redundant, and took up too much screen space, as you noticed.

twothe commented 1 year ago

tyvm