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

Client startup crash with liteloader #1189

Closed
Dalethium opened this issue Apr 15, 2018 · 45 comments
Closed

Client startup crash with liteloader #1189

Dalethium opened this issue Apr 15, 2018 · 45 comments
Labels

Comments

@Dalethium
Copy link

Dalethium commented Apr 15, 2018

Crash log

Hey so, this version of jei (the latest beta released 12 hours ago) works just fine on the server I run, but starting up the client leads to a crash just before getting to the main menu. I am sure it's probably not a issue with just jei alone as nobody else has reported anything yet, however I figure it's worth reporting in case it's a easy fix without a bug hunt.

Thanks! Have a great day!~

@mezz
Copy link
Owner

mezz commented Apr 15, 2018

Thanks for the report!
Can you try without liteloader installed? I'm curious to see if the error only happens when liteloader is there.

@Dalethium
Copy link
Author

Yeah sure! Just one moment!

@Dalethium
Copy link
Author

Sorry about the wait, I had some hard drive troubles!

You were right! Disabling lite loader allowed me to launch with no issue!

Is there anything else you need?

@Dalethium
Copy link
Author

I noticed this is still marked as "needs followup." Do you need anything else?

@mezz
Copy link
Owner

mezz commented Apr 24, 2018

I tried to get in touch with the author of liteloader but wasn't able to.
I can try to work around this but I'm not really familiar with liteloader. Can you explain your setup a little bit so I can try to reproduce the issue?

@Dalethium
Copy link
Author

Sure! I am using multi mc, the latest forge, along with the mods listed here: https://pastebin.com/kfTyFGxf

I uninstalled liteloaded for the duration, I was only using it for tabbychat. It launches just fine without it.

The build 4.8.5.159 of jei works perfectly fine with liteloader, however later builds (4.9+ for sure) do not - including the current stable build.

Let me know if you need anything else! Thanks.

@mezz
Copy link
Owner

mezz commented Apr 25, 2018

Thanks, I tried to replicate this but surprisingly didn't crash.
I need some more information to solve this issue, can you please paste your full fml-client-latest.log or latest.log to https://gist.github.com and link it here?

@Dalethium
Copy link
Author

Hey so it spams for nearly every recipe in the game or something so the log is nearly 100mb, I had to upload it zipped instead.

Onedrive

Let me know if there's anything else!

@mezz
Copy link
Owner

mezz commented Apr 28, 2018

Thanks for the log. I looked it over and what I see is really bizarre.
I'll try to find some more time to replicate the issue, I probably need to add more logs in some obscure places to see what's really breaking.

@mezz mezz changed the title Client startup crash Client startup crash with liteloader Apr 28, 2018
@ZeldaLinkAaron
Copy link

So I was having a similar problem with SevTech 3.0.6 and I tried downgrading to "1.12.2-4.8.5.159" which worked. But when I was playing with it and made a new environment with just Forge, JEI, and Liteloader, the newest version worked which made me thing it must have something to do with one of the other mods.

@mezz
Copy link
Owner

mezz commented May 26, 2018

Can you try to narrow down which mod is causing an issue?

@Dalethium
Copy link
Author

Hey! So I am not currently playing minecraft, but I figured I'd compile you a list of the mods we have in common right here

It's off the top of my head, and i certainly missed some libraries on the list, but I hope it helps :)

@johnfriedrich
Copy link

johnfriedrich commented May 28, 2018

Same? crash: https://pastebin.com/kui9QLaz
Started when updating our launcher from
jei_1.12.2-4.8.5.147.jar to jei_1.12.2-4.9.1.188.jar
(At least at this point many reports from users started to come in, that reported these crashes)

Our server disabled some recipes by overwriting them with empty dummy recipes. That miiiight be the cause.
Thats our empty dummy recipe that overwrites unwanted recipes:
http://prntscr.com/jnrrq5

I mean they crash before they are able to login to the server, but maybe JEI caches data from last session?

@MoJoCreatior
Copy link

MoJoCreatior commented Jun 10, 2018

a temporary solution to this issue is to downgrade JEI version to 4.8 or anything below 4.9

note: the JEI plugin for pams harvest craft needs to be disabled as it requires JEI 4.9+

something that changed between version 4.8 and 4.9 is conflicting with liteloader, currently it's unknown whether it's liteloader or JEI that's initially causing the issue.

I'll edit this comment with any new testing results, but it seems to be working fine for now. time will tell

@mezz
Copy link
Owner

mezz commented Jun 13, 2018

Between those versions of JEI I fixed an issue where JEI ignored all resource reloads before entering a world.
This was a problem when players changed their language in the main menu. JEI needs to respond to that and reload so that it is searching in the right language.

The issue here is related to the fact that LiteLoader forces an extra resource reload during startup.
However, I have tested with JEI and LiteLoader alone and didn't encounter any issues.

Somehow, some extra thing (a LiteLoader mod?) in combination with the extra resource reload from LiteLoader is really killing JEI and causing the issue we see here.

I need help narrowing down the combination of things that causes this issue so that I can test and fix it.
So far I have a very long list of suspected mods. In order to effectively debug this I will need to know the minimum setup to reproduce this issue. If anyone here can help with that, it would be appreciated.

@Routhinator
Copy link

@mezz I just hit this issue and found this. I only had one liteloader mod installed which was WorldEditCUI. I removed it after reading this and the game still failed to load. So it's not a liteloader mod.

@ghost
Copy link

ghost commented Jun 27, 2018

Had this problem on a completely different setup.... but removing FastWorkbench fixed the issue.

@Supermario1313
Copy link

Supermario1313 commented Jul 5, 2018

Here's my crash report.
I'm using Minecraft 1.12.2 with Forge 14.23.4.2727 and LiteLoader 1.12.2-SNAPSHOT. My launcher is MultiMC.
Thanks to this, @Dalethium's list of mods we have in common can be narrowed to these mods:

  • Applied Energistics 2
  • AutoRegLib
  • Baubles
  • BiblioCraft
  • CodeChickenLib
  • Ender Storage 1.8.+
  • ExtraPlanets
  • Forge MultiPart CBE
  • Galacticraft (Core + Planets)
  • HWYLA
  • Industrial Foregoing
  • Inventory Tweaks
  • Iron Chests
  • Just a Few Fish
  • Just Enough Items (JEI)
  • Mantle
  • MicdoodleCore
  • MJRLegendsLib
  • Quark
  • Shadowfacts' Forgelin
  • TeslaCoreLib
  • The Twilight Forest
  • Tinkers Construct

I wasn't able to reproduce the crash in a fresh installation of Mincraft 1.12.2 with only Forge 14.23.4.2727, LiteLoader 1.12.2-SNAPSHOT and the above mods. However, removing Redstone++ 1.2d or 1.3 BETA-2 (These two versions generate the same crash report) fixed the issue for me whereas downgrading JEI to 4.8 like @MoJoCreatior suggested didn't fix it.

I was able to reproduce the crash in a fresh installation of Mincraft 1.12.2 with only Forge 14.23.4.2727, LiteLoader 1.12.2-SNAPSHOT and Redstone++ 1.3 BETA-2, giving this crash report. I got the same result with Redstone++ 1.2d instead of Redstone++ 1.3 BETA-2.

Since @Dalethium had this problem without Redstone++ installed, this means that the crash wasn't caused by a specific mod, but by a behaviour used in multiple mods.

@mezz
Copy link
Owner

mezz commented Jul 9, 2018

I think there may be multiple issues happening in this thread.

For things involving FastWorkbench, Inspirations, DietHopper, and other mods that use Forge Registry replacement (there are a lot), I investigated the problem and submitted an issue to LiteLoader here:
http://develop.liteloader.com/liteloader/LiteLoader/issues/53

Once that's fixed, hopefully what's happening here should be more clear.

@Iomega0318
Copy link

Iomega0318 commented Jul 23, 2018

Just chiming in as I was having the same issue and wanted to do a little digging, I play on a Continuum Server and was wanting to install Tabby Chat, after getting the error I found this thread.

Mod Pack:
https://www.feed-the-beast.com/projects/ftb-continuum

I disabled FastWorkbench first as I was going to go down the list and see what was causing the issue, after disabling FastWorkbench I was able to load the pack just fine, DietHopper is also installed but did not need to be disabled.

Unfortunately in order to play the pack I need it enabled, so going to rollback JEI for now and see if that works.

UPDATE
Can also confirm rolling JEI (and JEHC) back seems to allow it to load, granted I had to roll back to v4.8.5.159.. I am logged in and using TabbyChat/Liteloader in the mod pack now.

@stale
Copy link

stale bot commented Aug 22, 2018

This has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

@stale stale bot added the stale label Aug 22, 2018
@stale
Copy link

stale bot commented Aug 29, 2018

This has been automatically closed because it has not had recent activity. Please feel free to update or reopen it.

@stale stale bot closed this as completed Aug 29, 2018
@ghost
Copy link

ghost commented Aug 29, 2018

bad bot

@ghost
Copy link

ghost commented Oct 6, 2018

nuke the bot from orbit

@mezz mezz added bug and removed needs followup labels Oct 7, 2018
@mezz
Copy link
Owner

mezz commented Oct 7, 2018

The bot is useful in general, this is a rare issue where it's just not getting fixed.
I think Mumfrey (author of LiteLoader) is just not active any more, the last commit there was 10 months ago.

@Brycey92
Copy link

Brycey92 commented Oct 8, 2018

Unfortunately, despite liteloader being open source, Mumfrey has licensed it as All Rights Reserved, and required written permission for anyone to distribute modified versions of the mod. A maintenance programmer would have to get in touch with Mumfrey before there can be any hope of having this issue fixed. That, or of course Mumfrey himself would have to return to developing, but that seems very unlikely.

@mezz mezz mentioned this issue Dec 8, 2018
@Vitali8
Copy link

Vitali8 commented Jan 4, 2019

I got this crash (with java.lang.IllegalArgumentException: Unknown ingredient class: class net.minecraft.item.ItemStack) after loading the client with the LiteLoader, Forge 2796+ and some modpack (~90 mods). But if I reduce the number of mods I start to get crash with java.lang.IllegalArgumentException: recipeCategories must not be empty. And of course if I remove the LiteLoader, then no crashes happens.

@ConnorTron110
Copy link

For me I managed to fix the issue by removing fast workbench (i dont think its liteloader due to me still having voxel maps installed, but if its a certain liteloader mod then ok....).

@mezz
Copy link
Owner

mezz commented Jan 14, 2019

I believe the issue is related to LiteLoader breaking when Forge mods replace vanilla items (for example FastWorkbench replaces the vanilla crafting table).

I reported the issue to LiteLoader with a minimal test mod that shows the issue: http://develop.liteloader.com/liteloader/LiteLoader/issues/53
Unfortunately it has been open for 6 months, and I do not think LiteLoader is being actively maintained any more.

@ghost
Copy link

ghost commented Jan 14, 2019

I'd drop Liteloader... but worldeditcui and tabbychat :(

@Brycey92
Copy link

@steamp0rt I don't have a solution for tabbychat, but I present to you WorldEditCUI Forge Edition 2

@ghost
Copy link

ghost commented Jan 14, 2019

@Brycey92 does it work with the GriefProtection plugin? I noticed the LiteLoader version shows GP plot boundaries.

@Brycey92
Copy link

@steamp0rt I've never noticed either version showing GP plots, though I haven't used the Forge WE-CUI with GP yet. I always just rely on the glowstone and gold borders done by GP itself. If you could test the cross-functionality, though, I'd be interested in knowing the answer!

@ghost
Copy link

ghost commented Jan 14, 2019

I'm using the LL version and it shows the plots if I right click with a stick

@mezz
Copy link
Owner

mezz commented Jan 14, 2019

Please keep discussion here focused on the bug.
If you would like somewhere to meet up and discuss, feel free to join the general channel on my discord here: https://discord.gg/DDrCEQH

@Graywaren
Copy link

Has there been any progress on this bug? I too am having this issue and am solely trying to get LL to work with my pack for Voxel Map. I disabled fast work bench and got it to load at least, but I'd really like to be able to use FWB. I'm also concerned that as I get further in the modpack I'm developing something else that replaces a vanilla item (if that's what's causing the problem?) will end up crashing it in future.

@mezz
Copy link
Owner

mezz commented Feb 4, 2019

Please see this comment, unfortunately there haven’t been any updates since then: #1189 (comment)

@mezz mezz pinned this issue May 12, 2019
@TwinQuicksilver
Copy link

TwinQuicksilver commented May 27, 2019

I have been crashing on start up all evening and have been eliminating mods one by one. The only thing that MC's crash reports is finding an issue with is JEI. I never heard of LiteLoader before reading this thread so I was surprised to learn World Edit was being maintained by Mumfrey. So I began deleting my mods until my list went from 71 to 62 and I started with the mods everyone on this thread began to remove first. The full list of mods I removed were:

  • Actually Additions
  • Astral Sorcery
  • Biomes You'll Go
  • Buildcraft
  • ChanceCubes
  • CookingForBlockheads
  • Decocraft
  • OpenBlocks
  • ThaumicTinkerer
  • TwilightForest
  • WorldEditCUI

The crash occurred every time I loaded up making it so I never got to the actually menu for the game. I haven't checked through all of the mod lists that have been shared, but if any of your mods have been managed my Mumfrey and are LiteLoader affiliated I'd assume get rid of them. It was an instant fix on my end and the game runs fine, but I haven't tested to see if readding any of those mods will crash me. (Yet) I figured because my list of removed mods was small it may help isolate the issue. I will share what my original list of mods was soon anyways, just getting called to dinner currently and I don't know how long that will take or if anyone will need me for anything afterwards.

Hopefully this helped in some way. Cheers!

@asiekierka
Copy link

asiekierka commented Jun 3, 2019

@tommyTT, this one's for you.

Diagnosis

As an early user of registry substitution who ran into many bugs with the feature, I knew it relies on the ObjectHolder mechanism. ObjectHolders are a hacky system fo͜r͠ su̡bs͜t͝i͝túti͟ņg҉ ̛s͠tati͡c ̢f̶iel͠d r̀e͡ference҉s w̦̼h̯̀il̢̗͓è̱̮̫̯̭ ̣̼̺̻͙̜n̴̜͙͙̜̫ǫ̘͉͕̜̟ț̘͙̻͎͜ ̝͓̹͓̳̩̫b̡̭̥̥̳̰͔͎r̰̰̪e̹͝a̭k̕ì̯̘̗̟̦̞ͅn̢̻͎g̮̙͎͖̤̝̀ͅ ̬v̢̫̼̲a̭̹̩̲̟n͚͉̪͝Z̧̛͍̻̦A̸̸̩͚̫͙͉͎̖̹͚͇̲͔̹̱L̨̨̝̬̰Ǵ̸̦̣͚̲͇͚̜͉̕͟O̶͏͏̛͇̦̖͉̤̹̺͈̺̺̩͙͖̹͙̲͢ͅ ͙̞͓̠͚͕̕ͅH͏̨͖̗̟͙͖̭͝Ḛ̦̘͕̻͙̘̲̹͚̥͈̣̗̝̣̞̜̝͘͟͜͞ ̶̷̨̛̙̦̼̝̞̭̲̖͚̼͖C̷̢̼͎͉̲̤͓̮̲̣̕ͅÒ̹͖͉̞͈̞͔̹̳̟̭̝̘̲̘̰̰̘͘͘͞M̴̖̝̗͚̻͇̩̮͈͉̪̣͎̯͓͞E̕̕͟͏͈̟̳͇̞̯̰̳̖Ş̵̶̢̢̹̖̩ Either way, Forge allows mods to utilize the feature themselves by using the "@ObjectHolder" annotation, as well as hooking the static fields in key areas (net.minecraft.init) by itself. Failing to replace one of those key areas would led to the Block or Item instance in it to differ from the one in the registry, causing some serious !? - which we are observing here.

The next observation is by checking the game's log. In a LiteLoader-free environment, 1168 ObjectHolder annotations will be observed. In one with LiteLoader, only 705 can be seen - and the missing ones happen to be all of the field references to the Blocks and Items classes, causing... registry subsitution issues in Blocks and Items.

The code for scanning classes for applicable non-annotated fields (as would be the case in net.minecraft.init.Blocks) looks as follows (with uninteresting parts stripped for simplicity):

        for (Field f : clazz.getFields())
        {
            int mods = f.getModifiers();
            boolean isMatch = Modifier.isPublic(mods) && Modifier.isStatic(mods) && Modifier.isFinal(mods);
            if (!isMatch || f.isAnnotationPresent(ObjectHolder.class))
            {
                continue;
            }
            addHolderReference(...);
        }

As you can see, there are two requirements for a match:

  • the field must be public, static and final,
  • the field must not have an ObjectHolder annotation (which it won't, as that annotation is added by Forge; this is to prevent duplicate holder references from being added by earlier-running code scanning annotations).

Of course, the Blocks and Items class have public, static, final block/item fields - normally. LiteLoader strips the "final" part of the fields' modifiers, making the match fail and the object holding to not be applied - which means that registry substitutions will not work correctly.

We can see that this is a deliberate operation on LiteLoader's part in its class transformer:

        else if (Obf.Blocks.obf.equals(transformedName)
                || Obf.Blocks.name.equals(transformedName)
                || Obf.Items.obf.equals(transformedName)
                || Obf.Items.name.equals(transformedName))
        {
            return this.stripFinalModifiers(basicClass);
        }

Wait a minute, WHAT?

Why is LiteLoader doing this?

The commit which introduces the feature also adds a method called ModUtilities.addBlock, providing a similiar - if more rudimentary - means of registry substitution.

Curiously, however, the feature was removed in a "Quick and dirty 1.10 update" with little to no fanfare. The coremod patch, however, persists.

What can we do about this?

Well...

  • We could coremod Forge. But then someone would probably yell at me. Not an option.
  • We could coremod LiteLoader. Except we can't, because transformers are generally exempt from being coremodded themselves.
  • We could write a coremod which runs just after LiteLoader and undoes its patch, then release it as a mod. Perfect.

So I've made a mod!

Oh, wait, it's 2:30 AM. See you~

@mezz
Copy link
Owner

mezz commented Jan 9, 2022

I am closing this issue because this bug is not getting fixed in LiteLoader, and asie has provided a workaround mod here: #1189 (comment)

@mezz mezz closed this as completed Jan 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests