To Reproduce
There might be simpler methods to reproduce this issue:
Create [Modulo]
Duplicate as new type [IntModulo]
In Rider open IntModulo.cs
Change type of inputs and outputs from float to int
Change GUIDs for inputs and outputs
Save cs file
-> T3 fails to run after loading the new type.
public Symbol.Child.Input Input
{
get => _input;
set
{
_input = value;
TypedInputValue = (InputValue<T>)value.Value;
TypedDefaultValue = (InputValue<T>)value.DefaultValue; // <-- CAST EXCEPTION
if (_input.IsDefault && TypedDefaultValue.IsEditableInputReferenceType)
{
TypedInputValue.AssignClone(TypedDefaultValue);
}
}
}
System.InvalidCastException: Unable to cast object of type 'T3.Core.Operator.Slots.InputValue`1[System.Single]' to type 'T3.Core.Operator.Slots.InputValue`1[System.Int32]'.
at T3.Core.Operator.Slots.InputSlot`1.set_Input(Input value) in C:\Users\pixtur\dev\tooll\t3-main\Core\Operator\Slots\InputSlot.cs:line 40
at T3.Core.Operator.SymbolInstantiation.TryCreateNewInstance(Child symbolChild, Instance parentInstance, Instance& newInstance) in C:\Users\pixtur\dev\tooll\t3-main\Core\Operator\Symbol.Child.Instantiation.cs:line 55
at T3.Core.Operator.SymbolInstantiation.<TryCreateNewInstance>g__TryCreateInstance|0_0(Instance parent, Child symbolChild, Instance& newInstance, String& reason) in C:\Users\pixtur\dev\tooll\t3-main\Core\Operator\Symbol.Child.Instantiation.cs:line 128
at T3.Core.Operator.SymbolInstantiation.TryCreateNewInstance(Child symbolChild, Instance parentInstance, Instance& newInstance) in C:\Users\pixtur\dev\tooll\t3-main\Core\Operator\Symbol.Child.Instantiation.cs:line 15
at T3.Core.Operator.SymbolInstantiation.<TryCreateNewInstance>g__TryCreateInstance|0_0(Instance parent, Child symbolChild, Instance& newInstance, String& reason) in C:\Users\pixtur\dev\tooll\t3-main\Core\Operator\Symbol.Child.Instantiation.cs:line 128
at T3.Core.Operator.SymbolInstantiation.TryCreateNewInstance(Child symbolChild, Instance parentInstance, Instance& newInstance) in C:\Users\pixtur\dev\tooll\t3-main\Core\Operator\Symbol.Child.Instantiation.cs:line 15
at T3.Core.Operator.Symbol.UpdateInstanceType() in C:\Users\pixtur\dev\tooll\t3-main\Core\Operator\Symbol.TypeUpdating.cs:line 47
at T3.Core.Model.SymbolPackage.UpdateSymbolInstances(Symbol symbol) in C:\Users\pixtur\dev\tooll\t3-main\Core\Model\SymbolPackage.cs:line 279
at T3.Core.Model.SymbolPackage.LoadSymbols(Boolean parallel, List`1& newlyRead, List`1& allNewSymbols) in C:\Users\pixtur\dev\tooll\t3-main\Core\Model\SymbolPackage.cs:line 173
at T3.Editor.Compilation.ProjectSetup.UpdateSymbolPackages(PackageWithReleaseInfo[] packages)
at T3.Editor.Compilation.ProjectSetup.UpdateSymbolPackage[T](T project)
at T3.Editor.UiModel.EditableSymbolProject.RecompileChangedProjects(Boolean async)
at T3.Editor.Gui.WindowsUiContentDrawer.RenderCallback()
at T3.Editor.App.AppWindow.<>c__DisplayClass38_0.<RunRenderLoop>b__0()
at SharpDX.Windows.RenderLoop.Run(Control form, RenderCallback renderCallback, Boolean useApplicationDoEvents)
at T3.Editor.App.AppWindow.RunRenderLoop(Action callback)
at T3.Editor.Program.Main(String[] args)
Describe the bug After
Please complete the following information):
To Reproduce There might be simpler methods to reproduce this issue:
-> T3 fails to run after loading the new type.