[NeoForge 1.21.1] Server thread hangs when creating new world in large modpack #3

Closed
opened 2026-03-06 16:43:24 -05:00 by unilock · 10 comments

With Menderman installed, the game freezes for an indefinite amount of time when generating a new world. This is in a particularly large NeoForge 1.21.1 modpack, so it's likely related to some other mod, but the limited amount of debugging information makes it difficult to narrow down. Attached are a thread dump from jstack and the latest.log file.

With Menderman installed, the game freezes for an indefinite amount of time when generating a new world. This is in a particularly large NeoForge 1.21.1 modpack, so it's likely related to some other mod, but the limited amount of debugging information makes it difficult to narrow down. Attached are a thread dump from `jstack` and the `latest.log` file.
Owner

Something is very wrong here. It is a difficult task to narrow down.

Somehow some of my component generation logic is recursing when it shouldn't be.

Something is **very** wrong here. It is a difficult task to narrow down. Somehow some of my component generation logic is recursing when it shouldn't be.
Owner

Could I have your full mod list? I want to see if there are any standouts in the crowd.

Could I have your full mod list? I want to see if there are any standouts in the crowd.
Author

I've discovered that the game does eventually load, it just takes a little while...

[09:10:24] [Render thread/WARN] [ModernFix/]: Time from main menu to in-game was 952.9085 seconds

(this was with a logger added to print the name of every item as the registry was iterated through in MendermanDefaultComponents#createFallbackRepairRequirements (in case it was getting stuck on one in particular), so the load time in practice may be slightly less)

Attached is a manually triggered crash report that should contain my full list of mods.

EDIT: Without the debugging log messages:

[09Mar2026 13:30:32.071] [Render thread/WARN] [ModernFix/]: Time from main menu to in-game was 467.1204 seconds
I've discovered that the game *does* eventually load, it just takes a little while... ``` [09:10:24] [Render thread/WARN] [ModernFix/]: Time from main menu to in-game was 952.9085 seconds ``` (this was with a logger added to print the name of every item as the registry was iterated through in `MendermanDefaultComponents#createFallbackRepairRequirements` (in case it was getting stuck on one in particular), so the load time in practice may be slightly less) Attached is a manually triggered crash report that should contain my full list of mods. EDIT: Without the debugging log messages: ``` [09Mar2026 13:30:32.071] [Render thread/WARN] [ModernFix/]: Time from main menu to in-game was 467.1204 seconds ```
Author

Adding if (!defaultInstance.isDamageableItem()) continue; before the getRepairItems(Item)List call reduces the world load time significantly:

[17:50:42] [Render thread/WARN] [ModernFix/]: Time from main menu to in-game was 101.78393 seconds
Adding `if (!defaultInstance.isDamageableItem()) continue;` before the `getRepairItems(Item)List` call reduces the world load time significantly: ``` [17:50:42] [Render thread/WARN] [ModernFix/]: Time from main menu to in-game was 101.78393 seconds ```
Owner

@unilock wrote in #3 (comment):

Adding if (!defaultInstance.isDamageableItem()) continue; before the getRepairItems(Item)List call reduces the world load time significantly:

[17:50:42] [Render thread/WARN] [ModernFix/]: Time from main menu to in-game was 101.78393 seconds

Oh! Awesome! Thanks for investigating. I'll do exactly that as soon as I get to updating.

@unilock wrote in https://git.greenhouse.lgbt/Modding/menderman/issues/3#issuecomment-447: > Adding `if (!defaultInstance.isDamageableItem()) continue;` before the `getRepairItems(Item)List` call reduces the world load time significantly: > > ```text > [17:50:42] [Render thread/WARN] [ModernFix/]: Time from main menu to in-game was 101.78393 seconds > ``` Oh! Awesome! Thanks for investigating. I'll do exactly that as soon as I get to updating.
Author

This is still about 60 seconds more than it would be without Menderman entirely, but it's definitely an improvement.

For the record, ItemStack#isDamageableItem is called in AnvilMenu as well (prior to Item#isValidRepairItem), so it shouldn't cause anything unintended in Menderman.

EDIT: Maybe it would be helpful to log before and after Menderman calculates repair items? I.e. with a timer, like what ModernFix does for world load time.

This is still about 60 seconds more than it would be without Menderman entirely, but it's definitely an improvement. For the record, `ItemStack#isDamageableItem` is called in `AnvilMenu` as well (prior to `Item#isValidRepairItem`), so it shouldn't cause anything unintended in Menderman. EDIT: Maybe it would be helpful to log before and after Menderman calculates repair items? I.e. with a timer, like what ModernFix does for world load time.
Owner

@unilock wrote in #3 (comment):

This is still about 60 seconds more than it would be without Menderman entirely, but it's definitely an improvement.

For the record, ItemStack#isDamageableItem is called in AnvilMenu as well (prior to Item#isValidRepairItem), so it shouldn't cause anything unintended in Menderman.

EDIT: Maybe it would be helpful to log before and after Menderman calculates repair items? I.e. with a timer, like what ModernFix does for world load time.

I guess minor update, I've implemented these changes on the 26.1 branch, but I still need to implement these changes and a semi-old update on 1.21.1.

This will be the final update for 1.21.1 because continued maintenance is strenuous for me.

@unilock wrote in https://git.greenhouse.lgbt/Modding/menderman/issues/3#issuecomment-449: > This is still about 60 seconds more than it would be without Menderman entirely, but it's definitely an improvement. > > For the record, `ItemStack#isDamageableItem` is called in `AnvilMenu` as well (prior to `Item#isValidRepairItem`), so it shouldn't cause anything unintended in Menderman. > > EDIT: Maybe it would be helpful to log before and after Menderman calculates repair items? I.e. with a timer, like what ModernFix does for world load time. I guess minor update, I've implemented these changes on the 26.1 branch, but I still need to implement these changes and a semi-old update on 1.21.1. This will be the final update for 1.21.1 because continued maintenance is strenuous for me.
Author

This will be the final update for 1.21.1 because continued maintenance is strenuous for me.

Understandable. I very much appreciate the work done so far!

> This will be the final update for 1.21.1 because continued maintenance is strenuous for me. Understandable. I very much appreciate the work done so far!
Owner

Hi, I have fixed the bug as of commit.

d20cc8aadf

Ignore that it's merged into another commit, I'm just glad that it's done.

Hi, I have fixed the bug as of commit. https://git.greenhouse.lgbt/Modding/menderman/commit/d20cc8aadfb8c92608b922f26043ae60089868b7 Ignore that it's merged into another commit, I'm just glad that it's done.
Author

Thank you so much!!

Thank you so much!!
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Modding/menderman#3
No description provided.