LemonUI: [FiveM] dynamic types not working after loading this library

After this library has been loaded by the FiveM client, the dynamic type doesn’t work anymore.

I ran the same code, but without LemonUI. That worked without any exceptions. Why could this happen?


Stacktrace:

[     39172] [b2545_GTAProce]             MainThrd/ Failed to run a tick for ClientMain: System.TypeLoadException: Could not resolve type with token 0100000e
[     39172] [b2545_GTAProce]             MainThrd/   at (wrapper managed-to-native) System.MonoCustomAttrs:GetCustomAttributesDataInternal (System.Reflection.ICustomAttributeProvider)
[     39172] [b2545_GTAProce]             MainThrd/   at System.MonoCustomAttrs.GetCustomAttributesData (System.Reflection.ICustomAttributeProvider obj) [0x0000e] in <74fbbe963b7e417b8d715b858c5c584f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at System.Reflection.CustomAttributeData.GetCustomAttributes (System.Reflection.Assembly target) [0x00000] in <74fbbe963b7e417b8d715b858c5c584f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at Mono.CSharp.ImportedAssemblyDefinition.ReadAttributes () [0x00000] in /mnt/idfk/meow/mono/mcs/mcs/import.cs:1719 
[     39172] [b2545_GTAProce]             MainThrd/   at Mono.CSharp.MetadataImporter.GetAssemblyDefinition (System.Reflection.Assembly assembly) [0x00027] in /mnt/idfk/meow/mono/mcs/mcs/import.cs:972 
[     39172] [b2545_GTAProce]             MainThrd/   at Mono.CSharp.ReflectionImporter.ImportAssembly (System.Reflection.Assembly assembly, Mono.CSharp.RootNamespace targetNamespace) [0x00000] in /mnt/idfk/meow/mono/mcs/mcs/reflection.cs:86 
[     39172] [b2545_GTAProce]             MainThrd/   at Microsoft.CSharp.RuntimeBinder.DynamicContext.Create () [0x000c6] in /mnt/idfk/meow/mono/mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/DynamicContext.cs:104 
[     39172] [b2545_GTAProce]             MainThrd/   at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.FallbackInvokeMember (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject errorSuggestion) [0x00006] in /mnt/idfk/meow/mono/mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/CSharpInvokeMemberBinder.cs:156 
[     39172] [b2545_GTAProce]             MainThrd/   at System.Dynamic.DynamicObject+MetaDynamic.BindInvokeMember (System.Dynamic.InvokeMemberBinder binder, System.Dynamic.DynamicMetaObject[] args) [0x0003c] in <31b946cfddcc4ab993dd6d559e89c25f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at System.Dynamic.InvokeMemberBinder.Bind (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) [0x00016] in <31b946cfddcc4ab993dd6d559e89c25f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at System.Dynamic.DynamicMetaObjectBinder.Bind (System.Object[] args, System.Collections.ObjectModel.ReadOnlyCollection`1[T] parameters, System.Linq.Expressions.LabelTarget returnLabel) [0x000c6] in <31b946cfddcc4ab993dd6d559e89c25f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T] (System.Runtime.CompilerServices.CallSite`1[T] site, System.Object[] args) [0x00019] in <31b946cfddcc4ab993dd6d559e89c25f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at System.Runtime.CompilerServices.CallSiteOps.Bind[T] (System.Runtime.CompilerServices.CallSiteBinder binder, System.Runtime.CompilerServices.CallSite`1[T] site, System.Object[] args) [0x00000] in <31b946cfddcc4ab993dd6d559e89c25f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,bool)
[     39172] [b2545_GTAProce]             MainThrd/   at Kifflom.FiveM.RP.Client.Exports.SpawnManager.SetAutoSpawn (System.Boolean enabled) [0x00000] in C:\GitHub\Kifflom\Kifflom.FiveM.RP\src\client\Kifflom.FiveM.RP.Client.Exports\SpawnManager.cs:40 
[     39172] [b2545_GTAProce]             MainThrd/   at Kifflom.FiveM.RP.Client.Scripts.ClientMain+<PlayerJoinedTick>d__6.MoveNext () [0x00020] in C:\GitHub\Kifflom\Kifflom.FiveM.RP\src\client\Kifflom.FiveM.RP.Client\Scripts\ClientMain.cs:81 
[     39172] [b2545_GTAProce]             MainThrd/ --- End of stack trace from previous location where exception was thrown ---
[     39172] [b2545_GTAProce]             MainThrd/   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <74fbbe963b7e417b8d715b858c5c584f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <74fbbe963b7e417b8d715b858c5c584f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <74fbbe963b7e417b8d715b858c5c584f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <74fbbe963b7e417b8d715b858c5c584f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <74fbbe963b7e417b8d715b858c5c584f>:0 
[     39172] [b2545_GTAProce]             MainThrd/   at Kifflom.FiveM.RP.Client.Logging.BaseScript+<>c__DisplayClass5_0+<<add_Tick>b__0>d.MoveNext () [0x00086] in C:\GitHub\Kifflom\Kifflom.FiveM.RP\src\client\Kifflom.FiveM.RP.Client.Logging\BaseScript.cs:30 
[     39172] [b2545_GTAProce]             MainThrd/ 

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (17 by maintainers)

Most upvoted comments

@Sander0542 would you be kind to send the Pull Request? So you get the credit for the commit 😃

Ill take a deeper look tomorrow Sunday.