CraftTweaker

CraftTweaker

151M Downloads

First login: Timing out

TerminatorNL opened this issue ยท 13 comments

commented

Intro:

When joining a server for the first time, the server responds with a "XXX joined the game" message, after that the CPU on the client gets pinned to 100%, but takes too long. The server in turn sends a timed out packet to the client and closes the connection.

After processing is done on the client, the client spawns into the world for a single frame before it realises it has been disconnected by the server. You see: Timed out in the disconnect message.

Issue Description:

A custom modpack in the making, containing various mods listed below.

SPECULATION:
I believe this only occurs when EnderCore/EnderIO are also installed, but they do not seem to be directly responsible for this behaviour, as it does not occur without CraftTweaker.

Installed mods (File names):

 AdvancedRocketry-1.12.2-1.5.0-139-universal.jar
 Advanced+Solar+Panels-4.3.0.jar
 alcatrazcore-1.0.4.jar
 alchemistry-1.0.7.jar
 alib-1.0.9.jar
 animania-1.12.2-1.6.2.jar
 appliedenergistics2-rv6-stable-6.jar
 architecturecraft-1.12-3.80.jar
 Atomic-Science-1.12.2-3.2.0b87.jar
 base-1.12.2-3.12.1.jar
 Baubles-1.12-1.5.2.jar
 BiomesOPlenty-1.12.2-7.0.1.2427-universal.jar
 BiomeTweaker-1.12.2-3.2.354.jar
 BiomeTweakerCore-1.12.2-1.0.39.jar
 cc-tweaked-1.12.2-1.82.3.jar
 chiselsandbits-14.32.jar
 CodeChickenLib-1.12.2-3.2.2.353-universal.jar
 CoFHCore-1.12.2-4.6.2.25-universal.jar
 CoFHWorld-1.12.2-1.3.0.6-universal.jar
 CommonCapabilities-1.12.2-2.2.1.jar
 compactmachines3-1.12.2-3.0.17-b267.jar
 CraftStudioAPI-universal-1.0.1.95-mc1.12-alpha.jar
 CraftTweaker2-1.12-4.1.17.jar
 customstuff4-1.12.2-0.5.3.jar
 CyclopsCore-1.12.2-1.2.0.jar
 DynamicDynamos-1.12.2-1.8.jar
 DynamicTrees-1.12.2-0.9.5.jar
 DynamicTreesBOP-1.12.2-1.4.1e.jar
 DynamicTreesTC-1.12.2-1.4.1e.jar
 EnderCore-1.12.2-0.5.57.jar
 endercrop-1.12.2-1.6.0.jar
 EnderIO-1.12.2-5.0.43.jar
 engineers_doors-1.12.2-0.8.0.jar
 exnihilocreatio-1.12.2-0.4.jar
 ExtremeReactors-1.12.2-0.4.5.65.jar
 Forgelin-1.8.2.jar
 ForgeMultipart-1.12.2-2.6.1.81-universal.jar
 FTBLib-5.3.0.56.jar
 FTBUtilities-5.3.0.52.jar
 gregtech-1.12.2-1.7.1.394.jar
 Guidebook-1.12.2-2.8.3.jar
 Hwyla-1.8.26-B41_1.12.2.jar
 ic2magma-1.0.jar
 ImmersiveCables-1.12.2-1.3.2.jar
 ImmersiveEngineering-0.12-89.jar
 Immersive-IO-1.12.2-0.9.5.jar
 immersivepetroleum-1.12.2-1.1.9.jar
 ImmersivePosts-0.1.2.jar
 industrialcraft-2-2.8.109-ex112.jar
 industrialforegoing-1.12.2-1.12.11-235.jar
 IndustrialWires-1.7-36.jar
 IntegratedDynamics-1.12.2-1.0.11.jar
 IntegrationForegoing-1.12.2-1.9.jar
 InventoryTweaks-1.63.jar
 ironchest-1.12.2-7.0.59.842.jar
 jei_1.12.2-4.15.0.268.jar
 jeiintegration_1.12.2-1.5.1.36.jar
'LagGoggles-FORGE-1.12.2-4.3-HOTFIX(2).jar'
 LibVulpes-1.12.2-0.4.0-56-universal.jar
 Mantle-1.12-1.3.3.49.jar
 mekanica-1.12.2-1.2.0.jar
 mekanica-generators-1.12.2-1.2.0.jar
 mekanica-tools-1.12.2-1.2.0.jar
 MineTweakerRecipeMaker-1.12.2-1.2.2.30.jar
 Modular+Diversity-1.1.jar
 modularmachinery-1.12.2-1.9.6.jar
 ModularPowersuits-1.12.2-1.0.40.jar
 MrTJPCore-1.12.2-2.1.3.35-universal.jar
 MTLib-3.0.6.jar
 NuclearCraft-2.16e-1.12.2.jar
 Numina-1.12.2-1.0.37.jar
 OpenBlocks-1.12.2-1.8.1.jar
 OpenComputers-MC1.12.2-1.7.4.153.jar
 OpenModsLib-1.12.2-0.12.2.jar
 oreberries-1.12.x-0.5.0.jar
 OreExcavation-1.4.140.jar
 ProjectRed-1.12.2-4.9.1.92-Base.jar
 ProjectRed-1.12.2-4.9.1.92-lighting.jar
 ProjectRed-1.12.2-4.9.1.92-world.jar
 prospectors-1.0.2.jar
 RedstoneFlux-1.12-2.1.0.6-universal.jar
 RTG-1.12.2-6.1.0.0-beta.6.jar
 SteamAgeRevolution-0.5.0.jar
 TConstruct-1.12.2-2.12.0.135.jar
 tesla-core-lib-1.12.2-1.0.15.jar
 Thaumcraft-1.12.2-6.1.BETA26.jar
 ThermalDynamics-1.12.2-2.5.4.18-universal.jar
 ThermalExpansion-1.12.2-5.5.3.41-universal.jar
 ThermalFoundation-1.12.2-2.6.2.26-universal.jar
 TinkersComplement-1.12.2-0.3.2.jar
 tinkersforging-1.1.2.jar
 tinkersjei-1.2.jar
 UniDict-1.12.2-2.9.2.jar
 WailaHarvestability-mc1.12-1.1.12.jar
 WanionLib-1.12.2-2.2.jar
 Waterworks-1.12.2-1.0.12.jar
 Wawla-1.12.2-2.5.269.jar
 zerocore-1.12.2-0.1.2.8.jar

What happens:

The server will close the connection with a time-out message while the client is still processing.
A second login always works.

What you expected to happen:

Not having to log-in twice

Script used

None! The /scripts folder is completely empty!

Additional info:

I have used VisualVM, indicating that Forge sends a GuiOpenEvent, and CraftTweaker is consuming much time during that period. I think it's safe to say that CraftTweaker isn't directly responsible for the time consumed, but without CraftTweaker you are logged in instantly and don't have this problem.

This was measured on the client during the period where the server says: Logged in, and Timed Out for my player. Please note that there's no error, I'm just timing out.

I have included a screenshot of the VisualVM profiler results, as well as the raw results themselves for you to look at, if you wish. (It's the .nps file in .zip)

image

VisualVM-results-client.zip

crafttweaker.log file

Serverside: https://pastebin.com/1KhWAwNR
Clientside: https://pastebin.com/V3JzK0YW


Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2768
  • Crafttweaker: CraftTweaker2-1.12-4.1.17
  • Using a server: Yes
  • If yes, does the client have the exact same scripts? Yes, none

Your most recent log file where the issue was present:

client-debug.log
server-debug.log


This mod is an absolute requirement for modpack authors, so thank you for putting your time and effort into this.

commented

IIRC you can also search in the recipe book, could you check that this works as well?

commented

do me a favour and try this:

go into single player, open the crafting table gui

exit world

connect to server

commented

Do you also want the timings? Starting client as we speak.

commented

shouldn't matter for this test

commented

This works. I am not timing out

I already ran a profiler, so for the sake of completeness:
image

This was captured during the period the cursor went away before world loaded

Thanks for the fast response, btw

commented

So it appears that the code that fixes the recipe book is causing the time out, do you mind doing some test for me?

commented

Sure thing

commented

Try this :)
https://i.blamejared.com/CraftTweaker2-1.12-4.1.17.jar

Also do me a favour and just check if the recipe book looks fine etc

commented

You nailed it! Not timing out anymore!

If by recipe book you mean the green little book next to the crafting table, it looks normal to me!

image

Thank you for the amazingly quick response

commented

okay cool, if you're still ingame, can you do 1 more test with doing searches in the creative menu, since that was included in the original fix

commented

Both JEI and minecraft creative menu seems to work fine at first glance. Is there anything specific you want me to do?

commented

Just do a search for a few items and see if the correct ones appear

commented

That works! Thank you very much