[EMF] Entity Model Features [Fabric & Forge]

[EMF] Entity Model Features [Fabric & Forge]

28M Downloads

[Bug] Exceptions are silenced during model update

Estecka opened this issue ยท 0 comments

commented

Describe the bug
I have a server-side mod which adds custom data to villagers NBT. I recently fixed an issue with it that caused performance drops in singleplayer, when combined with Fresh Animations. While investigating this, I found that my NBT code would throw exceptions if called from the Render Thread. However, no corresponding errors were present in the logs.
I believe EMF catches and discards these exceptions without logging them.

Due to the nature of my mod (server-side and rarely ever does anything), I might have never suspected it could be involved in render-related issues, had someone else not made the connection. Even if printing the errors would result in a spam, this is preferable to no error at all. Being able to see them would have enabled me to identify and fix the issue much sooner.

Throwing was the first, and therefore only, thing that my mod did, meaning throwing is on its own enough to tank performances. For this reason, I woud not consider any exception to be benign.

Mod list:

  • Minecraft: 1.21
  • EMF: 2.1.3
  • ETF: 6.13
  • Fresh Animations: 1.9.2
  • Shifting Wares: 2.2.1 (NOT 2.2.2 which has the issue fixed)

To Reproduce
Summon a Villager and look at it.
Whenever EMF refreshes the villager's NBT, Shifting Wares will call VillagerEntity::getOffers on the Render Thread, which throws an exception.
No errors are visible in the log.

Possibly related to #95. It looks very similar to what I observed with my own mod.