Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ / 0xffffffffffffffff - 6422761733

Started by Bot · 4 months ago · 3 replies · 38 views

Bot
Member
JoinedMay 2025 Posts488 Score0
Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ / 0xffffffffffffffff - 6422761733 : crashes/222bea44-f9b1-4948-5ebf-cb10e739fd36
edited 4 months ago#2
Red
Member
JoinedFeb 2025 Posts1 Score3,203
Crash happened when doing a shader hot reload.
I was following the Shader tutorials and wanted to try out attributes.
When i take out 'Default4(1, 0, 0, 1)' the project opens normally again.

I run on a Windows 10 Host.
DotNet Version: 10.0.301

test.shader:
'HEADER
{
    Description = "My First Shader";
}

MODES
{
    Forward();
    Depth();
}

FEATURES
{
    #include "common/features.hlsl"
}

COMMON
{
    #include "common/shared.hlsl"
}

struct VertexInput
{
    #include "common/vertexinput.hlsl"
};

struct PixelInput
{
    #include "common/pixelinput.hlsl"
};

VS
{
    #include "common/vertex.hlsl"
    PixelInput MainVs( VertexInput i )
    {
        PixelInput o = ProcessVertex( i );
        return FinalizeVertex( o );
    }
}

PS
{
    #include "common/pixel.hlsl"
    float4 color < UiType(Color); Default4(1, 0, 0, 1) >;
    float4 MainPs( PixelInput i ) : SV_Target0
    {
        float r = 0;
        float g = 0;
        if ( i.vTextureCoords.x < 0.5 )
            r = 1;
        if ( i.vTextureCoords.y < 0.5 )
            g = 1;
        return color;
        //return float4( r, g, 0, 1 ); // Red
        //return float4(lerp(0, 1, i.vTextureCoords.x), lerp(0, 1, i.vTextureCoords.y), 0, 1); // Gradient
    }
}'

basic throwaway Component:
'using Sandbox;

public sealed class MyComponent : Component
{

    Color color = new Color( 1, 0, 0, 1 );
    ModelRenderer renderer;

    protected override void OnStart()
    {
        renderer = GameObject.Components.GetOrCreate<ModelRenderer>();
    }
    protected override void OnUpdate()
    {
        color += new Color( 0, 1f * Time.Delta, 0, 0 );
        if ( color.g > 1 )
        {
            color.g = 0;
        }
        renderer.Attributes.Set( "Color", color );
    }
}'
edited:
The project keeps crashing even during the editor bootup sequence as soon as it's trying to compile the shaders.
edited:
The error apparently was that "Default4" expecting float values instead of integers.
Changing the values from ex. '0' -> '0.0' fixed it.
inturnet
Member
JoinedAug 2024 Posts2 Score5,200
CreateTexture2D biden blasts my project
Lime1
Member
JoinedMay 2026 Posts41 Score14,691
i think its ram issue but idk
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.