Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shader extension does not work in 4.2.0.2282 #2566

Open
Doprez opened this issue Dec 19, 2024 · 11 comments
Open

Shader extension does not work in 4.2.0.2282 #2566

Doprez opened this issue Dec 19, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@Doprez
Copy link
Contributor

Doprez commented Dec 19, 2024

Release Type: Official Release

Version: 4.2.0.2282

Platform(s): Windows

Describe the bug
When projects reference the latest Stride version 4.2.0.2282 shader key files no longer generate in Visual studio.

To Reproduce
Steps to reproduce the behavior:

  1. follow https://doc.stride3d.net/latest/en/manual/graphics/effects-and-shaders/custom-shaders.html
  2. shader key file never generates

This should happen in older projects too if you upgrade to the latest Stride they refuse to generate with the error log below.

Log and callstacks

Error Initializing Stride Language Service: System.TypeAccessException: SyncInterface failed. Type or version of type unknown.
   at ServiceWire.StreamingChannel.SyncInterface(Type serviceType, String username, String password)
   at ServiceWire.NamedPipes.NpChannel..ctor(Type serviceType, NpEndPoint npEndPoint, ISerializer serializer, ICompressor compressor)
@Doprez Doprez added the bug Something isn't working label Dec 19, 2024
@VaclavElias
Copy link
Contributor

This package ServiceWire was recently updated #2548 to reselove some vulnerability issues.

I tested the editor functionality but not anything related to shaders.

@Doprez
Copy link
Contributor Author

Doprez commented Dec 19, 2024

Ah that makes sense then, before upgrading my project from 4.2.0.2232 the shader generation works fine.

@VaclavElias
Copy link
Contributor

I wonder why there is mentioned username and password but seems, similar issues were here:

https://github.com/tylerjensen/ServiceWire/issues?q=is%3Aissue+username+is%3Aclosed

@VaclavElias
Copy link
Contributor

Whole error:

System.AggregateException: One or more errors occurred. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeAccessException: SyncInterface failed. Type or version of type unknown.
   at ServiceWire.StreamingChannel.SyncInterface(Type serviceType, String username, String password)
   at ServiceWire.NamedPipes.NpChannel..ctor(Type serviceType, NpEndPoint npEndPoint, ISerializer serializer, ICompressor compressor)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at ServiceWire.ProxyFactory.CreateProxy[TInterface](ProxyBuilder proxyBuilder, Object channelCtorValue, ISerializer serializer, ICompressor compressor)
   at ServiceWire.ProxyFactory.CreateProxy[TInterface](Type channelType, Type ctorArgType, Object channelCtorValue, ISerializer serializer, ICompressor compressor)
   at Stride.VisualStudio.Commands.StrideCommandsProxy.GetProxy()
   at Stride.VisualStudio.Shaders.ShaderKeyFileGenerator.<>c__DisplayClass3_0.<GenerateCode>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Stride.VisualStudio.Shaders.ShaderKeyFileGenerator.GenerateCode(String inputFileName, String inputFileContent)
---> (Inner Exception #0) System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeAccessException: SyncInterface failed. Type or version of type unknown.
   at ServiceWire.StreamingChannel.SyncInterface(Type serviceType, String username, String password)
   at ServiceWire.NamedPipes.NpChannel..ctor(Type serviceType, NpEndPoint npEndPoint, ISerializer serializer, ICompressor compressor)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at ServiceWire.ProxyFactory.CreateProxy[TInterface](ProxyBuilder proxyBuilder, Object channelCtorValue, ISerializer serializer, ICompressor compressor)
   at ServiceWire.ProxyFactory.CreateProxy[TInterface](Type channelType, Type ctorArgType, Object channelCtorValue, ISerializer serializer, ICompressor compressor)
   at Stride.VisualStudio.Commands.StrideCommandsProxy.GetProxy()
   at Stride.VisualStudio.Shaders.ShaderKeyFileGenerator.<>c__DisplayClass3_0.<GenerateCode>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

@Doprez
Copy link
Contributor Author

Doprez commented Dec 21, 2024

Were you able to build the VSIX package? I tried debugging it earlier today but it kept saying:

1>..\.nuget\packages\microsoft.vssdk.buildtools\17.0.5232\tools\VSSDK\Microsoft.VsSDK.targets(829,5): error MSB4018: The "GetDeploymentPathFromVsixManifest" task failed unexpectedly.
1>..\.nuget\packages\microsoft.vssdk.buildtools\17.0.5232\tools\VSSDK\Microsoft.VsSDK.targets(829,5): error MSB4018: System.AggregateException->Microsoft.Build.Framework.BuildException.GenericBuildTransferredException: One or more errors occurred. ---> Microsoft.Build.Framework.BuildException.GenericBuildTransferredException: Object reference not set to an instance of an object.
1>..\.nuget\packages\microsoft.vssdk.buildtools\17.0.5232\tools\VSSDK\Microsoft.VsSDK.targets(829,5): error MSB4018:    --- End of inner exception stack trace ---

I am pretty sure I have all of the prerequisites but maybe Im missing something obvious.

@VaclavElias
Copy link
Contributor

I think, that we need to rebuild the Stride extension because it is also using ServiceWire NuGet package and there might be mismatch? I am just trying to build a new VSIX.

@VaclavElias
Copy link
Contributor

Were you able to build the VSIX package? I tried debugging it earlier today but it kept saying:

I am having the same errors but the VSIX gets generated, I have to just change the version to 4.2.0.2282 because because when it is installed it comlains it is not compatible.

Image

@Doprez
Copy link
Contributor Author

Doprez commented Dec 21, 2024

change the version in the runtime source assembly?

@VaclavElias
Copy link
Contributor

I tried. But then it is complaining about the "Stride.VisualStudio.Command" package version that it can't access it even though it is there. I will paste some screenshots. Just doing more digging..

By the way, one of the errors you mentioned above also creates this error

"The command ""..\..\core\Stride.Core.Tasks\bin\Debug\net8.0-windows\Stride.Core.Tasks.exe" locate-devenv "C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64"" exited with code 3.

And the issue is, that there is no net8.0-windows folder. We have only net8.0.

@VaclavElias
Copy link
Contributor

@Doprez, I think the issue is somewhere here with the resolver. Not easy to figure out what exactly. I guess, if we don't have time, we should reverse my PR and leave this open till someone knows how to fix it. Also, I would need to add a note here https://doc.stride3d.net/latest/en/contributors/engine/visual-studio-plugin.html that when bumping ServiceWire, the extension is a dependency and needs to be tested as well.

Image

@Doprez
Copy link
Contributor Author

Doprez commented Dec 22, 2024

At least for now, it may not hurt to revert it. I did notice @xen2 has apparently worked on that repo before so maybe he can help if he has time.

The note would be super handy though, I personally didnt realize thats how the Extension were communicating with projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants