Skip to content

Issue 2617#2633

Open
AndreiGorelov wants to merge 3 commits intoCoderLine:developfrom
AndreiGorelov:feature/issue-2617
Open

Issue 2617#2633
AndreiGorelov wants to merge 3 commits intoCoderLine:developfrom
AndreiGorelov:feature/issue-2617

Conversation

@AndreiGorelov
Copy link
Copy Markdown

Issues

Fixes #2617

Proposed changes

  • AlphaTabRenderSurface — store render placeholders in a CopyOnWriteArrayList instead of ArrayList, so iterating during onLayout / updates cannot throw ConcurrentModificationException when partials are added or cleared during layout (e.g. rotation, scroll, resize).
  • EnvironmentPartials (Android) — run the coroutine scope used by throttle() on Dispatchers.Main instead of Dispatchers.Default, so throttled resize work runs on the UI thread and avoids concurrent use of layout/bounds data from a background dispatcher (related ConcurrentModificationException seen around BoundsLookup during resize).

Checklist

  • I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • New tests were added

No new automated tests: failures depend on Android layout timing and real-device interactions (rotation, scrolling). Verified manually on real devices.

Further details

  • This is a breaking change
  • This change will require update of the documentation/website

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.

Android ConcurrentModificationException in AlphaTabRenderSurface.onLayout

1 participant