We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

UWP exception on release

Thread ID:





142732 Feb 17,2019 06:05 PM UTC Feb 18,2019 07:09 AM UTC Xamarin.Forms 2
Tags: SfChart
Asked On February 17, 2019 06:05 PM UTC


I am getting often below exception in my release version. I am not sure how to handles this. it looks like that it has something to do with  Syncfusion.UI.Xaml.Charts.ChartDockPanel.MeasureOverride(Size) . below is i implement sfchart and stacktrace

                <chart:SfChart x:Name="Chart" SelectionChanged="Chart_SelectionChanged" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"  

                        <chart:ChartTitle Text="{Binding ChartTitle}"/>


                        <chart:DateTimeCategoryAxis AutoScrollingDelta="7"   AutoScrollingMode="End"  >


                                <chart:ChartAxisTitle Text="{resx:Translate Date}"></chart:ChartAxisTitle>




                        <chart:NumericalAxis  Minimum="0" Maximum="{Binding NumericalAxisMax}" Interval="{Binding NumericalAxisInterval}" >


                                <chart:ChartAxisTitle Text="{Binding NumericalAxisTitle}" ></chart:ChartAxisTitle>





                        <chart:LineSeries EnableDataPointSelection="{Binding EnableDataPointSelection}"  XBindingPath="XValue" YBindingPath="YValue" 
                                  SelectedDataPointColor="Yellow"  ItemsSource="{Binding NumericMonthStats, Mode=OneWay}"  EnableAnimation = "true"
                                  AnimationDuration="0.8" >


                        <chart:ChartZoomPanBehavior EnableSelectionZooming="True"/>



   at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x20   
   at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Size) + 0xc7   
   at __Interop.ForwardComStubs.Stub_32[TThis](__ComObject, Size, Int32) + 0x2d 
   at Syncfusion.UI.Xaml.Charts.ChartDockPanel.MeasureOverride(Size) + 0x1e4    
   at Windows.UI.Xaml.FrameworkElement.global::Windows.UI.Xaml.IFrameworkElementOverrides.MeasureOverride(Size) + 0xa  
   at myApp.UWP!<BaseAddress>+0x38b40a0     at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x20
   at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Size, Void*) + 0xce     at __Interop.ForwardComStubs.Stub_64[TThis]
   (__ComObject, Size, Int32) + 0x47     at Syncfusion.UI.Xaml.Charts.SfChart.MeasureOverride(Size) + 0x29e     
   at Windows.UI.Xaml.FrameworkElement.global::Windows.UI.Xaml.IFrameworkElementOverrides.MeasureOverride(Size) + 0xa   
   at myApp.UWP!<BaseAddress>+0x38b40a0     at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x20
   at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Size) + 0xc7 
   at __Interop.ForwardComStubs.Stub_32[TThis](__ComObject, Size, Int32) + 0x2d  
   at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.GetDesiredSize(Double, Double) + 0xb6 
   at Xamarin.Forms.Platform.UWP.Platform.Xamarin.Forms.Internals.IPlatform.GetNativeSize(VisualElement, Double, Double) + 0x9c 
   at Xamarin.Forms.VisualElement.OnSizeRequest(Double, Double) + 0x7a     at Syncfusion.SfChart.XForms.SfChart.OnMeasure(Double, Double) + 0x71   
   at Xamarin.Forms.VisualElement.GetSizeRequest(Double, Double) + 0x18f  
   at Xamarin.Forms.VisualElement.Measure(Double, Double, MeasureFlags) + 0x18e   
   at Xamarin.Forms.StackLayout.CalculateNaiveLayout(StackLayout.LayoutInformation, 
   StackOrientation, Double, Double, Double, Double) + 0x210    
   at Xamarin.Forms.StackLayout.CalculateLayout(StackLayout.LayoutInformation, Double, Double, Double, Double, Boolean) + 0x12c 
   at Xamarin.Forms.StackLayout.LayoutChildren(Double, Double, Double, Double) + 0xd8    
   at Xamarin.Forms.Layout.UpdateChildrenLayout() + 0x5a5    
   at Xamarin.Forms.Layout.OnSizeAllocated(Double, Double) + 0xf   
   at Xamarin.Forms.Layout.<>c.<OnChildMeasureInvalidated>b__45_0() + 0x1a3    
   at System.Action.Invoke() + 0x18     at Xamarin.Forms.Command.<>c__DisplayClass4_0.<.ctor>b__0(Object) + 0x10    
   at Windows.UI.Core.DispatchedHandler.Invoke() + 0x25     at myApp.UWP!<BaseAddress>+0x386b58c 
   at Xamarin.Forms.Platform.UWP.TaskExtensions.<>c.<WatchForError>b__2_1(Object) + 0x1c     at System.Action`1.Invoke(T) + 0x1b  
   at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() + 0x30   
   at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x20  
   at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32) + 0xb8     at __Interop.ForwardComStubs.Stub_15[TThis](__ComObject, Int32) + 0x24 
   at Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<.ctor>b__17_1(Object, UnhandledErrorDetectedEventArgs) + 0x3d 
   --- End of stack trace from previous location where exception was thrown ---     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21     at Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<.ctor>b__17_1(Object, UnhandledErrorDetectedEventArgs) + 0x75     at System.EventHandler`1.Invoke(Object, TEventArgs) + 0x1b     at __Interop.Intrinsics.HasThisCall__32[TArg0](Object, IntPtr, Object, TArg0) 
   + 0x36     at myApp.UWP!<BaseAddress>+0x3865110  

Bharathiraja K [Syncfusion]
Replied On February 18, 2019 06:42 AM UTC

Hi Emil, 
Greetings from Syncfusion. We have tried to replicate the reported issue at our end by creating a sample with the provided code snippet, we are afraid that, we are not able to reproduce the issue at our end. Its working fine without any exception in Xamarin.Forms.UWP. 
Please find the tested sample below.   
Since we are not aware of your exact application scenario, we are not able to reproduce this issue at our end, so can you please revert us by modifying the sample based on your application along with replication procedure. This will be helpful for us to investigate further and provide you a better solution at the earliest. 

Bharathiraja K [Syncfusion]
Replied On February 18, 2019 07:09 AM UTC

Hi Emil, 
Greetings from Syncfusion, 
We have analysed your query and we would like to let you know that while using chart inside the FlexLayout directly without set size, chart is adjusting automatically while resizing the application.  
We have prepared a sample based by adding chart directly in FlexLayout and it can be downloaded from the below link. 
We can reproduce the reported issue, when adding the chart controls in the grid layout and add that grid to FlexLayout as a child without setting Width and Height to chart.  
Can you please confirm whether you are using the above scenario whether using chart in grid layout or directly added in FlexLayout?. If you confirm your use case scenario, we will validate the issue and provide you solution. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon