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] Application crashes upon loading the SkinnedMesh sample after displaying asserts #638

Open
LB-KacperKapusta opened this issue Aug 18, 2023 · 0 comments

Comments

@LB-KacperKapusta
Copy link

Describe the bug
AtomSampleViewer application crashes on Android device upon loading the SkinnedMesh sample after the displayed asserts are ignored.

Please refer to the attached video for more information. Please note that Game.log found on the device does not seem to have been generated correctly (might be related to o3de/o3de#12039).

The issue should be considered Critical priority.

First assert:

File:
C:/o3de/Gems/Atom/RHI/Vulkan/Code/Source\RHI/Vulkan.h

Condition:

void AZ::Vulkan::AssertSuccess(VkResult)

ASSERT: Vulkan APKI method failed: Device lost

Line:
102

Second assert:

File:
C:/o3de/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp

Condition:

auto AZ::Vulkan::SwapChain::PresentInternal():(anonymousclass)::operator()(void *) const

Unhandled error for swapchain presentation.

Line:
332

Prerequisites

In this test the following settings have been used:

SET O3DE_ENGINE_PATH=C:\o3de
SET O3DE_PROJECT_PATH=C:\o3de-atom-sampleviewer
SET O3DE_BUILD_ROOT=C:\o3de-build
SET O3DE_ANDROID_SIGNCONFIG_FILE=%O3DE_BUILD_ROOT%\o3de.keystore
SET O3DE_ANDROID_SIGNCONFIG_STORE_PASSWORD=o3de_android
SET O3DE_ANDROID_SIGNCONFIG_KEY_ALIAS=o3de_key
SET O3DE_ANDROID_SIGNCONFIG_KEY_PASSWORD=o3de_android
SET O3DE_ANDROID_SIGNCONFIG_KEY_SIZE=2048
SET O3DE_ANDROID_SIGNCONFIG_VALIDITY_DAYS=10000
SET O3DE_ANDROID_DN="cn=atom-sample-viewer, ou=o3de, o=LF, c=US"
set O3DE_ANDROID_SDK_PATH=C:\Android\Sdk
set O3DE_ANDROID_NDK_VERSION=22.1.7171670
set O3DE_ANDROID_SDK_API_LEVEL=30
set O3DE_ANDROID_ASSET_MODE=LOOSE
set O3DE_ANDROID_DEPLOY_TYPE=BOTH

Steps to reproduce

  1. Generate KeyStore to allow APK signing:
    keytool -genkey -keystore %O3DE_ANDROID_SIGNCONFIG_FILE% -storepass %O3DE_ANDROID_SIGNCONFIG_STORE_PASSWORD% -alias %O3DE_ANDROID_SIGNCONFIG_KEY_ALIAS% -keypass %O3DE_ANDROID_SIGNCONFIG_KEY_PASSWORD% -keyalg RSA -keysize %O3DE_ANDROID_SIGNCONFIG_KEY_SIZE% -validity %O3DE_ANDROID_SIGNCONFIG_VALIDITY_DAYS% -dname %O3DE_ANDROID_DN%
  2. Use Python to run generate_android_project.py:
    %O3DE_ENGINE_PATH%\python\python.cmd %O3DE_ENGINE_PATH%\cmake\Tools\Platform\Android\generate_android_project.py --engine-root %O3DE_ENGINE_PATH% --project-path %O3DE_PROJECT_PATH% --build-dir %O3DE_BUILD_ROOT%\android --third-party-path %USERPROFILE%\.o3de\3rdParty --android-sdk-path %O3DE_ANDROID_SDK_PATH% --android-ndk-version %O3DE_ANDROID_NDK_VERSION% --android-sdk-platform %O3DE_ANDROID_SDK_API_LEVEL% --enable-unity-build --asset-mode %O3DE_ANDROID_ASSET_MODE% --signconfig-store-file %O3DE_ANDROID_SIGNCONFIG_FILE% --signconfig-store-password %O3DE_ANDROID_SIGNCONFIG_STORE_PASSWORD% --signconfig-key-alias %O3DE_ANDROID_SIGNCONFIG_KEY_ALIAS% --signconfig-key-password %O3DE_ANDROID_SIGNCONFIG_KEY_PASSWORD%
  3. Build the Android project:
    cd %O3DE_BUILD_ROOT%\android
    gradlew assembleProfile
  4. Deploy the project to a device:
    %O3DE_ENGINE_PATH%\python\python.cmd %O3DE_ENGINE_PATH%\cmake\Tools\Platform\Android\deploy_android.py --build-dir %O3DE_BUILD_ROOT%\android --configuration profile --clean -t %O3DE_ANDROID_DEPLOY_TYPE%

Expected behavior
The SkinnedMesh sample can be loaded without issues in the AtomSampleViewer android application.

Actual behavior
The AtomSampleViewer android application crashes upon loading the SkinnedMesh sample.

Screenshots/Video

ASV_SkinnedMesh_Asserts_Crash.mp4

Found in Branch
Development

Commit ID from o3de/o3de Repository
o3de - o3de/o3de@a62f43b
o3de-atom-sampleviewer - d2890bf

Desktop/Device

  • Device: PC
  • OS: Linux
  • Version: Ubuntu 20.04.6 LTS
  • CPU: CPU: Intel Core i7-11700F
  • GPU: NVIDIA GeForce RTX 3070
  • Memory: 32GB

Additional context
Game.log

Please note that we were not able to gather the LogCat output from the Android Studio due to the time constraints and the following error occurring:

Starting Gradle Daemon...
Gradle Daemon started in 969 ms
FAILURE: Build failed with an exception.
* Where:
Initialization script 'C:\Users\GPC-93427\AppData\Local\Temp\ijmapper.gradle'
* What went wrong:
Could not compile initialization script 'C:\Users\GPC-93427\AppData\Local\Temp\ijmapper.gradle'.
> startup failed:
  General error during conversion: Unsupported class file major version 61
  java.lang.IllegalArgumentException: Unsupported class file major version 61
  1 error
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.groovy.scripts.ScriptCompilationException: Could not compile initialization script 'C:\Users\GPC-93427\AppData\Local\Temp\ijmapper.gradle'.
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Unsupported class file major version 61
java.lang.IllegalArgumentException: Unsupported class file major version 61
	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:189)
	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:170)
	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:156)
	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:277)
1 error
	at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileScript(DefaultScriptCompilationHandler.java:139)
	... 154 more
* Get more help at https://help.gradle.org/
BUILD FAILED in 4s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant