## Summary
On Android, an intermittent **`System.ArgumentOutOfRangeException`** crashes the app
(unhandled) during heavy UI re-layout of a page that contains Telerik `RadEntry` and
`RadButton` controls. The exception originates inside Telerik's `RadBorder` re-parenting a
`SolidColorBrush` (`RadBorder.OnBorderBrushPropertyChanging/Changed` → MAUI
`Element.SetParent` → `RemoveResourcesChangedListener`). It is consistently preceded by a
fixed sequence of framework warnings (below). It reproduces on multiple devices and is
timing/memory dependent (more frequent on lower-RAM hardware).
## Environment
- Telerik UI for .NET MAUI: **10.0.0**
- .NET MAUI (Microsoft.Maui.Controls): **9.0.90**
- .NET runtime: **9.0.16**
- Target: `net9.0-android35.0`, min Android API 26; Build configuration: **Release**
- Observed on, among others: Samsung **SM-A156E** (Android 16), **itel P10004L** (Android 14)
- Also reproduces as a **handled** (non-fatal) exception on page teardown — same stack.
## Exception & stack trace
`System.ArgumentOutOfRangeException: ArgumentOutOfRange_IndexMustBeLess Arg_ParamName_Name, index`
```
System.Collections.Generic.List<Action<object, ResourcesChangedEventArgs>>.RemoveAt(int)
System.Collections.Generic.List<Action<object, ResourcesChangedEventArgs>>.Remove(Action<...>)
Microsoft.Maui.Controls.Element.Microsoft.Maui.Controls.IElementDefinition.RemoveResourcesChangedListener(...) Element.cs:447
Microsoft.Maui.Controls.Element.SetParent(Element value) Element.cs:405
Microsoft.Maui.Controls.Element.set_Parent(Element value) Element.cs:384
Telerik.Maui.Controls.RadBorder.OnBorderBrushPropertyChanging(object oldValue) (In app — Telerik)
static RadBorder()+(BindableObject b, object o, object n) => { } (In app — Telerik)
Microsoft.Maui.Controls.BindableObject.SetValueActual(...) BindableObject.cs:640
... (style/binding apply) ...
Microsoft.Maui.Controls.Setter.Apply / Style.ApplyCore / MergedStyle.SetStyle
Telerik.Maui.Controls.RadButtonBase.set_ActualStyle(Style value) (In app — Telerik)
Telerik.Maui.Controls.RadButtonBase.UpdateActualStyle(...)
Telerik.Maui.Controls.RadButtonBase.OnStyleChanged(...) (In app — Telerik)
... BindingExpression.Apply → Dispatcher.DispatchImplementation → RunnableImplementor.Run
```
(The same stack appears both as an **unhandled** crash and, on page teardown, as a **handled**
exception.)
## Framework warnings that ALWAYS precede the crash (in order)
```
BindingDiagnostics: 'BorderColor' property not found on 'Telerik.Maui.Controls.RadEntry',
target property: 'Telerik.Maui.Controls.RadBorder.BorderColor'
Element (warning): The RealParent on Microsoft.Maui.Controls.SolidColorBrush has been
Garbage Collected. This should never happen. Please log a bug:
https://github.com/dotnet/maui
Element (warning): Microsoft.Maui.Controls.SolidColorBrush is already a child of
Telerik.Maui.Controls.RadEffectsView. Remove ... before adding ... (x many)
Element (warning): Microsoft.Maui.Controls.SolidColorBrush is already a child of
Telerik.Maui.Controls.RadBorder. Remove ... before adding ...
```
## Reproduction
1. A `ContentPage` inside a `NavigationPage` containing several Telerik `RadEntry` and
`RadButton` controls, styled via **implicit styles** that set `BorderBrush` across multiple
`VisualState`s (Normal/Focused/Invalid/ReadOnly/…). No custom `ControlTemplate` is applied;
only `BorderBrush` (and background/text) setters.
2. Interact with the page, then trigger a re-layout one of two ways:
- **Resume:** background the app (e.g. launch another app), then return →
`Window.Resumed`/`Activated` re-applies styles. → tends to be the **unhandled** crash.
- **Teardown:** navigate away from / destroy the page (`Window.Destroying`). → tends to be
the **handled** exception.
3. Intermittently (timing/memory dependent; more often on lower-RAM devices) the warning burst
above appears, immediately followed by the exception.
## Our analysis (why we believe this is in the Telerik template)
- The throw originates from `RadBorder.OnBorderBrushPropertyChanging/Changed` re-parenting a
`SolidColorBrush` (`Element.SetParent` → `RemoveResourcesChangedListener`).
- The preceding **`'BorderColor' not found on RadEntry → RadBorder.BorderColor`** binding is
*internal to the RadEntry control template* — `RadEntry` exposes `BorderBrush`, not
`BorderColor`, and we do not define a custom RadEntry template; we only set `BorderBrush` via
styles.
- The repeated **"SolidColorBrush is already a child of RadEffectsView / RadBorder"** indicates
the same brush instance is being re-parented within the Telerik visual tree on every style
re-apply, which trips the underlying MAUI weak-reference defect ("RealParent … Garbage
Collected") and corrupts the resource-changed-listener list.
## What we have ruled out
- **Not forced GC** — our only `GC.Collect()` calls are `#if DEBUG`; production has none. The
GC clearing the brush's RealParent is the *natural* GC.
- **Not the Windows/SkiaSharp/RadDataGrid variant** of the "already a child" warning — this is
Android and no `RadDataGrid` is involved.
- **Not app-side brush sharing** — our border color resources are `<Color>` (not shared
`SolidColorBrush` instances), and we set `BorderBrush`, not a custom `RadBorder`/template.
## Questions
1. Is the RadEntry template's internal `RadBorder.BorderColor` binding to a (non-existent)
`RadEntry.BorderColor` a known issue? Should it target `BorderBrush`?
2. Why does the RadEntry/RadButton template re-parent the *same* `SolidColorBrush` across
`RadEffectsView`/`RadBorder` on each style/visual-state apply (the "already a child"
warnings)? Can the template avoid re-parenting shared brushes?
3. Is there a Telerik UI for .NET MAUI 10.x release that addresses RadBorder/RadEntry brush
re-parenting on style re-apply / the listed warnings?
4. Recommended mitigation for `RadEntry`/`RadButton` styling to minimize this re-parent churn
(e.g. preferred way to set border brush per visual state)?
## Related public reports (MAUI side)
- dotnet/maui #25739, #23050, #28608 — "The RealParent on … has been Garbage Collected" — same
underlying weak-reference defect; mostly closed without a fix, hence reporting via Telerik as
the template owner.
Component: SignaturePad
Version: Telerik UI for .NET MAUI 12.0.0 .NET: .NET 10 / .NET MAUI
Platform: Reproduced on iOS (iPad, iPhone) and Android (Samsung). Cross-platform — bug is in the shared SingleTouchSegmentProvider, not in a platform-specific touch handler.
RadSignaturePad crashes the app with an unhandled InvalidOperationException: "Sequence contains no elements" thrown from the touch event pipeline. Because the exception originates inside the native→managed touch callback, it cannot be caught by user code and propagates to AppDomain.CurrentDomain.UnhandledException, terminating the app.
The root cause is a .Last() call on an empty segment collection inside SingleTouchSegmentProvider.OnTouch. The crash occurs in both TouchesMoved and TouchesEnded paths, indicating a missing guard at the central OnTouch entry point — not in a specific touch phase.
RadSignaturePad and a separate button that invokes signaturePad.ClearCommand.→ TouchesMoved fires after ClearCommand has emptied the internal segment collection. SingleTouchSegmentProvider.OnTouch calls .Last() on the empty collection and throws.
Reproduced on:
The same crash also occurs on TouchesEnded in less deterministic scenarios — palm rejection, multi-touch cancellation, Apple Pencil hover-to-touch transitions, or a touch that begins outside the view and ends inside it. All of these can deliver a touch event without a corresponding active segment. We've observed this variant in production on iPad but could not reliably reproduce it in isolation.
System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.Last[Segment](IEnumerable`1 source)
at Telerik.Maui.Controls.SignaturePad.SingleTouchSegmentProvider.OnTouch(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignaturePad.SegmentProvider.TouchRecognizer_Touch(Object sender, InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignatureView.OnTouch(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignatureViewHandler.<ConnectHandler>b__3_0(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.FireEvent(InteractionAction actionType, UITouch touch)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.TouchesMoved(NSSet touches, UIEvent evt)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.__Registrar_Callbacks__.callback_1171_..._TouchesMoved(IntPtr pobj, IntPtr sel, IntPtr p0, IntPtr p1, IntPtr* exception_gchandle)
System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.Last[Segment](IEnumerable`1 source)
at Telerik.Maui.Controls.SignaturePad.SingleTouchSegmentProvider.OnTouch(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignaturePad.SegmentProvider.TouchRecognizer_Touch(Object sender, InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignatureView.OnTouch(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignatureViewHandler.<ConnectHandler>b__3_0(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.FireEvent(InteractionAction actionType, UITouch touch)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.TouchesEnded(NSSet touches, UIEvent evt)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.__Registrar_Callbacks__.callback_1162_..._TouchesEnded(IntPtr pobj, IntPtr sel, IntPtr p0, IntPtr p1, IntPtr* exception_gchandle)
<telerik:RadSignaturePad
x:Name="signaturePad"
StrokeThickness="5"
StrokeColor="Black"
BackgroundColor="White" />
<Button Text="Clear" Clicked="OnClearClicked" />
void OnClearClicked(object s, EventArgs e)
{
if (signaturePad.ClearCommand.CanExecute(null))
signaturePad.ClearCommand.Execute(null);
}
No custom touch handlers, no SegmentProvider override, no gestures attached.
SingleTouchSegmentProvider.OnTouch should guard against an empty segment collection (e.g. .LastOrDefault() + null check, or an early return when no active segment exists). Touch events arriving after a Clear — or without a preceding TouchesBegan — should be ignored, not throw.
We disable the Clear button while a stroke is active (toggled in StrokeStarted / StrokeCompleted). This closes the deterministic repro but does not cover the non-deterministic TouchesEnded cases (palm rejection etc.), which still crash. A fix in SingleTouchSegmentProvider.OnTouch is required.
App crash on a customer-visible workflow (digital signature capture on service tickets). Affects production users on iPads, iPhones, and Android devices.
SignatureViewTouchHandler or SegmentProvider so we can guard OnTouch from user code?After upgrading from Telerik UI for .NET MAUI 13.0.0 → 13.2.0, a NullReferenceException is thrown inside SchedulerAgendaView.Init() on Windows (WinUI3) whenever a RadScheduler with an AgendaViewDefinition is used. The scheduler never renders and the app receives an unhandled exception.
Steps to Reproduce:
ContentPage (or any page) with a RadScheduler in XAML, including at least one AgendaViewDefinition in ViewDefinitions:<telerik:RadScheduler AppointmentsSource="{Binding Appointments}">
<telerik:RadScheduler.ViewDefinitions>
<telerik:AgendaViewDefinition />
<telerik:DayViewDefinition />
</telerik:RadScheduler.ViewDefinitions>
</telerik:RadScheduler>
Expected Behavior:
The scheduler renders correctly with the AgendaViewDefinition, as it did in 13.0.0.
Actual Behavior:
An unhandled NullReferenceException is thrown:
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Maui.Controls.Scheduler.SchedulerAgendaView.Init()
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__124_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()
Root Cause Analysis (via ILSpy decompilation):
Comparing the decompiled assemblies of 13.0.0 and 13.2.0 reveals a new override in RadScheduler introduced in 13.2.0:
// NEW in 13.2.0 — not present in 13.0.0:
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
base.OnPropertyChanged(propertyName);
if (propertyName == "Parent" && Parent != null && !IsLoaded)
UpdateActiveViewDefinition();
}
This causes the following call chain to be triggered during InitializeComponent() in the page constructor — before the page is attached to a window:
RadScheduler to the page → Parent property changesOnPropertyChanged("Parent") fires → UpdateActiveViewDefinition() is calledActiveViewDefinition = ViewDefinitions[0] (the AgendaViewDefinition)OnActiveViewDefinitionChanged() → content.Rebuild() (template already applied on WinUI3)SchedulerAgendaView.Model setter → Init() is called as async voidInit(), after the first await, the continuation runs and DataBindingComplete firescompleteHandler inside Init() calls:((BindableObject)this).Dispatcher.Dispatch(async delegate { ... });
Dispatcher is null because the SchedulerAgendaView is not yet attached to a window → NullReferenceExceptionThe exception is captured by the async void state machine and re-thrown via SynchronizationContext.ThrowAsync → DispatcherQueueSynchronizationContext.Post, which matches the observed stack trace exactly.
Why it worked in 13.0.0: UpdateActiveViewDefinition() was never called from OnPropertyChanged. It was only invoked after IsLoaded = true, at which point Dispatcher is guaranteed to be non-null.
Why the condition !IsLoaded is insufficient: Parent != null does not imply a window is present. During InitializeComponent(), the element has a parent in the logical tree but is not yet attached to any Window, making Dispatcher null on BindableObject.
Workaround:
Do not declare ViewDefinitions in XAML. Instead, add them programmatically in the page's Loaded event handler, at which point Dispatcher is guaranteed to be available:
private void OnPageLoaded(object sender, EventArgs e)
{
if (scheduler.ViewDefinitions.Count == 0)
{
scheduler.ViewDefinitions.Add(new AgendaViewDefinition());
scheduler.ViewDefinitions.Add(new DayViewDefinition());
scheduler.ViewDefinitions.Add(new WeekViewDefinition());
scheduler.ViewDefinitions.Add(new MonthViewDefinition());
}
}
Suggested Fix:
Either:
Option A — Guard Dispatcher usage inside SchedulerAgendaView.Init():
// In completeHandler, before calling Dispatch:
if (((BindableObject)this).Dispatcher is { } dispatcher)
dispatcher.Dispatch(...);
Option B — Guard UpdateActiveViewDefinition() in RadScheduler.OnPropertyChanged to only run when content (the internal RadSchedulerContent) has already been set (i.e., template was applied):
if (propertyName == "Parent" && Parent != null && !IsLoaded && content != null)
UpdateActiveViewDefinition();
Option B is more conservative and closer to the original 13.0.0 behavior, since content being non-null implies the template has been applied and Dispatcher is available.
Environment:
| Telerik UI for .NET MAUI | 13.2.0 (regression from 13.0.0) |
| .NET | .NET 10 |
| Platform | Windows (WinUI3) |
| MAUI | 10.0.60 |
when building an app without explicitly setting the target platform, the following error appears:
The type or namespace name 'Compatibility' does not exist in the namespace 'Telerik.Maui.Controls' (are you missing an assembly reference?)
The Telerik.Maui.Controls.Compatibility dll is missing from the .net9/10 shared folders
When navigating to a page with a RadRichTextEditor, it sometimes pops up an error on page load. It is inconsistent, but I attached an example gif. The xaml on the page I'm navigating to is basic:
<Grid Margin="20">
I believe this problem started with MAUI version 9.0.70. Possibly with one of these changes:
https://github.com/dotnet/maui/pull/27003/files
https://github.com/dotnet/maui/pull/28354/files
I have a user who reported a crash. In Sentry, I see this:
System.NullReferenceException: Object reference not set to an instance of an object.
?, in void TelerikLicense.ShowLicenseMessage(Page page)
?, in void TelerikLicense.VerifyLicense(Element element)+() => { }
?, in void TelerikLicense.ExecuteActionOnLoaded(Page page, Action action)
?, in void TelerikLicense.VerifyLicense(Element element)
?, in object <InitializeComponent>_anonXamlCDataTemplate_21.LoadDataTemplate()
?, in object ElementTemplate.CreateContent()
?, in void BindableLayoutController.CreateChildren()
?, in NotifyCollectionChangedAction NotifyCollectionChangedEventArgsExtensions.Apply(NotifyCollectionChangedEventArgs self, Action<object, int, bool> insert, Action<object, int> removeAt, Action reset)
?, in void BindableLayoutController.ItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
?, in void WeakNotifyCollectionChangedProxy.OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
File "ObservableCollection.cs", line 192, in void ObservableCollection<T>.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
handler(this, e);
?, in void ExtObservableCollection<T>.RaiseCollectionChanged()
the app was built with a successful license-check
Telerik.Licensing 1.6.6
When using Telerik controls, I got the following warning:
Not linking with the framework OpenGLES referenced by a module reference in SkiaSharp.Views.iOS.dll
when I add a SkiaSharp 3.116.1 version to the project, the warning disappear.
Please update the SkiaSharp package reference in the Telerik MAUI NuGet package
I would like to draw attention to this at an early stage.
When using MAUI Nightly 8.0.20-nightly.10376, the app crashes immediately upon startup if you set Telerik Popup Settings in the MAUI Styles
See min repro example https://github.com/baaaaif/MauiNightlyCrash
<MauiVersion>8.0.20-nightly.10376</MauiVersion><Style TargetType="telerik:RadTimePicker">
<Setter Property="PopupSettings">
<Setter.Value>
<telerik:PickerPopupSettings IsHeaderVisible="False" />
</Setter.Value>
</Setter>
</Style>From the inner Exception...:
| Name | Value | Type | |
|---|---|---|---|
| ◢ | InnerException | {"Object reference not set to an instance of an object."} | System.Exception {System.NullReferenceException} |
at Microsoft.Maui.Controls.AppThemeBinding.AppThemeProxy..ctor(Element parent, AppThemeBinding binding) at Microsoft.Maui.Controls.AppThemeBinding.Apply(Object context, BindableObject bindObj, BindableProperty targetProperty, Boolean fromBindingContextChanged, SetterSpecificity specificity) at Microsoft.Maui.Controls.BindableObject.SetBinding(BindableProperty targetProperty, BindingBase binding, SetterSpecificity specificity) at Microsoft.Maui.Controls.BindableObject.SetBinding(BindableProperty targetProperty, BindingBase binding) at Microsoft.Maui.Controls.BindableObjectExtensions.SetAppTheme[T](BindableObject self, BindableProperty targetProperty, T light, T dark) at Microsoft.Maui.Controls.BindableObjectExtensions.SetAppThemeColor(BindableObject self, BindableProperty targetProperty, Color light, Color dark) at Telerik.Maui.Controls.PickerPopupSettings.OnPopupOutsideBackgroundColorPropertyChanged(Color color) at Telerik.Maui.Controls.PickerPopupSettings..ctor() at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
When adding Telerik controls on the page and run the app on android, the following error message occurs runtime:
Java.Lang.RuntimeException stack trace --- java.lang.RuntimeException: Font asset not found /data/user/0/com.companyname.appname/cache/telerikfont.ttf at android.graphics.Typeface.createFromAsset(Typeface.java:1061)
............
This error message does not prevent the app from working as expected, but the log is full of this message.
When creating a .NET MAUI blank net 9 template and adding for example PDF toolbar, the toolbar icons do not display as the app is build as unpackaged.
Solution:
Change the package type in the .csproj file:
from:
<WindowsPackageType>None</WindowsPackageType>
to:
<WindowsPackageType>MSIX</WindowsPackageType>
Dear Telerik-Team
with the new version 9.0.0 on Android the Scheduler doesn't display the Date/Timepicker on creating/editing an new appointment. The Date/Timepicker Popup is only displayed when the "EditAppointmentDialog" is closed. You can easy reproduce it. Just add the Scheduler to a plain project.
I have attached a VS solution where you can reproduce it.
Thanks for helping/fixing it as soon as possible. I need this new version becasue of another bugfix for scheduler in it...
as per the instruction here : https://docs.telerik.com/devtools/maui/demos-and-sample-apps/overview#sdkbrowser-app
files - SwitchToNet8.ps1 and SwitchToNet9.ps1 does not exists in repository
After updating our Maui application to Maui version 8.0.90, the Entry controls in the WinUI version stopped responding to WidthRequest, HorizontalOptions, or parent container sizes. I thought it was just a Maui problem, but in the relevant issue's notes, I saw that users were having trouble duplicating it unless Telerik UI for .NET Maui was installed (https://github.com/dotnet/maui/issues/24783).
So I created a test app that contains a few Entry controls in various containers:
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="WinUIEntryBug.MainPage">
<ScrollView>
<VerticalStackLayout
Padding="30,0"
Spacing="25">
<Border>
<Entry />
</Border>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Entry Grid.Column="0"></Entry>
</Grid>
<Frame>
<Entry />
</Frame>
<Entry />
</VerticalStackLayout>
</ScrollView>
</ContentPage>Without the Telerik components added to the project, the Entry boxes render correctly:
But, when I add a reference to Telerik UI for .NET Maui version 7.1.0 (latest at the time this was written), I get this:
Note: I didn't even add UseTelerik() to the Builder in the MauiProgram.cs, just added the Nuget package.
Changing the WidthRequest, HorizontalOptions, MinWidthRequest, etc. does not affect their size. They do render correctly in iOS and Android, though.
If I then remove the UI for .NET Maui Nuget package, they go back to working.
In our main application, we are heavily dependent on Telerik components and have a substantial number of customers using the Windows version of our application, so this heavily impacts our ability to ship. Particularly since the Maui 8.0.90 fixes other bugs that we needed addressed.
I've attached my sample project with the Telerik UI for .NET Maui package installed. You can remove it to see the normal operation of the Entry boxes.
"System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Maui.Controls.Compatibility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.'"
Occurs when creating a blank .net maui project using .net9 and adding Telerik MAUI NuGet Package latest version 8.0.0
Repro steps:
1. Create a new dotnet9 basic project in visual studio. 2. Launch it on windows. it runs. 3. Add the Telerik.UI.for.Maui.Trial package, version 8. (don't bother adding the UseTelerik line to MauiProgram.cs, it'll fail either way). 4. Clean and Rebuild the solution. 5. Debug the app on windows again. It fails on launch with a file not found error that seems to relate to: "Exception thrown: 'System.IO.FileNotFoundException' in Telerik.Maui.Controls.Compatibility.dll" System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Maui.Controls.Compatibility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.'