You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Tupitsyn (Jira)" <ji...@apache.org> on 2022/11/16 19:06:00 UTC
[jira] [Assigned] (IGNITE-18178) .NET: Add support for Native AOT publish
[ https://issues.apache.org/jira/browse/IGNITE-18178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Tupitsyn reassigned IGNITE-18178:
---------------------------------------
Assignee: Igor Sapego (was: Pavel Tupitsyn)
[~isapego] please review.
> .NET: Add support for Native AOT publish
> ----------------------------------------
>
> Key: IGNITE-18178
> URL: https://issues.apache.org/jira/browse/IGNITE-18178
> Project: Ignite
> Issue Type: Improvement
> Components: platforms
> Reporter: Pavel Tupitsyn
> Assignee: Igor Sapego
> Priority: Major
> Labels: .NET
>
> .NET 7 provides Native AOT capabilities, where the app is published as native code without dependencies: https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/
> However, if we try to use Ignite.NET in such a scenario, the following error is produced (both for thin and thick APIs):
> {code}
> Unhandled Exception: System.TypeInitializationException: A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property.
> ---> System.InvalidOperationException: Unable to get memory copy function delegate.
> at Apache.Ignite.Core.Impl.Memory.PlatformMemoryUtils..cctor() + 0x163
> at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0xb9
> --- End of inner exception stack trace ---
> at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x153
> at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnNonGCStaticBase(StaticClassConstructionContext*, IntPtr) + 0x9
> at Apache.Ignite.Core.Impl.Memory.PlatformMemoryUtils.AllocatePool() + 0x9
> at Apache.Ignite.Core.Impl.Memory.PlatformMemoryPool..ctor() + 0x20
> at Apache.Ignite.Core.Impl.Memory.PlatformMemoryManager.Pool() + 0x36
> at Apache.Ignite.Core.IgniteConfiguration..ctor(IgniteConfiguration) + 0x32
> at Apache.Ignite.Core.Ignition.Start(IgniteConfiguration) + 0x54
> at Program.<Main>$(String[]) + 0x73
> at Apache.Ignite!<BaseAddress>+0xfd04bb
> Aborted
> {code}
> * Get rid of unnecessary reflection in *PlatformMemoryUtils* to enable native AOT in user apps.
> * Review other cases of reflection usage.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)