+1
Fixed

Gizmo disabler internal method signature change in 2019.1

Matthew Butt 2 years ago updated by Lazlo Bonin (Lead Developer) 1 year ago 9 2 duplicates

I have just purchased bolt and I went to install it in 2019.1

I worked through some initial bugs but now get an error which might be related to this version of Unity:

TargetParameterCountException: Number of parameters specified does not match the expected number. System.Reflection.MonoMethod.ConvertValues (System.Reflection.Binder binder, System.Object[] args, System.Reflection.ParameterInfo[] pinfo, System.Globalization.CultureInfo culture, System.Reflection.BindingFlags invokeAttr) (at <3a07e6401b5d4cc98f7be596cb2130ba>:0) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <3a07e6401b5d4cc98f7be596cb2130ba>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <3a07e6401b5d4cc98f7be596cb2130ba>:0) Ludiq.AnnotationUtility+Annotation.set_gizmoEnabled (System.Boolean value) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Utilities/AnnotationUtility.cs:190) Rethrow as UnityEditorInternalException: An error occured while accessing internal Unity Editor functions. This might happen if Unity makes backward-incompatible changes in their newer versions of the editor. Ludiq.AnnotationUtility+Annotation.set_gizmoEnabled (System.Boolean value) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Utilities/AnnotationUtility.cs:194) Ludiq.AnnotationDisabler.DisableGizmos () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Interface/Annotations/AnnotationDisabler.cs:20) Ludiq.SetupCompletePage.OnShow () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/SetupWizard/SetupCompletePage.cs:38) Ludiq.Page.Show () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Page.cs:54) Ludiq.Wizard.set_currentPage (Ludiq.Page value) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Wizard.cs:33) Ludiq.Wizard+<>c__DisplayClass21_0.b__0 () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Wizard.cs:68) Ludiq.Page.CompleteSwitch () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Page.cs:33) Ludiq.Wizard.Update () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Wizard.cs:91) Ludiq.WrappedEditorWindow.Update () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/WrappedEditorWindow.cs:39) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <3a07e6401b5d4cc98f7be596cb2130ba>:0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <3a07e6401b5d4cc98f7be596cb2130ba>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <3a07e6401b5d4cc98f7be596cb2130ba>:0) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:344) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:338) UnityEditor.HostView.SendUpdate () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:440) UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)

Is anyone able to point me in the right direction to solve this?

Cheers

Bolt Version:
1.4.1
Unity Version:
2019.1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

Duplicates 2

Working on Fix

Hi Matthew,

It seems like Unity changed an internal method we were relying upon in 2019.1. Thanks for the report!

In the mean time, this error should be totally harmless, all that fails is to disable some Bolt gizmos in the scene view.

Thanks for that, 

Cheers and beers!

Hi Matthew,

Not forgetting this, however I'm waiting for the C# source reference to be updated to be able to fix this. It usually gets outdated when a version goes out of Alpha. Right now, as of 2018.x, the method call is still valid: 

https://github.com/Unity-Technologies/UnityCsReference/blob/master/Editor/Mono/Annotation/AnnotationUtility.bindings.cs

+1

It seems the source got updated, will get to fixing this ASAP. Thanks for your patience everyone!

+1
Fixed in Next Version

Fixed for 1.4.3.

I'm really suffering from this issue. Bolt worked well, but I upgraded to 1.4.2 and now nothing works anymore, all graph inspectors just tell me to "Open the Upgrade wizard" but it refuses to do so. Updating Unit Options still work, but that's all. Any estimate when the 1.4.3 is available? The does-not-find-units-in-asmdef bug fixed in 1.4.2 is a real showstopper for me.

Callstack when the update wizard won't open:

TargetParameterCountException: Number of parameters specified does not match the expected number.
System.Reflection.MonoMethod.ConvertValues (System.Reflection.Binder binder, System.Object[] args, System.Reflection.ParameterInfo[] pinfo, System.Globalization.CultureInfo culture, System.Reflection.BindingFlags invokeAttr) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
Ludiq.AnnotationUtility+Annotation.set_gizmoEnabled (System.Boolean value) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Utilities/AnnotationUtility.cs:190)
Rethrow as UnityEditorInternalException: An error occured while accessing internal Unity Editor functions. This might happen if Unity makes backward-incompatible changes in their newer versions of the editor.
Ludiq.AnnotationUtility+Annotation.set_gizmoEnabled (System.Boolean value) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Utilities/AnnotationUtility.cs:194)
Ludiq.AnnotationDisabler.DisableGizmos () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Interface/Annotations/AnnotationDisabler.cs:20)
Ludiq.UpdateWizard.OnShow () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/UpdateWizard/UpdateWizard.cs:70)
Ludiq.EditorWindowWrapper.CreateWindow () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/EditorWindowWrapper.cs:24)
Ludiq.EditorWindowWrapper.ShowUtility () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/EditorWindowWrapper.cs:83)
Ludiq.Wizard.Show () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Wizard.cs:47)
Ludiq.PluginContainer+<>c.<initialize>b__16_12 () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Plugins/PluginContainer.cs:296)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:209)

Hi Oliver,

1.4.2 shouldn't have changed anything with regards to this issue. Unity 2019 would, however. Did you upgrade your Unity version as well?

Regardless, 1.4.3 should be out within a few days. 

Apparently a upgrade of the project with 2018.3 and Bolt 1.4.0 to 2019.1 had no problems, but now using 2019.1 and upgrading to 1.4.2 it breaks as Bolt will never upgrade itself due to the exception (see callstack in my first post). I tried faking the version values in all the ProjectSettings for each Bolt component but apparently that hack was either wrong or didn't work out ;-)