Do not update composition target when rendering is stopped by MrJul · Pull Request #21192 · AvaloniaUI/Avalonia (original) (raw)
…from Android rotation
On 12.0.1 the Android render thread threw OpenGlException ("Window 0 is invalid") on every screen rotation when Android destroyed the SurfaceView's EGL window, then never recovered — .NET process stayed alive but no UI redrew. Result: app shows as grey in the recents switcher for several minutes, then the OS kills + restarts it.
12.0.2 carries AvaloniaUI/Avalonia#21192 ("Do not update composition target when rendering is stopped"), which lets Avalonia recreate the SurfaceView with the new orientation after surfaceDestroyed. 12.0.3 is a security-only SharpCompress bump (transitively used by Avalonia.VncSharp; we don't use that, but no reason to lag).
Verified on R52TB090VAK tablet:
20:21:58.878 SurfaceView: surfaceDestroyed 20:21:58.897 Exception in render loop (one throw) 20:22:01.247 SurfaceView: surfaceCreated 2560x1600 (NEW) 20:22:03.121 [RenderBudget] frames=61 (recovered)
UI returns rotated and rendering at 61 fps within ~3 s of rotation. Avalonia.Controls.DataGrid stays at 12.0.0 (no 12.0.x release).
dotnet test: 1,366 pass / 0 fail / 2 skipped.
Bumps version to 26.4.131.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com