Fix AOT crash (plt_entry assertion) and suppress release workflow warnings - #202
Conversation
…NU1608/XA4301/CS1591 warnings - AndroidStripILAfterAOT=false: profiled AOT only compiles startup-profile methods; stripping IL removes the fallback for un-AOT'd methods, causing 'plt_entry not met' assertion crash on .NET Timer thread at startup. - NU1608: Xamarin.AndroidX.Lifecycle version constraint mismatches are harmless (2.10.x is backward-compatible with 2.9.x APIs). - XA4301: duplicate native .so files in APK packaging (build picks one copy). - CS1591: Veldrid submodule missing XML doc comments in Release builds, suppressed via CustomBeforeMicrosoftCommonTargets in release workflow. Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/f09e4655-1c16-4d83-9ea4-cb15e8a466b2 Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes an Android startup crash caused by an incompatible Release AOT/IL-stripping configuration, and reduces noise in the release workflow by suppressing known benign warnings (including submodule XML-doc warnings).
Changes:
- Disable
AndroidStripILAfterAOTin Release to keep IL available for methods not covered by profiled AOT. - Expand Android build warning suppressions (
NU1608,XA4301) inosu.Android.props. - Add a build targets file to suppress
CS1591for submodule projects and wire it into the release workflow viaCustomBeforeMicrosoftCommonTargets.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
osu.Android.props |
Turns off IL stripping for profiled AOT Release builds; adds additional NoWarn entries. |
build/SuppressSubmoduleWarnings.targets |
Introduces Release-workflow-imported targets to suppress CS1591 for submodule projects. |
.github/workflows/release.yml |
Passes CustomBeforeMicrosoftCommonTargets to include the new suppression targets during Release publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <!-- Suppress CS1591 (missing XML doc comments) for submodule projects that enable | ||
| documentation generation but don't suppress the warning in Release builds. | ||
| This file is imported via CustomBeforeMicrosoftCommonTargets in the release workflow. --> | ||
| <PropertyGroup Condition="$(MSBuildProjectFullPath.Contains('submodules'))"> |
There was a problem hiding this comment.
The MSBuild Condition syntax here is invalid: $(MSBuildProjectFullPath.Contains('submodules')) is treated as a property reference and will expand to empty, which can make the Condition fail evaluation (or not match) and break/disable the suppression. Use a proper string-method condition expression instead (e.g., apply .Contains() on a quoted string containing $(MSBuildProjectFullPath)), so the NoWarn property group reliably applies only to submodule projects.
| <PropertyGroup Condition="$(MSBuildProjectFullPath.Contains('submodules'))"> | |
| <PropertyGroup Condition="'$(MSBuildProjectFullPath)'.Contains('submodules')"> |
Release workflow run #24616392583 succeeded but produced many warnings, and the resulting APK crashes on launch with:
SIGABRT on
.NET Timerthread ~2s after start. Root cause:AndroidStripILAfterAOT=true+AndroidEnableProfiledAot=true— profiled AOT only compiles startup-profile methods, but IL stripping removes the fallback for everything else.Crash fix
AndroidStripILAfterAOT=falseinosu.Android.props— keeps IL bodies so un-AOT'd methods can be JIT'd/interpreted at runtimeWarning suppressions
.sofiles from multiple sources (AndroidNativeLibrary + runtime pack); build deduplicates correctlybuild/SuppressSubmoduleWarnings.targetsimported throughCustomBeforeMicrosoftCommonTargetsinrelease.yml, since Veldrid's ownDirectory.Build.propsblocks normal NoWarn inheritance and we can't modify the submodule remote