Closed joslat closed 2 years ago
To help a bit more, I debugged with "just my code " off, and...
The issue seems to happen here:
Then, on the Lazy initialization of that value, we get the exception:
Hi @joslat , are you still seeing this issue?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug Referencing the latest NuGet package, Catalyst 1.0.16767, and essentially putting the code of the sample for Language Detection, throws an exception. The exception: {"Unable to load one or more of the requested types.\r\nA ByRef-like type cannot be used as the type for an instance field in a non-ByRef-like type."}
my code is as follows:![image](https://user-images.githubusercontent.com/9831011/119678643-fa826a00-be3f-11eb-8f9c-df762b224a4a.png)
Essentially the same as the sample, but I have tried the sample locally, updated the package to match, and it works... I am also using .NET 5, the same as the sample.
The sensible part of the stacktrace is: at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at System.Reflection.RuntimeModule.GetTypes() at System.Reflection.Assembly.GetTypes() at Mosaik.Core.ObjectStore.<>c.b28_1(Assembly a)
at System.Linq.Enumerable.SelectManySingleSelectorIteratord 42.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Catalyst.Models.FastText.d 41.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Catalyst.Models.FastTextLanguageDetector.d__5.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
2.MoveNext() at System.Linq.Set
1.UnionWith(IEnumerable1 other) at System.Linq.Enumerable.UnionIterator
1.FillSet() at System.Linq.Enumerable.UnionIterator1.ToArray() at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source) at Mosaik.Core.ObjectStore.CreateDerivedFromModelDictionary() at Mosaik.Core.ObjectStore.<>c.<.cctor>b32_0() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy
1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at System.Lazy
1.get_Value() at Mosaik.Core.ObjectStore.TryGetFormerNames(String name, String[]& formerNames) at Catalyst.Models.FastText.Could it be an issue with getting the Language files from the store? if so, how is detailed how to do this?
To Reproduce Create a new project, add reference to Catalyst, paste the code and run.
Expected behavior runs flawlessly, language is returned.
Screenshots![image](https://user-images.githubusercontent.com/9831011/119678643-fa826a00-be3f-11eb-8f9c-df762b224a4a.png)
Additional context Add any other context about the problem here.