Random exceptions - SfGuage
Hi,
Could you please check and advise the fix for below random exceptions. The controls are updated from nuget as well.
Thanks.
Exception 1
Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.*** at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x00105] in <65ee9686e7104ac1bf9d2aea72d18981>:0
at System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) [0x00000] in <65ee9686e7104ac1bf9d2aea72d18981>:0
at Xamarin.Forms.ResourceDictionary.TryGetValueAndSource (System.String key, System.Object& value, Xamarin.Forms.ResourceDictionary& source) [0x00003] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.ResourceDictionary.TryGetValue (System.String key, System.Object& value) [0x00000] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.ResourcesExtensions.TryGetResource (Xamarin.Forms.IElement element, System.String key, System.Object& value) [0x00070] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.Element.OnSetDynamicResource (Xamarin.Forms.BindableProperty property, System.String key) [0x00015] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.BindableObject.SetDynamicResource (Xamarin.Forms.BindableProperty property, System.String key, System.Boolean fromStyle) [0x00066] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.BindableObject.SetDynamicResource (Xamarin.Forms.BindableProperty property, System.String key) [0x00000] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.Element.SetDynamicResource (Xamarin.Forms.BindableProperty property, System.String key) [0x00000] in <d94e2f1a85914d9da1fd09356f374550>:0
at Syncfusion.XForms.Themes.ThemeElement.InitializeThemeResources (Xamarin.Forms.Element element, System.String controlKey) [0x00021] in <e9e9065d98bc428d8e3a0c61b91dc82b>:0
at Syncfusion.SfGauge.XForms.Header..ctor () [0x00006] in <f6b4031fcd5b44019def4a91c12f1d89>:0
Exception 2
Index was outside the bounds of the array.
at System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) [0x0000c] in <65ee9686e7104ac1bf9d2aea72d18981>:0
at Xamarin.Forms.ResourceDictionary.TryGetValueAndSource (System.String key, System.Object& value, Xamarin.Forms.ResourceDictionary& source) [0x00003] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.ResourceDictionary.TryGetValue (System.String key, System.Object& value) [0x00000] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.ResourceDictionary.TryGetMergedDictionaryValue (System.String key, System.Object& value, Xamarin.Forms.ResourceDictionary& source) [0x0001a] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.ResourceDictionary.TryGetValueAndSource (System.String key, System.Object& value, Xamarin.Forms.ResourceDictionary& source) [0x00032] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.ResourceDictionary.TryGetValue (System.String key, System.Object& value) [0x00000] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.ResourcesExtensions.TryGetResource (Xamarin.Forms.IElement element, System.String key, System.Object& value) [0x00070] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.Element.OnSetDynamicResource (Xamarin.Forms.BindableProperty property, System.String key) [0x00015] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.BindableObject.SetDynamicResource (Xamarin.Forms.BindableProperty property, System.String key, System.Boolean fromStyle) [0x00066] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.BindableObject.SetDynamicResource (Xamarin.Forms.BindableProperty property, System.String key) [0x00000] in <d94e2f1a85914d9da1fd09356f374550>:0
at Xamarin.Forms.Element.SetDynamicResource (Xamarin.Forms.BindableProperty property, System.String key) [0x00000] in <d94e2f1a85914d9da1fd09356f374550>:0
at Syncfusion.XForms.Themes.ThemeElement.InitializeThemeResources (Xamarin.Forms.Element element, System.String controlKey) [0x00031] in <c85a8166e4714f6183bf06e6bdc31824>:0
at Syncfusion.SfGauge.XForms.Header..ctor () [0x00006] in <5b9d69fbe5274a5da16dee1c7ccf3102>:0
Hi Raaz,
Based on the shared information and stack trace details, we have checked the issue related to the "Exception occurred in XForms SfCircularGauge control." We created a simple sample using CircularGaugeHeader and applied color to the header using the Sync theme. In our testing, it functioned as expected without any issues. Please find the sample from the attached link
Tested version:
28.1.41
Tested devices:
POCO X5 Pro 5G
Windows machine
Output Screenshots:
|
|
|
Please check the sample and let us know if you still
facing the same issue? If not, please modify the sample based on your scenario
and revert us with following details,
Syncfusion Version
Exception reproducing video or Code snippet
On which platform(s) (Android, iOS, Windows, etc.) are you experiencing the exception?
It will be helpful
for us to check on it and provide you solution at the earliest.
Regards,
Indumathi R
Attachment: CircularGaugeDemo_e374f2fb.zip
Hi Indumathi,
Thank you for your reply, appreciated.
It is quite difficult to reproduce in sample project as these exception appears in our logs and in firebase, happened to 1 out of 1000 end users as it works as expected most of the time.
It appears on Android.
These exceptions shared above are in the hope that syncfusion team can analyze as its probably related to the merged resources.
Below is the additional information
On button click on Change theme
If (currentTheme == "Dark")
App.Current.Resources = new ThemeLight();
In App.xaml
<Application.Resources>
<ResourceDictionary Source="/Themes/ThemeLight.xaml" />
</Application.Resources>
In ThemeLight.xaml
<ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Project.Themes.ThemeLight"
xmlns:syncTheme="clr-namespace:Syncfusion.XForms.Themes;assembly=Syncfusion.Core.XForms"
xmlns:synccalendar="clr-namespace:Syncfusion.SfCalendar.XForms;assembly=Syncfusion.SfCalendar.XForms"
xmlns:syncgauge="clr-namespace:Syncfusion.SfGauge.XForms;assembly=Syncfusion.SfGauge.XForms"
xmlns:syncbutton="clr-namespace:Syncfusion.XForms.Buttons;assembly=Syncfusion.Buttons.XForms">
<ResourceDictionary.MergedDictionaries>
<syncTheme:LightTheme />
<synccalendar:SfCalendarStyles />
<syncgauge:SfCircularGaugeStyles />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Label">
<Setter Property="TextColor" Value="#1c1e21" />
<Setter Property="FontSize" Value="15" />
</Style>
.
.
.
.
.
</ResourceDictionary>
Hi Raaz,
Thank you for sharing the details. Based on the provided information, we will analyze the scenario and update you with further details as soon as possible. We appreciate your patience in the meantime.
Regards,
Vishal O.
Hi Raaz,
We have branched a new ticket for your recent update under your account. Please follow the ticket for further updates regarding the query.
Regards,
Vishal O.
- 4 Replies
- 3 Participants
-
RA Raaz
- Jan 25, 2025 03:35 PM UTC
- Feb 5, 2025 06:55 AM UTC