Your comments

I uploaded a video of me demonstrating the bug in it's natural environment.


That's the thing, I just open the ShaderForge editor and if it doesn't hang Unity (which needs Task manager to terminate Unity) it does that instead.
When it is working though this will mostly happens as I press play button in the editor.

Yeah whatever, I'm an angry old man so the sooner we deal with this the sooner you can get rid of me and I can update my review to 5 stars again.

My Unity version is:

Version 5.4.0f3 (a6d8d714de6f) Personal
Tue, 26 Jul 2016 22:13:57 GMT
Branch: 5.4/release

With SourceForge version: v1.28

Not fixed, still in version v1.28

Yeah no clue how to help you sorry, the choice to release this as a DLL means you can't debug it but by looking at your source I would take a wild guess and say this.ps used in this.ps.OnLocalGUI(yOffset2, (int)r.get_width()); on line #80 in SF_Editor.cs is null or something but without the source code to properly debug it I will never know.

Normally I would go into the source and fix broken assets like ProCore but because you don't want people knowing how awefully designed your code is I will expect you to fix it.


// ShaderForge.SF_Editor
public void DrawPreviewPanel(Rect r)
{
    Rect rect = new Rect(r);
    rect.set_y(rect.get_y() + 4f);
    rect.set_x(rect.get_x() + 2f);
    int num = 8;
    rect.set_height(17f);
    rect.set_width(rect.get_width() / 4f);
    rect.set_width(rect.get_width() + (float)num);
    GUIStyle miniButton = EditorStyles.get_miniButton();
    if (GUI.Button(rect, "Return to menu", miniButton))
    {
        this.OnPressBackToMenuButton();
    }
    rect.set_x(rect.get_x() + rect.get_width());
    rect.set_xMax(rect.get_xMax() - (float)(num * 2));
    rect.set_width(rect.get_width() * 0.75f);
    this.displaySettings = GUI.Toggle(rect, this.displaySettings, "Settings", miniButton);
    rect.set_x(rect.get_x() + rect.get_width());
    rect.set_width(rect.get_width() * 2f);
    GUI.set_color(SF_GUI.outdatedStateColors[(int)this.ShaderOutdated]);
    if (GUI.Button(rect, "Compile shader", miniButton))
    {
        if (this.nodeView.treeStatus.CheckCanCompile())
        {
            this.shaderEvaluator.Evaluate();
        }
    }
    GUI.set_color(Color.get_white());
    this.nodeView.DrawRecompileTimer(rect);
    rect.set_x(rect.get_x() + rect.get_width());
    rect.set_width(rect.get_width() * 0.5f);
    SF_Settings.autoCompile = GUI.Toggle(rect, SF_Settings.autoCompile, "Auto");
    rect.set_y(rect.get_y() + 4f);
    if (this.displaySettings)
    {
        rect.set_y(rect.get_y() + rect.get_height());
        rect.set_x(r.get_x() - 4f);
        rect.set_width(r.get_width() / 4f);
        rect.set_x(rect.get_x() + rect.get_width());
        rect.set_width(rect.get_width() * 2.55f);
        if (SF_Settings.nodeRenderMode == NodeRenderMode.Viewport)
        {
            EditorGUI.BeginDisabledGroup(true);
            GUI.Toggle(rect, true, "Real-time node rendering");
            EditorGUI.EndDisabledGroup();
        }
        else
        {
            EditorGUI.BeginChangeCheck();
            SF_Settings.realtimeNodePreviews = GUI.Toggle(rect, SF_Settings.realtimeNodePreviews, "Real-time node rendering");
            if (EditorGUI.EndChangeCheck())
            {
                this.RegenerateNodeBaseData();
            }
        }
        rect = rect.MovedDown(1);
        SF_Settings.quickPickScrollWheel = GUI.Toggle(rect, SF_Settings.quickPickScrollWheel, "Use scroll in the quickpicker");
        rect = rect.MovedDown(1);
        SF_Settings.showVariableSettings = GUI.Toggle(rect, SF_Settings.showVariableSettings, "Show variable name & precision");
        rect = rect.MovedDown(1);
        SF_Settings.showNodeSidebar = GUI.Toggle(rect, SF_Settings.showNodeSidebar, "Show node browser panel");
        rect = rect.MovedDown(1);
        if (SF_GUI.HoldingControl())
        {
            EditorGUI.BeginDisabledGroup(true);
            GUI.Toggle(rect, !SF_Settings.hierarchalNodeMove, "Hierarchal Node Move");
            EditorGUI.EndDisabledGroup();
        }
        else
        {
            SF_Settings.hierarchalNodeMove = GUI.Toggle(rect, SF_Settings.hierarchalNodeMove, "Hierarchal Node Move");
        }
        rect.set_y(rect.get_y() + 4f);
    }
    this.previewButtonHeightOffset = (int)rect.get_yMax() + 24;
    int yOffset = this.preview.OnGUI((int)rect.get_yMax(), (int)r.get_width());
    int yOffset2 = this.statusBox.OnGUI(yOffset, (int)r.get_width());
    this.ps.OnLocalGUI(yOffset2, (int)r.get_width());    // <-- Broken code here??
    if (SF_Debug.nodes)
    {
        GUILayout.Label("Node count: " + this.nodes.Count, new GUILayoutOption[0]);
    }
}