journeymap icon indicating copy to clipboard operation
journeymap copied to clipboard

[1.19.2] Fabric - StackOverflowError when using IntelliJ IDEA for plugin creation

Open TalonFloof opened this issue 2 years ago • 10 comments

JourneyMap Version:

1.19.1-5.9.0beta2-fabric

Fabric Version:

0.14.9

Describe the problem in repeatable steps:

  1. Run "Minecraft Client" using IntelliJ IDEA
  2. Mod crashes due to java.lang.StackOverflowError

Relevant errors from .minecraft/journeymap/journeymap.log:

[18:45:39] [Render thread/ERROR] [ThemeLoader] Error preloading theme textures: java.lang.StackOverflowError
	at journeymap.client.texture.DynamicTextureImpl.getImage(DynamicTextureImpl.java:146)
	at journeymap.client.texture.DynamicTextureImpl.getImage(DynamicTextureImpl.java:146)
	at journeymap.client.texture.DynamicTextureImpl.getImage(DynamicTextureImpl.java:146)
	at journeymap.client.texture.DynamicTextureImpl.getImage(DynamicTextureImpl.java:146)
... There's about 3000 more times this function is mentioned in the stack backtrace.

TalonFloof avatar Oct 21 '22 23:10 TalonFloof

Wait, I figured out the problem. Please disregard this issue.

TalonFloof avatar Oct 22 '22 00:10 TalonFloof

What was the issue?

mysticdrew avatar Oct 22 '22 00:10 mysticdrew

@mysticdrew It was happening while using IntelliJ IDEA to create a plugin for this mod. It works just fine with normal Minecraft without using any kind of development environment. Because of this, I decided to close it since it was relating to an issue within the development environment and not an issue that occurred during normal gameplay.

TalonFloof avatar Oct 22 '22 00:10 TalonFloof

Actually this might be a viable issue.

TalonFloof avatar Oct 22 '22 01:10 TalonFloof

Share your build.gradle

mysticdrew avatar Oct 22 '22 01:10 mysticdrew

Here you go: build.gradle

TalonFloof avatar Oct 22 '22 01:10 TalonFloof

Do you have a repo for your mod that you're working on?

mysticdrew avatar Oct 22 '22 12:10 mysticdrew

Yes, it can be found at: https://github.com/Talon396/EnhancedWeather

TalonFloof avatar Oct 22 '22 12:10 TalonFloof

Oh ok, so this is already fixed in my internal builds, come to our discord and I can give you a build. I fixed this last week, but I have not released it yet.

The issue stems from the fact that I dev using mojangmaps and you're using yarn. MojangMaps getPixels() == Yarn getImage(). I use a getImage method in my class that calls super.getPixels().

My getImage method. (from decompiled sources)

MojangMaps

    public NativeImage getImage() {
        return super.getPixels();
    }

Yarn

    public NativeImage getImage() {
        return this.getImage();
    }

mysticdrew avatar Oct 22 '22 13:10 mysticdrew

Ah that makes sense. I went ahead and joined the discord server. Thanks for pointing that out.

TalonFloof avatar Oct 22 '22 13:10 TalonFloof

fixed in beta3, available once approved on CF

mysticdrew avatar Nov 19 '22 17:11 mysticdrew