Page 1 of 1

Binding to ScriptableObject

Posted: 24 Jul 2022, 22:56
by Feldruebe
Hello,

I get an error when I do a binding to a ScriptableObejct.
Is there something I have to look out for?
ArgumentNullException: Value cannot be null.
Parameter name: key
System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at <f3d0e7ec4efc44199bb22a77b1c8eff4>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) (at <f3d0e7ec4efc44199bb22a77b1c8eff4>:0)
Noesis.Extend.TryGetNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:418)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1703)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.CreateNativeTypeData (System.Type type, System.IntPtr nativeType) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1496)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1360)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.AddProperty (Noesis.Extend+NativeTypePropsInfo info, System.Reflection.PropertyInfo p, System.Boolean usePropertyInfo) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/ExtendProps.cs:775)
Noesis.Extend.CreateNativePropsData (System.Type type, System.Reflection.PropertyInfo[] props, Noesis.Extend+NativeTypeInfo info, System.Int32& numProps) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1630)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1362)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.AddProperty (Noesis.Extend+NativeTypePropsInfo info, System.Reflection.PropertyInfo p, System.Boolean usePropertyInfo) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/ExtendProps.cs:775)
Noesis.Extend.CreateNativePropsData (System.Type type, System.Reflection.PropertyInfo[] props, Noesis.Extend+NativeTypeInfo info, System.Int32& numProps) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1630)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1362)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.CreateNativeTypeData (System.Type type, System.IntPtr nativeType) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1496)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1360)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.AddProperty (Noesis.Extend+NativeTypePropsInfo info, System.Reflection.PropertyInfo p, System.Boolean usePropertyInfo) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/ExtendProps.cs:775)
Noesis.Extend.CreateNativePropsData (System.Type type, System.Reflection.PropertyInfo[] props, Noesis.Extend+NativeTypeInfo info, System.Int32& numProps) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1630)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1362)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.CreateNativeTypeData (System.Type type, System.IntPtr nativeType) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1496)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1360)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.AddProperty (Noesis.Extend+NativeTypePropsInfo info, System.Reflection.PropertyInfo p, System.Boolean usePropertyInfo) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/ExtendProps.cs:775)
Noesis.Extend.CreateNativePropsData (System.Type type, System.Reflection.PropertyInfo[] props, Noesis.Extend+NativeTypeInfo info, System.Int32& numProps) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1630)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1362)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.CreateNativeTypeData (System.Type type, System.IntPtr nativeType) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1496)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1360)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.CreateNativeTypeData (System.Type type, System.IntPtr nativeType) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1496)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1360)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.AddProperty (Noesis.Extend+NativeTypePropsInfo info, System.Reflection.PropertyInfo p, System.Boolean usePropertyInfo) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/ExtendProps.cs:775)
Noesis.Extend.CreateNativePropsData (System.Type type, System.Reflection.PropertyInfo[] props, Noesis.Extend+NativeTypeInfo info, System.Int32& numProps) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1630)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1362)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.CreateNativeTypeData (System.Type type, System.IntPtr nativeType) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1496)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1360)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.AddProperty (Noesis.Extend+NativeTypePropsInfo info, System.Reflection.PropertyInfo p, System.Boolean usePropertyInfo) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/ExtendProps.cs:775)
Noesis.Extend.CreateNativePropsData (System.Type type, System.Reflection.PropertyInfo[] props, Noesis.Extend+NativeTypeInfo info, System.Int32& numProps) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1630)
Noesis.Extend.RegisterNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1362)
Noesis.Extend.EnsureNativeType (System.Type type, System.Boolean registerDP) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1706)
Noesis.Extend.EnsureNativeType (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:1698)
Noesis.Extend.NewCPtr (System.Type type) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:4945)
Noesis.Extend.GetInstanceHandle (System.Object instance) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:5363)
Noesis.Extend.ListGet (System.IntPtr cPtr, System.UInt32 index) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:2585)
UnityEngine.Debug:LogException(Exception)
NoesisUnity:OnUnhandledException(Exception) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/NoesisUnity.cs:374)
Noesis.Error:UnhandledException(Exception) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Error.cs:18)
Noesis.Extend:ListGet(IntPtr, UInt32) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/Extend.cs:2591)
Noesis.View:Noesis_View_Update(HandleRef, Double)
Noesis.View:Update(Double) (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/API/Core/View.cs:341)
NoesisView:ExternalUpdateInternal() (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/NoesisView.cs:1145)
NoesisView:LateUpdate() (at C:/UnityPackages/NoesisGUI-Unity-3.1.4-Indie/Runtime/NoesisView.cs:1120)


Re: Binding to ScriptableObject

Posted: 25 Jul 2022, 11:58
by sfernandez
Could you please create a report in our bugtracker with some reproduction steps?
Because I tried to bind a simple ScriptableObject and it works as expected.

Re: Binding to ScriptableObject

Posted: 25 Jul 2022, 13:09
by Feldruebe
Ok, i will create a minimal sample.
Just wanted to know if I missed something in the docs that i had to do.

Re: Binding to ScriptableObject

Posted: 26 Jul 2022, 11:04
by Feldruebe
Ok, this was a little bit tricky but turned out really simple.

https://www.noesisengine.com/bugs/view.php?id=2386

My ViewModel referenced over a bit deep hierarchy a third-party component that used a ref property which triggered the exception.

Re: Binding to ScriptableObject

Posted: 26 Jul 2022, 14:12
by sfernandez
Thanks a lot for the report.