Exported project runs only on one PC

Hello,
my exported project runs only on the machine I’ve build it, on all others it throws an exception on startup:

System.ArgumentException: Node "Invert [Stride.Textures.Filter.Experimental]" not found.
   at VL.Core.NodeBuilding.CreateNode(NodeContext context, String name, String category)
   at _BasicComponents_.Mixer.BasicComponents.InvertComponent_C.Create(NodeContext Node_Context_In)
   at _Factory_.Mixer.Factory.MixerFactory_C.AddComponentConstructor(String Name_In, Func`2 Constructor_In)
   at VL.Core.CompilerServices.AssemblyInitializer.InitInternalFactory(IInternalVLFactory factory)

preview 4.0-0050

i think preview-50 wasn’t very good. can you try with preview-57 or later again? if you have the same problem, we have to look into it. note that texturefx is still experimental and therefore not considered ready for production.

@tonfilm, it’s the same with 57 :-(

ok, I’ve added it to our texturefx issues: https://github.com/vvvv/VL.Stride/issues/444

please try with latest preview again, there was a simple fallback case that could fix this issue, but I couldn’t test it properly yet.

Hi @tonfilm, I’ve checked with preview-61 - that issue is gone, but new one appeared:

System.InvalidCastException: Unable to cast object of type 'Stride.Core.Mathematics.Vector2' to type 'Stride.Graphics.Texture'.
   at VL.Core.NodeBuilding.PinInstance`1.VL.Core.IVLPin.set_Value(Object value)
   at _Mosaic_._2DEffect.Mosaic_C.Update_()
   at _Core_.Mixer.Core.TwoDScene_C.Update_()
   at _Core_.Mixer.Core.RenderSlot_HjibzFwtiGPPSR7O9tIS7Y.Update(CompositionSlot_C Input_In, Texture& Texture_Out)
   at _Core_.Mixer.Core.Composition_C.Render(Texture& Texture_Out)
   at __MIXER_tester_.Main._MIXER_testerApplication_Ba6sY4xaoelOwKB6LBWbFe.Update()
   at VL.App.AppHost.<RunCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.App.WindowsForms.WindowsFormsAppHost.<Application_Idle>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

or

System.InvalidCastException: Unable to cast object of type 'System.Single' to type 'Stride.Graphics.Texture'.
   at VL.Core.NodeBuilding.PinInstance`1.VL.Core.IVLPin.set_Value(Object value)
   at _BasicComponents_.Mixer.BasicComponents.InvertComponent_C.Update_()
   at _Core_.Mixer.Core.TwoDScene_C.Update_()
   at _Core_.Mixer.Core.RenderSlot_HjibzFwtiGPPSR7O9tIS7Y.Update(CompositionSlot_C Input_In, Texture& Texture_Out)
   at _Core_.Mixer.Core.Composition_C.Render(Texture& Texture_Out)
   at __MIXER_tester_.Main._MIXER_testerApplication_Ba6sY4xaoelOwKB6LBWbFe.Update()
   at VL.App.AppHost.<RunCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.App.WindowsForms.WindowsFormsAppHost.<Application_Idle>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

it happens only on other PCs. And it seems like happening only with effects included in vl.stride library.
I don’t think that it is a failure on my side, more likely something wrong with pins creation. But ofcouse it need more investigation. I will have a deeper look on it next week.

Ah, I’ve checked those shaders: the difference between those which throwing the exception and those which are not is properties declaration. I always add stage before for property declaration - and those you have in library are missing that.

do you use the connect to signature feature by any chance?

can you confirm that your shaders get this error when you remove the stage keyword?

about stage - no, not really, but there might be a naming conflict on my side as well - I will have a look at Monday.
and no connect to signature.
tnx

Hi @tonfilm, that cast exception appears with FilterBase.
Once I do TextureFX like this it works out well:

shader Invertfxr_TextureFX : TextureFX
{
    float Factor = 1;
    bool Invert = true;
    bool InvertRGB = false;
    bool InvertTest = false;
    bool InvertAlpha = false;

    override stage void PSMain()
    {
        float4 c = InTex();
        float4 e = c;
        if (Invert) e.rgb = 1 - e.rgb;
        if (InvertRGB) e.rgb -= 2 * (e.rgb - dot(e.rgb,1) / 3.); // ohh this is the cutest
        if (InvertAlpha) e.a = 1 - e.a;
        c.rgb = lerp(c, e, Factor);
        streams.ColorTarget = c;
    }
};

It’s hard to debug - you always need a second PC to run the build.
Should it go here?

@Rayment Sorry for the long delay, please try the latest preview and let us know whether it works for you.

this is fixed now.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.