Dynamic Trees

Dynamic Trees

25M Downloads

Resource leak for generic model loader

liach opened this issue · 3 comments

commented

Basic Info
Version: 0.9.4 for Minecraft 1.12.2

Describe the bug
Minecraft reports that dynamic trees causes resource leak by not closing the input stream properly.

To Reproduce
Steps to reproduce the behavior:

  1. Set log config's root logger level to "debug" (e.g. https://github.com/Railcraft/Railcraft/blob/d9d601d14f1d59f405cd38e6a820168cef2ff36f/extras/log4j2.xml#L33)
  2. Run the client game and read the logs. The reproducibility should vary as this is determined by the finalizer runs.

Log snippet
https://gist.github.com/feb1d53808a1dff7879a60f171ab1ba8

Rendering Glitches
None.

Analysis
Replacing https://github.com/ferreusveritas/DynamicTrees/blob/619d419e7c6904ae62d21b48d48a7b4b76571593/src/main/java/com/ferreusveritas/dynamictrees/models/loaders/ModelLoaderGeneric.java#L80 with

	} finally {

shall resolve this issue.

Mods List
Mods: Railcraft (development environment), Forestry, IndustrialCraft 2
(Mods should have no effect here)
Forge: 1.12.2-14.23.5.2779

commented

Haha nice. I was just acting like the stale bot today. Anyways, update Dynamic Trees to 0.9.5.

commented

Also, since you put actual code in there, and it is the same in the next version, @ferreusveritas can you please fix this one line bug.

commented

Yep, the smart way to fix a bug is to ignore it. :trollface: