0
Fixed

Unity crashing on opening shader

MisterTelecaster vor 10 Jahren aktualisiert von Freya Holmér (Developer) vor 10 Jahren 15
I found a topic where someone had the same problem as this because they didn't install a new version correctly, but I don't think that's the problem I'm having. I just got shaderforge yesterday, and as far as I can tell, it hasn't been updated in the last 12 hours, but just to be safe, I deleted the shaderforge package, and all of the shaderforge files from my individual projects, then redownloaded and reimported it into the projects. But the same thing continues to happen.

It only happens with certain shaders though, other shaders load up just fine, and i can't for the life of me figure out what could be different between the shaders that could be causing this.

Antwort

Antwort
Fixed
You should report the issue to Unity, and send the entire crashlog to them. When you get issues in the C++ codebase, there's nothing I can do to fix it, unfortunately.

Marking it as "fixed" for lack of a better tag
Wird überprüft
What version of SF are the shaders you're trying to open from? Sounds like they're either really old or you have a strange window layout saved.

Also, try this reinstall method:
http://acegikmo.com/shaderforge/faq/?Q=erroronnewversion#erroronnewversion
Wow fast response!

I did what was described in the link, same issue. And it's less of a crash, and more of the window only shows the outline and top bar and nothing else at all as if it's loading, but it stays like that for up to ten minutes until I close Unity as opposed to the ~10 seconds it takes to load my other shaders. It's totally unresponsive and I can't even use the Unity editor, but I can still use the maximize/minimize/close buttons for Unity itself.

As far as what version they're from, they're from whatever version of shader forge was out at around 8 pm last night when I bought shader forge and made them, which I would assume is the latest version. My window layout is also the 2 by 3 from the Unity default layouts.
That's very strange. What errors are you getting in your console?
There appears to be a handful of "Failed to create 2D texture" errors, though I'm not sure if they're related to SF or not. This is what I get:

(Filename: C:/BuildAgent/work/aeedb04a1292f85a/Runtime/Allocator/MemoryManager.cpp Line: 1134)


d3d11: failed to create 2D texture id=4728 w=128 h=128 mips=1 d3dfmt=28 [887a0005]
d3d11: failed to create 2D texture view id=4728 [80070057]
failed to create 2D texture


(Filename: C:/BuildAgent/work/aeedb04a1292f85a/Runtime/GfxDevice/d3d11/TexturesD3D11.cpp Line: 492)


failed to create 2D texture


(Filename: C:/BuildAgent/work/aeedb04a1292f85a/Runtime/GfxDevice/d3d11/TexturesD3D11.cpp Line: 492)</code>
Oh wow, really?
That sounds like something on Unity's end. Do all shaders get this or just those specific ones?
Just specific ones, but they all use the same nodes and similar combinations of nodes as shaders that work fine for me

Also, in case it helps, I'm running Windows 7 on an HP Elitebook 8570, and Unity version 4.5.0f6
A bit of extra info: I tried recreating one of the shaders that no longer opens to the best of my memory, apparently trying to select a Texture2D or a cubemap for one of the shader's properties does the same thing. The only node the shader had in it was a Texture2D property, and the lighting was set to be a custom lighting model.
But those errors are unlike anything I've ever seen. They're not even related to the shader itself.

Is that the topmost error in the console?
Are you using some special texture type?
I can't get to the console since the Unity window just freezes up and only shows whatever pixels were there last, but I checked the Unity error log file and those were right at the end of it. As for my texture, it's just a standard RGBA .png image, 512 x 512 pixels in size. The same thing happens with cubemaps too, made up of six RGBA .png images, 512 x 512 pixels in size for each image.
+1
How about if you disable DirectX11 support in your project, and then try again?
Turning off DX11 seems to have fixed it, not sure why I didn't do that first.
Having this broken for DX11 is probably something you'd want to look into though, and I noticed that this time I opened unity I did get an error in the console (it was blank prior to this, I'm not sure why the error chose to show up now)

NullReferenceException: Object reference not set to an instance of an object
ShaderForge.SF_Evaluator.Evaluate ()
ShaderForge.SF_Editor.OnDisable ()
UnityEditor.EditorWindow:Close()
ShaderForge.SF_Editor:Update()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()


Hopefully that's helpful in solving any other issues
I really have no idea why this might happen. If you try the reinstall procedure now, after having disabled DX11; does it work properly?
Reinstalling it works the same as it did after I turned off DX11 initially. It's fine now that I disabled DX11
Antwort
Fixed
You should report the issue to Unity, and send the entire crashlog to them. When you get issues in the C++ codebase, there's nothing I can do to fix it, unfortunately.

Marking it as "fixed" for lack of a better tag