QuiltMC / quilt-loader

The loader for Quilt mods.
Apache License 2.0
472 stars 87 forks source link

Quilt Loader Crashes in Development Environment with Any Dependency Implemented on 1.20.x #370

Closed KrLite closed 1 year ago

KrLite commented 1 year ago

I believe it's a Quilt Loader bug after I made a test like below:

  1. Use the quilt-template-mod branch 1.20.1 to create a new mod.
  2. Do nothing but implement another mod in build.gradle using modImplementation("link.to.maven:mod:version") with its maven repository defined as usual.
  3. Refresh gradle and run gradle task runClient.
  4. Quilt Loader crashes.

After the crash, here is what the GUI shows:

image

And here's the log (but very unuseful): https://mclo.gs/PmgiwPc

I've tried various of Quilt Loader versions from 0.20.0 to 0.21.0, including the betas, but they all end up crashing. I haven't tried them on 1.19.x but on 1.18.x they are all fine.

What makes it more toxic is that Quilt Loader of any version works perfectly in production environment such as Prism Launcher, but just crashes in development environment.

KrLite commented 1 year ago

I suppose I have to declare that I'm implementing a fabric mod. Is that what causing the crash?

AlexIIL commented 1 year ago

Can you upload your log file too? I'm also wondering if it produces two crash reports per launch, since the one you've uploaded seems to be a different issue.

KrLite commented 1 year ago

Can you upload your log file too? I'm also wondering if it produces two crash reports per launch, since the one you've uploaded seems to be a different issue.

Sure, but as I have deleted the original ones, here are the newly generated logs, containing both the crash_reports and logs directories. logs.zip

For more details, I implemented a mod through:

repositories {
    maven { url = "https://jitpack.io" }
}

// ...

dependencies {
    // ...

    modImplementation("com.github.KrLite.Equator-v2:build:2.6.0-mc1.20")
}

Any other part of the project is the same as the quilt-template-mod branch 1.20.1.

AlexIIL commented 1 year ago

Thanks - there are indeed two crash reports, and I'll have to look into fixing the gui timout one since it's a separate issue.

The issue you're experiencing is due to both fabric-loader and quilt-loader being on the classpath - which results in a crash with a misleading error message - we'll also have to add a better one for that specific case. This might be caused by a regression in quilt loom? (https://github.com/QuiltMC/quilt-loom/issues/40) The way to fix that is to ensure none of your dependencies transitively depend on fabric-loader - try adding this to your build.gradle (source):

project.configurations.all {
  exclude(group: "net.fabricmc", module: "fabric-loader")
  exclude(group: "net.fabricmc.fabric-api")
}
KrLite commented 1 year ago

It truly works! I'm really thankful for you to solving this frustrating issue. Now it also answers why only 1.20.x meets the problem - only this branch of quilt-template-mod uses quilt-loom 1.3.+. Also, I suppose that the project configurations should be added into the template build.gradle before this bug is being fixed.

KrLite commented 1 year ago

I believe this issue is fine to be closed right now.