Frequent "the daemon has disappeared" error

Hi. Please help me troubleshoot this error. I use Mendix Studio and I get “the daemon has disappeared” error every 5th build or so. There’s nothing suspicious in the daemon log, looks like the process terminates before it can print something to the log. The newest “hs_err_pid*.log” is 6 months old. The tasks don’t matter. Sometimes it’s cleanup, sometimes it’s build. It may fail twice in a row or it may succeed. This is the only java app that crashes on my PC, the others work fine.

Currently I use gradle-8.5 bundled with Mendix Studio. It uses this command lines:

"C:\Program Files\Java\jdk-11.0.20.1+1/bin/java.exe"  "-Xmx64m" "-Xms64m" "-javaagent:C:\Program Files\Mendix\gradle-8.5/lib/agents/gradle-instrumentation-agent-8.5.jar"   "-Dorg.gradle.appname=gradle" -classpath "C:\Program Files\Mendix\gradle-8.5\lib\gradle-launcher-8.5.jar" org.gradle.launcher.GradleMain --info --project-dir "C:\Users\basin\Documents\Mendix\Book_Production-main\deployment" clean-custom-classes compile package

"C:\Program Files\Java\jdk-11.0.20.1+1\bin\java.exe" --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=windows-1252 -Duser.country=GB -Duser.language=en -Duser.variant -cp "C:\Program Files\Mendix\gradle-8.5\lib\gradle-launcher-8.5.jar" "-javaagent:C:\Program Files\Mendix\gradle-8.5\lib\agents\gradle-instrumentation-agent-8.5.jar" org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.5

I don’t have full control over how it’s launched by the IDE. Even the project file is generated on the fly and I don’t know the contents.

My gradle.properties and init.gradle in %USERPROFILE%.gradle are empty.

From today’s error:

The message received from the daemon indicates that the daemon has disappeared.
Build request sent: Build{id=e3d4888a-b1d4-45b8-af58-d39b4cbfbb6f, currentDir=C:\Users\basin\Documents\Mendix\Book_Production-main\deployment}
Attempting to read last messages from the daemon log...
Daemon pid: 23052
  log file: C:\Users\basin\.gradle\daemon\8.5\daemon-23052.out.log
----- Last  20 lines from daemon log file - daemon-23052.out.log -----
:clean-excluded-jars (Thread[Execution worker,5,main]) started.
destroyer locations for task group 0 (Thread[included builds,5,main]) started.
Caching disabled for task ':clean-excluded-jars' because:
  Build cache is disabled
Task ':clean-excluded-jars' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Resolve mutations for :copyDeploymentArtifacts (Thread[Execution worker,5,main]) started.
:copyDeploymentArtifacts (Thread[Execution worker,5,main]) started.
Caching disabled for task ':copyDeploymentArtifacts' because:
  Build cache is disabled
Task ':copyDeploymentArtifacts' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Resolve mutations for :copyLibs (Thread[Execution worker,5,main]) started.
:copyLibs (Thread[Execution worker,5,main]) started.
Caching disabled for task ':copyLibs' because:
  Build cache is disabled
Task ':copyLibs' is not up-to-date because:
  Input property 'rootSpec$1' file C:\Users\basin\Documents\Mendix\Book_Production-main\vendorlib\commons-codec-1.17.0.jar has been removed.
  Input property 'rootSpec$1' file C:\Users\basin\Documents\Mendix\Book_Production-main\vendorlib\commons-compress-1.26.2.jar has been removed.
  Input property 'rootSpec$1' file C:\Users\basin\Documents\Mendix\Book_Production-main\vendorlib\commons-lang-2.6.jar has been removed.
----- End of the daemon log -----


FAILURE: Build failed with an exception.

* What went wrong:
Could not dispatch a message to the daemon.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.