fabric-loom icon indicating copy to clipboard operation
fabric-loom copied to clipboard

Configuration lock issue with restarting the game in IDEA

Open Juuxel opened this issue 1 year ago β€’ 3 comments

Reproduction

  1. Run game through IDEA
  2. Restart the game with the restart button (stop icon with arrow around it)

Result

Failed to release configuration lock

because the file is in use by another process (I'm on Windows). This doesn't happen always though, and I can't reproduce it consistently for some reason.

Juuxel avatar Aug 10 '22 20:08 Juuxel

If you can reproduce it with --debug or find the stacktrace somehow that would be great. πŸ€”

modmuss50 avatar Aug 10 '22 21:08 modmuss50

I am unable to reproduce this on windows. I have tried using the idea run config, and running using the gradle task. Are you using a single project setup? Or a multi project setup?

modmuss50 avatar Aug 14 '22 11:08 modmuss50

In my case it was a single project setup. I'm not sure what I did to trigger it, could've been a cancelled/failed build for example.

Juuxel avatar Aug 14 '22 11:08 Juuxel

Sounds like this may be fixed. If anyone has any similar issues let me know ASAP.

modmuss50 avatar Aug 17 '22 21:08 modmuss50

Im now encountering this?

17:43:15: Executing 'runClient'...


> Configure project :
Fabric Loom: 0.13.12

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'MobArmor'.
> Failed to release project configuration lock

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
17:43:17: Execution finished 'runClient'.

IMB11 avatar Aug 19 '22 16:08 IMB11

I am unable to delete the lock file in windows explorer too

IMB11 avatar Aug 19 '22 16:08 IMB11

Have you got a way to reproduce this? Im lost as to how it’s even locked in the first place. Loom only creates and deletes the file, never writes to it. πŸ€”

modmuss50 avatar Aug 19 '22 16:08 modmuss50

Closing my IDE then deleting it manually seems to fix it. I have no clue how to reproduce it other than pressing this on the Minecraft configurations

IMB11 avatar Aug 19 '22 18:08 IMB11

Could IDEA be reading something whilst gradle does it stuff?

IMB11 avatar Aug 19 '22 18:08 IMB11

Figured it out! IntellIJ has a "filesystem watcher" daemon process that opens files up for a split second to verify the contents (and update it in the IDE file list) It seems it is opening the lock file as gradle tries to delete it, meaning gradle can't delete it.

IMB11 avatar Aug 19 '22 19:08 IMB11

killing the watcher fixes the error.

IMB11 avatar Aug 19 '22 19:08 IMB11

Thats great, I will try moving it out of the project directory to see if that helps. Thanks πŸ‘

modmuss50 avatar Aug 19 '22 21:08 modmuss50

To be honest, intellIJ shouldn't be watching files in .gradle in the first place

IMB11 avatar Aug 19 '22 21:08 IMB11

Pushed another fix for this that moves it out of the project dir. Again please let me know of any issues πŸ‘

modmuss50 avatar Aug 22 '22 19:08 modmuss50