ScalarVector1 / DragonLens

Modern, customizable, and community-driven debugging and cheat mod for TModLoader
24 stars 14 forks source link

[Bug] Clicking "NPC Spawner" causes the game to freeze. #58

Closed Setnour6 closed 1 year ago

Setnour6 commented 1 year ago

Using Windows 11, Steam. Latest 1.4.4 Version

Description

Clicking on the "NPC Spawner" button immediately stops the game and causes it to freeze. No crash seems to occur after. This even causes client.log to reach 40.7 MB (42,716,598 bytes). I'm worried that this might have also caused a surge in memory use as well.

Mod List:

Reproduction

Step 1. Enter a world Step 2. Open NPC Spawner Step 3. The game freezes.

Expected behavior: The NPC Spawner loads all NPCs as normal. Actual Behavior: The NPC Spawner fails to load any NPC and the game freezes.

ScalarVector1 commented 1 year ago

Could I perhaps see a snippet of the log file? It may give a hint as to what is happening. I understand your hesitation to upload the entire thing given its apparent size.

Setnour6 commented 1 year ago

I trimmed the log. The last error message keeps repeating over and over. client.log

I also tested this after disabling Everglow and the NPC spawner works fine. I do worry that other mods that utilize bestiary in any way might also cause the issue

steviegt6 commented 1 year ago

Everglow is pretty unique, wouldn't be surprised if something they're doing interacts poorly with our systems; it's been recently open-sourced as free software here, so I'll have a look.

steviegt6 commented 1 year ago

File certainly exists, as seen here. Client logs suggest TheFirefly is being treated as a mod... for some reason. I believe it's part of the Myth module which is compiled to an assembly and loaded at runtime, with its content added to Everglow. I can see why that would cause issues.

Can we confirm that this even loads correctly in the actual bestiary? We should add a try-catch either way to play it safe, but I'm unsure if this is really on our side; I'll test myself when I get home.

Further investigations show it's explicitly declared here. Boo womp.

ScalarVector1 commented 1 year ago

Interesting... I've never seen a mod with this structure before. I'm not sure how much we can do to account for this outside of a more extreme try/catch net? Is there a reason why everglow handles itself in this way? It seems very strange to me but ofcourse this is looking in as an outsider.

Setnour6 commented 1 year ago

Sorry for being late, I forgot to provide an update earlier. The problem has been solved and the NPC Spawner works now via a hotfix. I can't really provide a proper insight into the Everglow internal structure because even I do not understand it. I'll let you know if I have any further questions here.