Skip to content

Remove EnableLLVM to fix plt_entry AOT crash on Android startup - #203

Merged
winnerspiros merged 1 commit into
masterfrom
copilot/fix-game-crash-on-startup
Apr 19, 2026
Merged

Remove EnableLLVM to fix plt_entry AOT crash on Android startup#203
winnerspiros merged 1 commit into
masterfrom
copilot/fix-game-crash-on-startup

Conversation

Copilot AI commented Apr 19, 2026

Copy link
Copy Markdown

App crashes with SIGABRT within 2s of launch — plt_entry not met assertion in aot-runtime.c:5341 on SDLThread.

Root cause

EnableLLVM=true combined with AndroidEnableProfiledAot=true produces an AOT image with internally-inconsistent PLT entries. Profiled AOT only compiles a subset of methods; the LLVM backend doesn't generate valid PLT stubs for cross-references into the non-AOT'd portion. This is distinct from the IL-stripping variant of this crash (already mitigated by AndroidStripILAfterAOT=false in #202) — here the PLT table itself is corrupt, not the fallback path.

Fix

  • Remove EnableLLVM=true from the Release PropertyGroup in osu.Android.props
  • AOT still runs via the default Mono compiler, which handles partial-image PLT generation correctly
<!-- Before -->
<EnableLLVM>true</EnableLLVM>

<!-- After: property removed entirely -->
<!-- Do NOT use EnableLLVM with profiled AOT on .NET 10.
     The LLVM backend generates internally-inconsistent PLT entries
     when only a subset of methods is AOT-compiled (profiled AOT). -->

No functional regression — LLVM produces marginally better codegen but the Mono AOT backend is sufficient for this workload and doesn't crash.

EnableLLVM=true causes the LLVM AOT backend to generate internally-inconsistent
PLT (Procedure Linkage Table) entries when combined with AndroidEnableProfiledAot
(partial method compilation). This produces 'plt_entry not met' assertions in
aot-runtime.c:5341 causing SIGABRT on SDLThread within 2 seconds of startup.

The default Mono AOT compiler handles partial-image PLT generation correctly
and is used instead.

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/951d1b55-ea75-43fb-a97c-30faafa4a2f1

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
@gitar-bot

gitar-bot Bot commented Apr 19, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@winnerspiros
winnerspiros marked this pull request as ready for review April 19, 2026 00:19
Copilot AI review requested due to automatic review settings April 19, 2026 00:19
@winnerspiros
winnerspiros merged commit 92bb4b0 into master Apr 19, 2026
1 of 15 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Android Release build configuration to avoid a startup crash caused by the LLVM AOT backend when used together with profiled AOT on .NET 10.

Changes:

  • Removed EnableLLVM=true from the Release PropertyGroup in osu.Android.props.
  • Added an explanatory comment documenting the profiled-AOT + LLVM PLT (plt_entry) crash and rationale for using the default Mono AOT backend.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Successfully merging this pull request may close these issues.

3 participants