Android Project failing with java.lang.OutOfMemoryError

Description of the issue

Building my app on bitrise causes this issue:

e: java.lang.IllegalStateException: Backend Internal error: Exception during file facade code generation
File being compiled: file:///bitrise/src/app/src/main/java/com/rollertoaster/models/dto/GetUserData.kt
The root cause java.lang.OutOfMemoryError was thrown at: org.jetbrains.kotlin.codegen.inline.MaxStackFrameSizeAndLocalsCalculator$$Lambda$414/712620210.get$Lambda(Unknown Source)
	at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException(CodegenUtil.kt:247)
	at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generate(PackageCodegenImpl.java:78)
	at org.jetbrains.kotlin.codegen.DefaultCodegenFactory.generatePackage(CodegenFactory.kt:88)
	at org.jetbrains.kotlin.codegen.DefaultCodegenFactory.generateModule(CodegenFactory.kt:67)
	at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:35)

Environment:

Android & Docker, on Ubuntu 16.04

Which build Step causes the issue and which version of the step?

gradle runner

/bitrise/src/gradlew “–build-file” “build.gradle” “assemblePaidDebug” “–stacktrace” “–no-daemon”

Reproducibility

  • _Does a “Rebuild” help? NO
  • _Does a rebuild without caches help? NO
  • Does the issue happen sporadically, or every time? : YES
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Can’t really pin down what change caused this. I think when I updated to latest AGP. But I still don’t have this issue locally which leads me to believe it’s a bitrise issue

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried.
No. I tried running the exact gradle runner commands locally.

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/cli )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/ .

Build log

Would prefer not to share if possible.

Bump? Using an elite machine, not sure why I’m getting OOM on bitrise but not on my local machine.

Hi @coltonidle, can you please share an URL to the build? That will only allow us to access the logs, not anyone outside, but we need to see them in order to investigate this. Thanks!

Didn’t seem to get an email about this reply. Sorry for the lateness in seeing this @bitce

can you please share an URL to the build? That will only allow us to access the logs, not anyone outside, but we need to see them in order to investigate this. Thanks!

Hm. I would have to check with management. Is there any chance that you could give us a clue on what we should do?

Hi @coltonidle,

Without seeing the full logs/build, it’s hard to tell what’s wrong.

Please let us know if you can provide the build link and enable support access (in project settings).

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