Exception in thread "main" java.io.IOException: Cannot allocate memory circleci 2.0


#1

I am getting this weird error when migrating to 2.0 :

Config file

the error :

:app:transformClassesWithDesugarForProdAppDebugPicked up _JAVA_OPTIONS: -Xmx3200m -XX:ParallelGCThreads=2 -XX:ConcGCThreads=2 -XX:ParallelGCThreads=2 -Djava.util.concurrent.ForkJoinPool.common.parallelism=2
Exception in thread "main" java.io.IOException: Cannot allocate memory
	at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
	at sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:60)
	at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
	at sun.nio.ch.IOUtil.write(IOUtil.java:65)
	at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:211)
	at java.nio.channels.Channels.writeFullyImpl(Channels.java:78)
	at java.nio.channels.Channels.writeFully(Channels.java:101)
	at java.nio.channels.Channels.access$000(Channels.java:61)
	at java.nio.channels.Channels$1.write(Channels.java:174)
	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
	at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
	at java.util.zip.ZipOutputStream.write(ZipOutputStream.java:339)
	at java.io.FilterOutputStream.write(FilterOutputStream.java:97)
	at com.google.devtools.build.android.desugar.ZipOutputFileProvider.writeStoredEntry(ZipOutputFileProvider.java:73)
	at com.google.devtools.build.android.desugar.ZipOutputFileProvider.write(ZipOutputFileProvider.java:49)
	at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:403)
	at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:326)
	at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:280)
	at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:584)
	Suppressed: java.util.zip.ZipException: invalid entry crc-32 (expected 0xa5fe02ff but got 0x0)
		at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:295)
		at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:360)
		at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:238)
		at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:377)
		at com.google.devtools.build.android.desugar.ZipOutputFileProvider.close(ZipOutputFileProvider.java:54)
		at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:344)
		... 2 more

FAILED


#2

Heh, the error is “Cannot allocate memory” and you’ve requested 3.2G on a 4G machine :smirk_cat:

Try reducing that to, say, 2G?

(Aside: when presenting log/trace/exception data, please get into the habit of formatting it in a code block, for readability. There is a code formatting tool in the toolbar in Discourse forums).


#3

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.