Cannot Reproduce

Duplicate Value Inputs when using Rewired Assembly in v1.2

JasonJonesLASM 4 years ago updated by Lazlo Bonin (Lead Developer) 4 years ago 6

As you know, working on the integration. I received the error below when trying to update unit options. I proceeded to remove all my scripts, still there. Then I removed the Rewired_Core from assembly's. Regenerated. Works fine! Add back in. Happens again. So I opened an old project in 1.1.3, and added in Rewired. Works fine. Then I updated Bolt, and it failed to generate because of this same error: But so far, I only noticed it with Rewired, perhaps it is the same thing in others?

ArgumentException: Duplicate value input for '%' in Bolt.InvokeMember.
Bolt.Unit.ValueInput (System.Type type, System.String key) (at C:/Users/Lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow/Unit.cs:230)
Bolt.InvokeMember.Definition () (at C:/Users/Lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow/Framework/Codebase/InvokeMember.cs:99)
Bolt.Unit.Define () (at C:/Users/Lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow/Unit.cs:93)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:519)
System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:528)
System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:77)
Ludiq.TypeUtility.TryInstantiate (System.Type type, Boolean nonPublic, System.Object[] args) (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Runtime/Reflection/TypeUtility.cs:170)
Ludiq.TypeUtility.Instantiate (System.Type type, Boolean nonPublic, System.Object[] args) (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Runtime/Reflection/TypeUtility.cs:198)
Ludiq.SingleDecoratorProvider`3[TDecorated,TDecorator,TAttribute].CreateDecorator (System.Type decoratorType, .TDecorated decorated) (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Decorators/SingleDecoratorProvider.cs:44)
Ludiq.SingleDecoratorProvider`3[TDecorated,TDecorator,TAttribute].GetDecorator (.TDecorated decorated) (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Decorators/SingleDecoratorProvider.cs:80)
Ludiq.SingleDecoratorProvider`3[System.Object,Ludiq.IFuzzyOption,Ludiq.FuzzyOptionAttribute].GetDecorator[IUnitOption] (System.Object decorated) (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Decorators/SingleDecoratorProvider.cs:89)
Bolt.XUnitOptionProvider.Option (IUnit unit) (at C:/Users/Lazlo/Projects/Ludiq/Bolt.Flow/Editor/Options/UnitOptionProvider.cs:14)
Bolt.UnitBase+<GetStaticOptions>d__6.MoveNext () (at C:/Users/Lazlo/Projects/Ludiq/Bolt.Flow/Editor/Options/UnitBase.cs:265)
System.Collections.Generic.HashSet`1[Bolt.IUnitOption]..ctor (IEnumerable`1 collection, IEqualityComparer`1 comparer)
System.Collections.Generic.HashSet`1[Bolt.IUnitOption]..ctor (IEnumerable`1 collection)
Bolt.UnitBase.CacheStaticOptions () (at C:/Users/Lazlo/Projects/Ludiq/Bolt.Flow/Editor/Options/UnitBase.cs:86)
Bolt.Migration_1_1_3_to_1_2_0.Run () (at C:/Users/Lazlo/Projects/Ludiq/Bolt.Flow/Editor/Plugin/Migrations/Migration_1_1_3_to_1_2_0.cs:15)
Ludiq.UpdateMigrationPage+MigrationStep.Update () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/UpdateWizard/UpdateMigrationPage.cs:218)
Ludiq.MigrationStep:OnGUI() (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/UpdateWizard/UpdateMigrationPage.cs:247)
Ludiq.UpdateMigrationPage:OnContentGUI() (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/UpdateWizard/UpdateMigrationPage.cs:115)
Ludiq.Page:DrawContent() (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/Page.cs:56)
Ludiq.Wizard:OnGUI() (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/Wizard.cs:103)
Ludiq.WrappedEditorWindow:OnGUI() (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/WrappedEditorWindow.cs:41)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

That's odd, it means that Rewired defines methods with empty parameter names. I didn't think this was possible in .NET. I'll add Rewired (the version directly from the UAS?) to my test project and see if I can pin point where this is coming from.

Yeah that is strange. Yes, I am on the newest version from the UAS, should be i think Thanks for checking this out. Thankfully I created my own versions of anything that has anything to do with events, including data. Useable as long as you don' use the assembly for extra types, so it's not holding back a release at all.

Cannot Reproduce

I can't reproduce this. Added latest Rewired, added Rewired_Core to my assemblies, regenerated, no error. Any other step to take?

Totally forgot to respond. I was reminded because I was trying to use a Type list and it doesn't show up. Anyways I did more experimenting today with a new complete empty project. Here are my results:

1) Created New Project

2) Imported bolt, then Rewired right after.

3) Add Rewired_Core to Assemblies and Generate Units.

Now I get the error above.

I tried .Net 4.6 just incase. That was a lost cause, I can't even generate units with that at all, even without rewired in the assemblies. Just freezes immediately and I can no longer work without closing the project. 

I went back and took the old version of rewired that is working in an old project, and added it, that did the same thing in the new project though. So I delete it. Seems to be consistent.

Could it be something with whatever current .Net package I have installed? Should I try to find a newer one?

It just makes no sense we are both able to go through the same motions and get totally different results. Not like I am doing anything weird. Just a simple clean project with both installed.

Weird part is, this only changed when you updated from 1.1.3 to the next version. Works prior to that.

EDIT* Installed latest .NET, no changes.

EDIT EDIT:* Reverted to Unity 2017.1.0f3 where it was the version I used to use while it was working. Still doesn't work. Only differences that have effect are Bolt versions. And didn't realize I had same 4.6 errors as already posted, so nevermind on that.


I GOT IT! I'm so elated! lol It turned out I had private members and types selected, which normally is cool, but this throws an error for Rewired. Just need to make sure it's off if I'm generating units for Rewired. 


Glad you got that sorted out!

Actually, the private members option shouldn't be available. It will not be compatible with script compilation in the future. I will add a note in the settings that it has become obsolete.