Closed neoedmund closed 3 months ago
Well , I figure out myself.
There are serveral places using java.nio.file.Files.list()
especially the one in ArtifactParser.java
as JDK javadoc said: "This method must be used within a try-with-resources statement or similar control structure to ensure that the stream's open directory is closed promptly after the stream's operations have completed."
And misuse made the resource leak.
After fix that, I'm able to run the app.
But I have a bad feeling because the CPU usage is so high(on intel intergrated gpu, okay on others)
I tried to compile and run the app on linux, but get
Too many open files
whenpackageModsToAssets
I guess the dev use Windows not knowing the issue. I uselsof
to find out all 4000+opened files
are all DIR is the 'core/mods/base' So what the meaning of opened Directory in java? why Directory even need to be "open"? What operation did that? Thanks, any help ?