Skip to content

fix(android): silence ILLink IL1012 crash and AVIF warning spam in Android release build - #315

Merged
winnerspiros merged 3 commits into
masterfrom
copilot/check-build-errors-and-warnings
May 8, 2026
Merged

fix(android): silence ILLink IL1012 crash and AVIF warning spam in Android release build#315
winnerspiros merged 3 commits into
masterfrom
copilot/check-build-errors-and-warnings

Conversation

Copilot AI commented May 8, 2026

Copy link
Copy Markdown
  • Set jpeg_avif_enabled: false in .github/resource-optimizer/config.json — libsvtav1 is not available on CI runners, so AVIF will never be produced; disabling the flag removes the notice entirely

Copilot AI and others added 2 commits May 8, 2026 19:03
…droid build

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/22ad4886-6c84-4ea8-b975-2654d5b0fbe0

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
…e once, emit single notice

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/fcf5dc5e-2e92-4d0c-8801-1631be372104

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

gitar-bot Bot commented May 8, 2026

Copy link
Copy Markdown

Gitar is working

Gitar

…able on CI runners)

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/1e430bc2-0512-43d3-8f3d-6bea53471ae6

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
Copilot AI requested a review from winnerspiros May 8, 2026 19:59
@winnerspiros
winnerspiros marked this pull request as ready for review May 8, 2026 20:14
Copilot AI review requested due to automatic review settings May 8, 2026 20:14
@winnerspiros
winnerspiros merged commit ec8c98e into master May 8, 2026
22 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 aims to reduce noisy/unstable build output in Android Release builds by (1) preventing AVIF conversion attempts when the required encoder isn’t available and (2) avoiding an ILLinker crash triggered by trim-analysis warning emission.

Changes:

  • Added a cached libsvtav1 availability probe to the resource optimizer, and gate AVIF conversion on it (with a single upfront notice when unavailable).
  • Suppressed trim-analysis warnings in Android Release builds to avoid an ILLinker IL1012 fatal crash.
  • Disabled jpeg_avif_enabled in the CI resource-optimizer config to prevent futile AVIF conversion attempts on runners.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
scripts/optimize_resource_overrides.py Adds a one-time libsvtav1 probe and uses it to skip AVIF (reducing warning spam).
osu.Android.props Sets SuppressTrimAnalysisWarnings=true in Release to prevent ILLink IL1012 crash.
.github/resource-optimizer/config.json Disables AVIF output in CI resource optimization configuration.

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

)
_svtav1_available_cache = True
except (subprocess.CalledProcessError, FileNotFoundError):
_svtav1_available_cache = False
Comment on lines 199 to 203
)
temp_candidates.append((p_avif, f"{src_label}-avif-svtav1-crf{avif_crf}-p{avif_preset}", False, ".avif"))
except subprocess.CalledProcessError:
# Log a warning so the operator knows AVIF was requested but unavailable.
print(f"::warning::AVIF requested for {relative_path} but libsvtav1 encode failed; falling back to WebP.")
p_avif.unlink(missing_ok=True)

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