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

[Dotnet]Exporting a project in c# after switching aot can be problematic #96299

Open
scgm0 opened this issue Aug 29, 2024 · 0 comments
Open

[Dotnet]Exporting a project in c# after switching aot can be problematic #96299

scgm0 opened this issue Aug 29, 2024 · 0 comments

Comments

@scgm0
Copy link
Contributor

scgm0 commented Aug 29, 2024

Tested versions

v4.4.dev1.mono.official [28a72fa]

System information

Godot v4.4.dev1.mono - Arch Linux #1 ZEN SMP PREEMPT_DYNAMIC Tue, 20 Aug 2024 15:33:58 +0000 - Wayland - GLES3 (Compatibility) - Mesa Intel(R) UHD Graphics 630 (CFL GT2) - Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz (8 Threads)

Issue description

If aot is not enabled for the first export of c# project, and is enabled for the second export, their c# data will be mixed with each other. under linux this will result in the runtime of the second exported game actually using the c# assembly from the first export, not the aot binary from the second export. (windows seems to have a worse problem with this)

Steps to reproduce

  1. Export the project and run it, the screen should display Hello CSharp!.
  2. Modify PublishAot in TestAot.csproj to true.
  3. Use the same export path as the first time, re-export and run. Ideally it should display Hello CSharp Aot!. Under Linux, it will actually display Hello CSharp!. I have not tested it under Windows.
    (When the export option of embed_build_outputs is enabled, this problem will still occur even if the two export paths are inconsistent)

Minimal reproduction project (MRP)

test-aot.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants