olive-editor / olive

Free open-source non-linear video editor
https://olivevideoeditor.org/
GNU General Public License v3.0
8.22k stars 556 forks source link

[RENDER] Olive fails to load after installation with OpenGL error #1385

Closed GUY-BBS closed 3 years ago

GUY-BBS commented 3 years ago

Commit Hash 6eade26b (1605768642)

Platform Win 10 i7 16GB Nvidia GTX 660M

Summary

Shader compile error on startup:

syntax error: #version is mandatory and should be set before any other token

Additional Information / Output

Console log

[WARNING] Trying to use locale "en_GB" but couldn't find a translation for it ((null):0)
[DEBUG] Extracting default OCIO config to "C:/Users/Guy Caplin/AppData/Local/olivevideoeditor.org/Olive/cache/ocioconf" ((null):0)
[INFO] Using Qt version: 5.15.1 ((null):0)
[WARNING] QOpenGLShader::compile(Vertex): ERROR: 0:1: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:2: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:? : 'pre-mature EOF' : syntax error syntax error

 ((null):0)
[WARNING] *** Problematic Vertex shader source code ***
#define lowp
#define mediump
#define highp
#line 1

    void setPosition();
    void main(void)
    {
        setPosition();
    }

    attribute highp   vec2      vertexCoordsArray;
    attribute highp   vec3      pmvMatrix1;
    attribute highp   vec3      pmvMatrix2;
    attribute highp   vec3      pmvMatrix3;
    void setPosition(void)
    {
        highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3);
        vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0);
        gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z);
    }

*** ((null):0)
[WARNING] Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader) failed to compile ((null):0)
[WARNING] QOpenGLShader::compile(Fragment): ERROR: 0:3: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:4: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:1: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:2: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:? : 'pre-mature EOF' : syntax error syntax error

 ((null):0)
[WARNING] *** Problematic Fragment shader source code ***
#ifdef GL_KHR_blend_equation_advanced
#extension GL_ARB_fragment_coord_conventions : enable
#extension GL_KHR_blend_equation_advanced : enable
#endif
#define lowp
#define mediump
#define highp
#line 1

    lowp vec4 srcPixel();
    void main()
    {
        gl_FragColor = srcPixel();
    }

    lowp vec4 srcPixel()
    {
        return vec4(0.98, 0.06, 0.75, 1.0);
    }

*** ((null):0)
[WARNING] Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragmentShader) failed to compile ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[ERROR] Errors linking simple shader: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::compile(Vertex): ERROR: 0:1: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:2: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:? : 'pre-mature EOF' : syntax error syntax error

 ((null):0)
[WARNING] *** Problematic Vertex shader source code ***
#define lowp
#define mediump
#define highp
#line 1

    attribute highp   vec2      textureCoordArray;
    varying   highp   vec2      textureCoords;
    void setPosition();
    void main(void)
    {
        setPosition();
        textureCoords = textureCoordArray;
    }

    attribute highp   vec4      vertexCoordsArray;
    void setPosition(void)
    {
        gl_Position = vertexCoordsArray;
    }

*** ((null):0)
[WARNING] Vertex shader for blitShaderProg (MainWithTexCoordsVertexShader & UntransformedPositionVertexShader) failed to compile ((null):0)
[WARNING] QOpenGLShader::compile(Fragment): ERROR: 0:3: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:4: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:1: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:2: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:? : 'pre-mature EOF' : syntax error syntax error

 ((null):0)
[WARNING] *** Problematic Fragment shader source code ***
#ifdef GL_KHR_blend_equation_advanced
#extension GL_ARB_fragment_coord_conventions : enable
#extension GL_KHR_blend_equation_advanced : enable
#endif
#define lowp
#define mediump
#define highp
#line 1

    lowp vec4 srcPixel();
    void main()
    {
        gl_FragColor = srcPixel();
    }

    varying   highp   vec2      textureCoords;
    uniform           sampler2D imageTexture;
    lowp vec4 srcPixel()
    {
return texture2D(imageTexture, textureCoords);
}

*** ((null):0)
[WARNING] Fragment shader for blitShaderProg (MainFragmentShader & ImageSrcFragmentShader) failed to compile ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[ERROR] Errors linking blit shader: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::compile(Vertex): ERROR: 0:1: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:2: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:? : 'pre-mature EOF' : syntax error syntax error

 ((null):0)
[WARNING] *** Problematic Vertex shader source code ***
#define lowp
#define mediump
#define highp
#line 1

    void setPosition();
    void main(void)
    {
        setPosition();
    }

    attribute highp   vec2      vertexCoordsArray;
    attribute highp   vec3      pmvMatrix1;
    attribute highp   vec3      pmvMatrix2;
    attribute highp   vec3      pmvMatrix3;
    void setPosition(void)
    {
        highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3);
        vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0);
        gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z);
    }

*** ((null):0)
[WARNING] Warning: "" failed to compile! ((null):0)
[INFO] Setting output audio device to "Default Output Device" ((null):0)
[WARNING] QOpenGLShader::compile(Vertex): ERROR: 0:1: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:2: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:? : 'pre-mature EOF' : syntax error syntax error

 ((null):0)
[WARNING] *** Problematic Vertex shader source code ***
#define lowp
#define mediump
#define highp
#line 1

    void setPosition();
    void main(void)
    {
        setPosition();
    }

    attribute highp   vec2      vertexCoordsArray;
    attribute highp   vec3      pmvMatrix1;
    attribute highp   vec3      pmvMatrix2;
    attribute highp   vec3      pmvMatrix3;
    void setPosition(void)
    {
        highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3);
        vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0);
        gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z);
    }

*** ((null):0)
[WARNING] Warning: "" failed to compile! ((null):0)
[WARNING] QOpenGLShader::compile(Vertex): ERROR: 0:1: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:2: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:? : 'pre-mature EOF' : syntax error syntax error

 ((null):0)
[WARNING] *** Problematic Vertex shader source code ***
#define lowp
#define mediump
#define highp
#line 1

    void setPosition();
    void main(void)
    {
        setPosition();
    }

    attribute highp   vec2      vertexCoordsArray;
    attribute highp   vec3      pmvMatrix1;
    attribute highp   vec3      pmvMatrix2;
    attribute highp   vec3      pmvMatrix3;
    void setPosition(void)
    {
        highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3);
        vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0);
        gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z);
    }

*** ((null):0)
[WARNING] Warning: "" failed to compile! ((null):0)
[WARNING] QOpenGLShader::compile(Vertex): ERROR: 0:1: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:1: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:? : 'pre-mature EOF' : syntax error syntax error

 ((null):0)
[WARNING] *** Problematic Vertex shader source code ***
#define lowp
#define mediump
#define highp
#line 1
attribute highp vec3 vertexCoord;attribute highp vec2 textureCoord;varying highp vec2 uv;uniform highp mat4 vertexTransform;uniform highp mat3 textureTransform;void main() {   uv = (textureTransform * vec3(textureCoord,1.0)).xy;   gl_Position = vertexTransform * vec4(vertexCoord,1.0);}
*** ((null):0)
[WARNING] QOpenGLShader::compile(Fragment): ERROR: 0:3: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:4: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:1: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:1: '' : syntax error: #version is mandatory and should be set before any other token
ERROR: 0:? : 'pre-mature EOF' : syntax error syntax error

 ((null):0)
[WARNING] *** Problematic Fragment shader source code ***
#ifdef GL_KHR_blend_equation_advanced
#extension GL_ARB_fragment_coord_conventions : enable
#extension GL_KHR_blend_equation_advanced : enable
#endif
#define lowp
#define mediump
#define highp
#line 1
varying highp vec2 uv;uniform sampler2D textureSampler;uniform bool swizzle;uniform highp float opacity;void main() {   highp vec4 tmpFragColor = texture2D(textureSampler,uv);   tmpFragColor.a *= opacity;   gl_FragColor = swizzle ? tmpFragColor.bgra : tmpFragColor;}
*** ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[WARNING] Could not link shader program:
 "Link called without any attached shader objects.\n" ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)
[WARNING] QOpenGLShader::link: Link called without any attached shader objects.
 ((null):0)

Hi Matt,

I have been running recent versions of Olive 0.2 and downloaded 6eade26b today but it fails to load.

Simran-B commented 3 years ago

Please use an issue template. Edited.

Simran-B commented 3 years ago

IIRC, then #version is only optional for GLSL (ES) shaders in version 1.0 (e.g. OpenGL ES 2.0), but apparently mandatory in later versions.

With OpenGL/GLSL ES 3.0 as target, the spec demands #version 300 es (page 8 and 11)

itsmattkc commented 3 years ago

Can you provide what GPU you have?

Unfortunately I've seen this before, none of these shaders are ours, they're all Qt's. It appears if you set the version to 3.0 (#1309), Qt will use shaders for 2.0 even though they're incompatible.

GUY-BBS commented 3 years ago

Hi,

My GPU is Nvidia GTX 660M. Today's download 857e4b04 fails to open as well. Hope this is of use.

Guy

GUY-BBS commented 3 years ago

Also tried download 857e4b04 on my HP laptop with standard Intel GFX with the same result.

wolfsprite commented 3 years ago

Was having same issue with same console error log with latest version (80dffed4) on a Surface Pro 3 running Windows 10. (No graphics card.)

Managed to resolve the issue and get Olive working running* by doing a bit of research into OpenGL and running an installer that symlinked several OpenGL related .dlls into the Olive executable folder. Sharing my steps so others can replicate and attempt to resolve for themselves, (and maybe help someone figure out and patch the issue!)

  1. Searching for OpenGL led to https://www.khronos.org/opengl/wiki/Platform_specifics:_Windows#Installing_Mesa3D_on_Windows and the following caught my attention: If your system does not contain a GPU, or the GPU vendor delivers graphics drivers providing OpenGL support that's so old as to be useless to you, you might want to consider installing the Mesa3D OpenGL library on your system to provide OpenGL support.

  2. I followed this link: https://github.com/pal1000/mesa-dist-win/releases and downloaded and extracted mesa3d-20.3.0-rc1-release-mingw.7z from release 20.3.0-rc1.

  3. Opened the mesa3d-20.3.0-rc1-release-mingw folder and ran perappdeploy.cmd to specifically target the Olive application folder (in my case: C:\Program Files\Olive), followed the instructions in the command prompt it opened, and said y (yes) to all optional OpenGL drivers, as was not sure what all was needed. Note: tried running systemwidedeploy.cmd first and that did not work, running perappdeploy.cmd and referencing the Olive application folder resolved everything though.

  4. With 11 .dll files related to OpenGL now symlinked in the Olive application folder, launching Olive now fully shows the editor instead of just a black screen. Have not fully tested whether everything is working yet, but at least can actually see the interface/GUI!

Hope this helps others!!

*Update: Attempting to work in a project with video resulted in no video footage being shown, and eventually Olive crashed. :(

Olive console log now shows the following with the 11 OpenGL .dll files instead of still being similar to what OP posted:

[WARNING] Trying to use locale "en_US" but couldn't find a translation for it ((null):0)
[DEBUG] Extracting default OCIO config to "C:/Users/K9/AppData/Local/olivevideoeditor.org/Olive/cache/ocioconf" ((null):0)
[WARNING] QOpenGLShader::compile(Vertex): 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.00 ES, and 3.00 ES
 ((null):0)
[WARNING] *** Problematic Vertex shader source code ***
#version 150
#define lowp
#define mediump
#define highp
#line 1

uniform mat4 ove_mvpmat;

in vec4 a_position;
in vec2 a_texcoord;

out vec2 ove_texcoord;

void main() {
    gl_Position = ove_mvpmat * a_position;
    ove_texcoord = a_texcoord;
}
*** ((null):0)
[ERROR] Failed to add vertex code to shader ((null):0)
[INFO] Using Qt version: 5.15.1 ((null):0)
[INFO] Setting output audio device to "Default Output Device" ((null):0)
itsmattkc commented 3 years ago

ade4369199e95fa5177b7ac7e982762f2dee806a should fix this