- Home
- Forum
- Xamarin.Forms
- ARM64 compile issue
ARM64 compile issue
I wanted to compile my Xamarin.Forms app as ARM64, but compilation fails. From what I see is that ARM64 uses .Net Native even in Debug mode. Here compilation fails with random error messages.
I only compiled the UWP in debug mode as UWP is only used for debugging the code of XF app and main target is Android app.
Do syncfusion controls support ARM64/.Net Native?
I was not clear enough. I talk about compiling UWP project of XF app for ARM64. Here also debug uses .NETNative.
regards
André Ziegler
You need to add a ARM64 configuration:
| <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'"> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\ARM64\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS</DefineConstants> <NoWarn>;2008</NoWarn> <NoStdLib>true</NoStdLib> <DebugType>full</DebugType> <PlatformTarget>ARM64</PlatformTarget> <UseVSHostingProcess>false</UseVSHostingProcess> <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <DisableWin2DPlatformCheck>true</DisableWin2DPlatformCheck> <Use64Bitcompiler>true</Use64Bitcompiler> <SingleThreadNUTC>true</SingleThreadNUTC> </PropertyGroup> |
when I run the app, it crashes with NULLReferenceException when I set the datasource of a SfDataPager:
| System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.SfDataGrid.XForms.GridColumnSizer.GetHeaderCellWidth(GridColumn) + 0x1a4 at Syncfusion.SfDataGrid.XForms.GridColumnSizer.CalculateHeaderWidth(GridColumn, Boolean) + 0x44 at Syncfusion.SfDataGrid.XForms.GridColumnSizer.GetColumnAutoSizeWidth(GridColumn) + 0x4c at Syncfusion.SfDataGrid.XForms.GridColumnSizer.SetColumnWidthBasedOnGridColumnSizer(Double, List`1, GridColumn, Double) + 0x26c at Syncfusion.SfDataGrid.XForms.GridColumnSizer.CalculateColumnSizerWidth(Double) + 0xeac at Syncfusion.SfDataGrid.XForms.GridColumnSizer.Refresh(Double) + 0x94 at Syncfusion.SfDataGrid.XForms.GridColumnSizer.Refresh(Boolean) + 0x190 at Syncfusion.SfDataGrid.XForms.SfDataGrid.OnItemsSourceChanged(BindableObject, Object, Object) + 0xa18 at Xamarin.Forms.BindableProperty.BindingPropertyChangedDelegate.InvokeOpenStaticThunk(BindableObject, Object, Object) + 0x9c at Xamarin.Forms.BindableProperty.BindingPropertyChangedDelegate.Invoke(BindableObject, Object, Object) + 0xb4 at Xamarin.Forms.BindableObject.SetValueActual(BindableProperty, BindableObject.BindablePropertyContext, Object, Boolean, SetValueFlags, Boolean) + 0x450 at Xamarin.Forms.BindableObject.SetValueCore(BindableProperty, Object, SetValueFlags, BindableObject.SetValuePrivateFlags) + 0x5f8 at Xamarin.Forms.BindableObject.SetValue(BindableProperty, Object, Boolean, Boolean) + 0x1a8 at Xamarin.Forms.BindableObject.SetValue(BindableProperty, Object) + 0x40 at Syncfusion.SfDataGrid.XForms.SfDataGrid.set_ItemsSource(Object) + 0x5c |
I'll analyze this more.
You can repro this by enabling .net native for x86 debug and try to debug the x86 app.

For ARM64 .net native is used in debug and release mode for UWP apps.
Thank you for your update.
As we said we earlier we will update for ARM64 issue on 22nd Jan 2019. And we will update further details for the issue “Application crashed by enabling .Net Native for X86 debug” also on 22nd Jan 2019.
We appreciate your patience until then.
Regards,
Thank you for patience,
We have checked the reported issue “SfDataGrid crash in x86” in our latest source attach. Unfortunately issue not reproduced in source attach. We have attached the tested video for your reference. Currently We are implementing some codes in null possibilities area to check the issue in nuget and we will update you the details on 24th Jan 2020.
Video link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/Video_Reference_1505002107897692.zip
Please let us know which Xamarin Forms version your using?
Regards,
Karthik Raja
I use AutoGenerateColumns
ColumnSizer="Auto" SelectionMode="Single" VerticalOverScrollMode="None"> |
I use latest XF 4.4.0.991537. And I set source via
DataPager.Source = list;
DataGrid.ItemsSource = DataPager.PagedSource;
Thank you for your update.
Issue 1 : “Compilation fails in ARM64”
We are glad to know that the reported problem has been resolved at your end.
Issue 2 : “App crashes at runtime in UWP“
We have checked the reported issue with Xamarin Forms v4.4.0.991537 and we are unable to reproduce the issue in our end. We have attached the tested sample for your reference.
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataGridDemo2_150500-1243736447.zip
Please let us know the following details
i) What type of collections your bounded to SfDataPager.
ii) When you are setting the collection to SfDataPager.
iii) SfDataGrid Version
Regards,
Karthik Raja
My app always crashes, but inside your code, that I can't debug. Add some null checks and post via Debug.WriteLine() which value is NULL, so that I can tell you which value is NULL for me.
We have added some code null possibilities area in the below attached sample. So please run the application and update the output log and call stack details.
Regards,
Karthik Raja
My datatypes have nullable types and some are empty, in your demo, all data have value. Maybe this is the difference.
Thank you for the update,
We have checked with nullable value to OrderID column and Freight Column in the SfDataGrid. Unfortunately, we are unable to replicate the issue in this case also. So could you please check the sample and modify the sample based on your scenario or share your project to this mail id [email protected] we will maintain the confidentiality and get back to you at the earliest.
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/Modified_With_Nullable-990066727.zip
Regards,
Karthik Raja
I can't share the project, In my model I have public Nullable
// Edit:
I also hide columns AutoGeneratingColumn="DataGrid_AutoGeneratingColumn" private void DataGrid_AutoGeneratingColumn(object sender, AutoGeneratingColumnEventArgs e), here I hide ID columns and other entries that I don't need in grid.
Exception thrown: 'System.Reflection.MissingMetadataException' in System.Private.Interop.dll
Windows.Foundation.IReference`1
From what I understand this is the Nullable
I tried to add the generated output from this generator
like suggested from Microsoft but this also doesn't fix it.
Thank you for the update.
We have created a new incident under your Direct trac account to follow up with this query. We suggest you to follow up with the incident for further updates. Please log in using the below link.
Karthik Raja
I finally fixed it. The Release mode issue in UWP platform entry in Getting Started is incomplete.
I included both lines, but that was NOT enough.
I see that the SfDataGrid has the dependency Syncfusion.Xamarin.SfComboBox, so I needed to add this line:
assembliesToInclude.Add(typeof(Syncfusion.XForms.UWP.ComboBox.SfComboBoxRenderer).GetTypeInfo().Assembly);
Now
the app runs fine in Debug and Release mode for ARM64, because unlike
x86/x64 for ARM configurations, .NET Native is used even in debug!!!!
So,
you need to update the documentation and check all dependencies and
update the codelines. Your demo did not trigger the load of SfComboBox,
while my app does it, even if I don't use a Combobox, maybe this is
triggered from my model as I use public virtual TYPE PropertyName { get;
set; }. And because the the Combobox is not loaded I get
NullReferenceException.
Thank you for the update.
We are glad to know that the reported problem “NullReference Exception thrown in SfDataGrid” has been resolved at your end and we have modified our documentation of SfDataGrid and that changes will come live on tomorrow.
Regards,
Karthik Raja
The issue is not Release mode, it is the used .Net Native compilation, which is automatically done in Release mode!
.NET Native is a precompilation technology for building and deploying Windows apps that is included with Visual Studio 2015 and later versions. It automatically compiles the release version of apps that are written in managed code (C# or Visual Basic) and that target the .NET Framework and Windows 10 to native code.
But in ARM64, this .Net Native is also used in Debug Configuration! This is because .net core is currently not supported for ARM64.
The ARM64 with .NET Native Tool Chain is a framework issue. So, we didn’t documented in our user guide. But we have documented about .Net Native Compilation issue in our UG.
Regards,
Karthik Raja
- 29 Replies
- 5 Participants
-
AZ André Ziegler
- Jan 9, 2020 08:05 AM UTC
- Mar 3, 2020 01:34 PM UTC