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

(4.4.beta1) Android app crashes when exported with .NET 9 #101948

Open
cyberschema opened this issue Jan 23, 2025 · 1 comment
Open

(4.4.beta1) Android app crashes when exported with .NET 9 #101948

cyberschema opened this issue Jan 23, 2025 · 1 comment

Comments

@cyberschema
Copy link

Tested versions

Reproducible:
4.4.beta1
4.4.dev7

Not Reproducible:
4.4.dev3

System information

Godot v4.4.beta1.mono - Windows 10 (build 19045) - OpenGL 3 (Compatibility)

Issue description

When exporting to Android with .NET 9 using Gradle Build via the Remote Deploy, the app crashes immediately at startup.

Note: .NET 8 works fine, but .NET 9 causes the app to crash

using the command at runtime:
adb logcat|grep godot

01-22 19:27:18.818 1895 3450 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN flg=0x10000000 cmp=com.example.test_android/com.godot.game.GodotApp} from uid 2000
01-22 19:27:18.857 1895 2224 I ActivityManager: Start proc 1876:com.example.test_android/u0a411 for next-top-activity {com.example.test_android/com.godot.game.GodotApp}
01-22 19:27:19.885 1895 2006 W ActivityTaskManager: Force finishing activity com.example.test_android/com.godot.game.GodotApp
01-22 19:27:19.987 1895 2220 I GameServiceProviderInstance: Failed to remove task overlay. This is expected if the task is already destroyed: GameSessionRecord{mTaskId=306, mState=GAME_SESSION_ATTACHED, mRootComponentName=ComponentInfo{com.example.test_android/com.godot.game.GodotApp}, mIGameSession=android.service.games.IGameSession$Stub$Proxy@3a45eaa, mSurfacePackage=android.view.SurfaceControlViewHost$SurfacePackage@3504a9b}
01-22 19:27:20.386 1895 2200 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{691de90 u0 com.example.test_android/com.godot.game.GodotApp} t-1 f}}

Steps to reproduce

  1. Godot 4.4.beta1
  2. Create a new project
  3. Create C# script and attach to a node in the main scene
  4. Update the visual studio project to target .NET 9:
    <TargetFramework>net9.0</TargetFramework>
  5. Remote Deploy to Android with Gradle Build

Minimal reproduction project (MRP)

N/A

@raulsntos
Copy link
Member

This is likely because .NET 9 introduced a new Java class (net.dot.android.crypto.DotnetX509KeyManager) in dotnet/runtime#103337 and we're embedding the System.Security.Cryptography.Native.Android jar library from .NET 8. We were hoping the Java library wouldn't change often so it would remain compatible with newer versions for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release Blocker
Status: For team assessment
Development

No branches or pull requests

3 participants