RivePlayer is not AoT compatible (Windows App SDK 1.6)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- csharp
- Ambito
- desktop, testing-qa
Direzione di ricerca
Inizia da components/RivePlayer/tests/ExampleRivePlayerTestClass.cs, in particolare da ComplexAsyncLoadUIExampleWithoutDispatcherTest, e ispeziona components/RivePlayer/src/RivePlayer.cs alla riga 49. Poi leggi RiveSharp.RiveAPI.cs e le indicazioni collegate sull’interoperabilità nativa per comprendere l’errore AoT. Il lavoro è completato quando i test AoT di Windows App SDK 1.6+ possono essere eseguiti senza la DllNotFoundException segnalata e non è più necessario disabilitarli.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Seems like tests are failing as a result of some issue with RivePlayer on Microsoft.WindowsAppSdk 1.6-preview1+ with AoT enabled:
System.TypeInitializationException: The type initializer for 'RiveSharp.Factory' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'rive' or one of its dependencies: The specified module could not be found. (0x8007007E)
Stack Trace:
at RiveSharp.RiveAPI.Factory_RegisterDelegates(FactoryDelegates delegates)
at RiveSharp.Factory..cctor()
--- End of inner exception stack trace ---
at RiveSharp.Scene..ctor()
at CommunityToolkit.Labs.WinUI.Rive.RivePlayer..ctor() in /_/components/RivePlayer/src/RivePlayer.cs:line 49
at RivePlayerExperiment.Tests.ExampleRivePlayerTestClass.ComplexAsyncLoadUIExampleWithoutDispatcherTest() in D:\a\Labs-Windows\Labs-Windows\components\RivePlayer\tests\ExampleRivePlayerTestClass.cs:line 121
at RivePlayerExperiment.Tests.ExampleRivePlayerTestClass.<ComplexAsyncLoadUIExampleWithoutDispatcherTest_ExampleRivePlayerTestClass_Test>b__12_0() in /_/ProjectHeads/AllComponents/Tests.Wasdk/obj/x64/Release/net8.0-windows10.0.22621.0/win-x64/CommunityToolkit.Tooling.TestGen/CommunityToolkit.Tooling.TestGen.UIThreadTestMethodGenerator/ComplexAsyncLoadUIExampleWithoutDispatcherTest_ExampleRivePlayerTestClass.g.cs:line 15
Originally posted by @Arlodotexe in https://github.com/CommunityToolkit/Labs-Windows/issues/561#issuecomment-2305885605
It looks like this is happening because the Rive.RiveSharp package is using runtime marshalling to call the native binary under the hood, which isn't AoT/trim friendly.
This issue should only be present when using Wasdk 1.6+ with AoT enabled. Other platforms are unaffected, but NativeAoT is not compatible with runtime marshalling. For more information, see Native interoperability best practices.
Fixing this will require changes to the underlying library. To avoid blocking the toolkit as a whole, the tests will be disabled on Wasdk until the issue can be resolved.
- Lingua principale
- C#
- Stelle
- 485
- Fork
- 89
- Merge medio
- 19h 46m
- PR unite (30g)
- 2
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CommunityToolkit/Labs-Windows
-
bug :bug:
Difficoltà 1/5 1-3 ore Idoneità per principianti 80/100
CommunityToolkit/Labs-Windows#815 ·
-
bug :bug:
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
CommunityToolkit/Labs-Windows#816 ·
-
bug :bug:
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
CommunityToolkit/Labs-Windows#814 ·
-
experiment :test_tube:
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
CommunityToolkit/Labs-Windows#812 ·
-
ux :paintbrush:
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
CommunityToolkit/Labs-Windows#808 · 1 commento ·
Tutte le issue di CommunityToolkit/Labs-Windows
Issue simili
-
effort:S P3 refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
nightscout/nocturne#3243 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
dasher-project/Dasher-Windows#84 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
libnativeapi/nativeapi#21 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 3 giorni
-
enhancement P3 performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
thomhurst/TUnit#7380 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno