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

ARM64 compile issue

Hi,

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?

29 Replies

YP Yuvaraj Palanisamy Syncfusion Team January 14, 2020 10:24 AM UTC

Hi André Ziegler 
 
Greeting from Syncfusion support. 
 
We would like to inform that the Syncfusion Xamarin controls supports with ARM64 in Xamarin.Forms Android application. Also, we have prepared a sample for your reference. Please find the sample from the below location. 
 
  
Please let us know if you have any concern. 
 
Regards, 
Yuvaraj


AZ André Ziegler January 14, 2020 03:55 PM UTC

Hi,

I was not clear enough. I talk about compiling UWP project of XF app for ARM64. Here also debug uses .NETNative.

regards
André Ziegler


AZ André Ziegler January 15, 2020 02:30 PM UTC

ok, today I was able compile the UWP app as ARM64, but the app crashes at startup. I need to investigate this more tomorrow


YP Yuvaraj Palanisamy Syncfusion Team January 15, 2020 11:01 PM UTC

Hi André Ziegler, 
 
We would like to inform that Syncfusion controls supports ARM 64 in Xamarin.Forms UWP projects. Also, we have prepared a sample for your reference. Please find the sample from the below location. 
 
  
Please let us know if you have any concern. 
 
Regards, 
Yuvaraj 



AZ André Ziegler January 16, 2020 12:23 PM UTC

The demo is garbage. WindowsSDKDesktopARM64Support is used for C++ applications.

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.




PK Pradeep Kumar Balakrishnan Syncfusion Team January 17, 2020 02:42 PM UTC

HI André Ziegler, 
 
Thank you for the update. 
 
Currently, we are checking ARM64 support for Syncfusion controls in Xamarin.Forms.UWP. while analysing we have found that there is a bug report in Xamarin forms uwp in ARM64 settings. we will update further details in three business days January 22,2019. We appreciate your patience until then. Also please provide tested device details. 
 
Regards, 
Pradeep Kumar B 



AZ André Ziegler January 19, 2020 07:32 PM UTC

I'm aware of this github ticket and I have already installed the Win2D.uwp 1.24.0 package to the UWP part of the XF apps.


AZ André Ziegler January 20, 2020 10:25 AM UTC

The app crashes while setting the data source of the grid. Here I always get a NullReferenceException no matter if I use SfDataPager or not.

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.


KK Karthikraja Kalaimani Syncfusion Team January 20, 2020 01:59 PM UTC

Hi Andre,

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, 
Karthik Raja 



KK Karthikraja Kalaimani Syncfusion Team January 22, 2020 05:18 PM UTC

Hi Andre,

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 



AZ André Ziegler January 23, 2020 03:08 PM UTC

Compile works now, it was caused by enabling incremental .net native support (UseDotNetNativeIncremental) which I now removed from ARM64 configuration, but the app crashes at runtime.

I use AutoGenerateColumns


                                AutoGenerateColumns="true" NavigationMode="Cell"
                                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;



KK Karthikraja Kalaimani Syncfusion Team January 24, 2020 12:55 PM UTC

Hi Andre,

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  



AZ André Ziegler January 24, 2020 02:16 PM UTC

I use version 17.4.0.44 of SfDataGrid. I'll check the demo next monday


FP Farjana Parveen Ayubb Syncfusion Team January 27, 2020 08:38 AM UTC

Hi Andre, 
 
Thank you for your update. 
 
We have tested the application in your Syncfusion version (17.4.0.44), but the issue is not reproduced. We will wait to hear from you. 
 
Regards, 
Farjana Parveen A 



AZ André Ziegler January 27, 2020 02:13 PM UTC

Your demo works, also as ARM64, but the pager is not working at all.

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.


KK Karthikraja Kalaimani Syncfusion Team January 28, 2020 03:00 PM UTC

Hi Andre,

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.
 
 



AZ André Ziegler January 28, 2020 04:16 PM UTC

Your app works again in ARM64 on Win10 Pro ARM64 1909, but this doesn't help me. I need a debug version of sfdatagrid to see why it crashes.

My datatypes have nullable types and some are empty, in your demo, all data have value. Maybe this is the difference.


KK Karthikraja Kalaimani Syncfusion Team January 29, 2020 12:07 PM UTC

Hi Andre, 


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 support@syncfusion.com we will maintain the confidentiality and get back to you at the earliest.  


Regards,
Karthik Raja

 



AZ André Ziegler January 30, 2020 06:35 AM UTC

Your demo works again as ARM64.

I can't share the project, In my model I have public Nullable and several public virtual TYPE NavigationProperty { get; set; } entries. Those where generated from EF6 T4 script.

// 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.


AZ André Ziegler January 30, 2020 08:18 AM UTC

Today my at doesn't even start, now I get System.Reflection.MissingMetadataException

Exception thrown: 'System.Reflection.MissingMetadataException' in System.Private.Interop.dll
Windows.Foundation.IReference`1

From what I understand this is the Nullable translated to .net native. But no matter what I add to the rd.xml of my app it now crashes all time at start and no longer at time of assigning the datasource to the grid.

I tried to add the generated output from this generator


<Type Name="Windows.Foundation.IReference`1{Double}" Dynamic="Required All" />

like suggested from Microsoft but this also doesn't fix it.


KK Karthikraja Kalaimani Syncfusion Team January 30, 2020 02:55 PM UTC

Hi Andre,

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.
 

 
Regards,
Karthik Raja 



AZ André Ziegler February 11, 2020 01:49 PM UTC

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.



KK Karthikraja Kalaimani Syncfusion Team February 12, 2020 01:02 PM UTC

Hi Andre,

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 



FP Farjana Parveen Ayubb Syncfusion Team February 14, 2020 05:33 AM UTC

Hi Andre, 
 
The changes are coming into live, please check the below UG link, 
 
 
Regards, 
Farjana Parveen A 



AZ André Ziegler February 17, 2020 07:25 AM UTC

Thanks, I can see it, but the documentation is still bad.

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.

Typically, apps that target the .NET Framework are compiled to intermediate language (IL). At run time, the just-in-time (JIT) compiler translates the IL to native code. In contrast, .NET Native compiles Windows apps directly 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.

So update the doc to reflect that the usage of .NET Native cause it and not only Release, here it is automatically used. And also mention the .Net Native usage for ARM64 configuration, so that other developers notice this.


FP Farjana Parveen Ayubb Syncfusion Team February 19, 2020 03:53 AM UTC

Hi Andre, 
 
We will update about .NET Native Tool Chain issue in our documentation before today EOD (19th February 2020). By default .NET Native Tool Chain is enabled only in Release mode. So, we documented targeting release mode before. 
 
Regarding ARM64 with .NET Native Tool Chain is a framework issue: it a framework issue. So, we didn’t documented in our user guide. 
 
Regards, 
Farjana Parveen A 



KK Karthikraja Kalaimani Syncfusion Team February 20, 2020 06:21 AM UTC

Hi Andre,  
  
The changes are in live now, please check the below UG link,  
  
  
Regards,  
Karthik Raja 



AZ André Ziegler March 2, 2020 07:49 AM UTC

It is still not really 100% well written, but a bit better now.


KK Karthikraja Kalaimani Syncfusion Team March 3, 2020 01:34 PM UTC

Hi Andre,

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 


Loader.
Live Chat Icon For mobile
Up arrow icon