Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build breakage with ubuntu-20.04 (version: 20210330.1) #3078

Closed
1 of 7 tasks
speedym opened this issue Apr 1, 2021 · 7 comments
Closed
1 of 7 tasks

Android build breakage with ubuntu-20.04 (version: 20210330.1) #3078

speedym opened this issue Apr 1, 2021 · 7 comments
Labels
Area: Android Area: C/C++ investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu

Comments

@speedym
Copy link

speedym commented Apr 1, 2021

Description
After yesterday's upgrade to 20210330.1 all our Android builds have started failing with java.lang.NullPointerException.

The error produced is the following (very unhelpful):

> Task :mergeDebugJniLibFolders
> Task :sdk:generateJsonModelDebug FAILED


FAILURE: Build failed with an exception.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.

Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
36 actionable tasks: 36 executed
* What went wrong:
Execution failed for task ':sdk:generateJsonModelDebug'.
> java.lang.NullPointerException (no error message)

* 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 1m 34s
Error: Process completed with exit code 1.

Area for Triage:

Question, Bug, or Feature?:
Bug

Virtual environments affected

  • Ubuntu 16.04
  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11.0
  • Windows Server 2016 R2
  • Windows Server 2019

Image version
20210330.1

Expected behavior
Android build should work fine.

Actual behavior
Android build is crashing with java.lang.NullPointerException.

Repro steps
Try building a project which includes Android C++ native code, and observe the crash.

@miketimofeev
Copy link
Contributor

Hi @speedym!
Could you please provide a link to the failed run and, if possible, minimal repro steps — it will help us sort out the problem faster.

@miketimofeev miketimofeev added Area: Android Area: C/C++ investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu and removed needs triage labels Apr 1, 2021
@speedym
Copy link
Author

speedym commented Apr 1, 2021

@miketimofeev I have tried a downgrading a few packages manually, and it turned out that the upgrade from CMake 3.19.7 -> CMake 3.20.0 broke our builds.

I think the best way forward for us is to use the following action to downgrade CMake as a workaround:
https://github.com/marketplace/actions/actions-setup-cmake ?

If CMake 3.20.0 causes more breakage to your users, maybe you can consider rolling back that package upgrade.

In this particular case, Gradle is spawning CMake and CMake is crashing. The gradle error message was super bad. :/

@maxim-lobanov
Copy link
Contributor

Thank you for sharing investigation results @speedym ,
Yes, you can use this action to downgrade cmake in runtime.

Usually, we follow strategy to install only latest version of tool to images and don't downgrade it. But yes, we definitely will monitor further impact to see how many customers are affected by this issue.

@speedym
Copy link
Author

speedym commented Apr 1, 2021

All clear, thanks for your support! :)

@speedym speedym closed this as completed Apr 1, 2021
rokups added a commit to rbfx/rbfx that referenced this issue Apr 3, 2021
rokups added a commit to rbfx/rbfx that referenced this issue Apr 3, 2021
rokups added a commit to rbfx/rbfx that referenced this issue Apr 3, 2021
rokups added a commit to rbfx/rbfx that referenced this issue Apr 3, 2021
eugeneko pushed a commit to rbfx/rbfx that referenced this issue Apr 3, 2021
@ryantrem
Copy link

ryantrem commented Apr 7, 2021

We hit the same issue (more context here: https://gitlab.kitware.com/cmake/cmake/-/issues/22021). It seems Android Studio 4.2 is the first version that is compatible with CMake 3.20, but Android Studio 4.2 is not yet released and not used in these virtual environments. It seems like upgrading to CMake 3.20 before upgrading to Android Studio 4.2 doesn't make sense and will break most Android Studio / Gradle based builds that use CMake.

kichikuou added a commit to kichikuou/xsystem35-sdl2 that referenced this issue May 9, 2021
To workaround build error with NullPointerException
(actions/runner-images#3078).
kichikuou added a commit to kichikuou/system3-sdl2 that referenced this issue Jun 6, 2021
To workaround build error with NullPointerException
(actions/runner-images#3078).
@speedym
Copy link
Author

speedym commented Jun 16, 2021

@ryantrem thanks for the update, very useful comment! Do you perhaps know which GitHub Actions Android package name is required for CMake 3.20 to work? I see that latest Android SDK Build-tools is 30.0.3 & installed gradle is 7.0.2: https://github.com/actions/virtual-environments/blob/ubuntu20/20210606.1/images/linux/Ubuntu2004-README.md

@ryantrem
Copy link

I don’t know, but I’d love to so I know whether it’s safe to remove our hacks to downgrade cmake!

gleblebedev pushed a commit to gleblebedev/rbfx that referenced this issue Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Android Area: C/C++ investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu
Projects
None yet
Development

No branches or pull requests

4 participants