I was trying to reproduce this with 3.0 on the windows cmd with low buffer settings. Unfortunately I did not have any success. Is anyone (@kec2, @gordwilling, @nwalter) able to reproduce this bug and can share the build configuration for that (or information about it; e.g. which tasks seem to cause the issue)? Feel free to PM me. Thx.
This is my task that results in the error.
task convert(dependsOn: [classes, prepareConvert]) {
doLast{
model_list.split(',').each{ model ->
javaexec {
classpath = sourceSets.main.runtimeClasspath
main = 'dk.xact.translate.DoTheWork'
args model.trim()
jvmArgs = ['-Dfile.encoding=UTF-8']
}
}
}
}
model_list is a comma separated string in gradle.properties
Thanks for providing that snippet. I am still not able to reproduce this with cmd on Windows 7. Is DoTheWork producing any log / System.out output. My assumption was that it has something to do with writing to the console and that a huge amount of output would cause this (but this assumption might be wrong).
The problem is periodic.
yes DoTheWork does log via java.util.logging.Logger to file.
System.out is also used to log to console in an extension of java.util.logging.ConsoleHandler.
Thanks again, but unfortunately I am still not able to reproduce the issue here.
Could you check if the problem still occurs with the latest release candidate - 3.1 RC1?
Yes, I will look into that.
I have now tried my task more then 50 times with Gradle 3.1-rc-1.
I can not reproduce the issue with 3.1-rc-1.
I reverted back to 3.0 and I was able to reproduce the issue after a few tries.
Thanks @kec2 for your effort. For now we will consider this fixed in 3.1. If the issue reoccurs, please let us know!
FYI, I can reproduce this locally with ease (on v2.14 and v3.1). I get no stacktrace even with --stacktrace, but if I run it with --info, the error goes away.
At the moment, Iām going to assume itās related to some of the internal Gradle plugins we have created, but lack of ability to get a stack trace makes things much harder to diagnose.
Spent some time trying to figure out where exactly it was failing. It always seemed to be failing after some diagnostic output a developer had added. We usually use project.logger.quiet (or other level), but this developer used print(ā¦).
First thing I noticed was that in this build.gradle file, I added a project.logger.quiet(ātestā) statement at the very end, and magically, the build had no issues.
Removed the log output, and it was erroring again.
Changed print to project.logger.quiet, and no errors.
Could be completely different reasoning than the OP, but not using print, fixed the issue.
Additional information, changing print to println also fixed the issue.
To close on the issue, Iām not sure 100% why this particular statement caused it.
I did a search and replace on all of our gradle files, and replaced print and println with project.logger.quiet. With this done, the āprintā statement in question no longer causes the original error. There is clearly something more to it than meets the eye, but at least the build issue is resolved for us.
I am having exactly the same issue on gradle 3.1
Project that iām trying to build with gradle uses npm plugin
Problem occurs only when Iām running gradle from windows command line. Everything goes well when Iām using git bash cli.
āstacktrace and --info donāt tell anything
When running with --debug, issue isnāt reproducible.
Info:
Windows 8.1 Pro
Gradle 3.1
Little update, I fixed issue by increasing buffer height in windows command prompt from 300 to 8000.
I have same exception from gradle 3.1 on win 10 64 with org.gradle.parallel=true. Turned parallel off, will observe if something change
upd: turning console buffer to its maximum seems to help