Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qml Application crashed when start



  • Graphics Card:Intel(R) HD Graphics 630
    Driver Version:25.20.100.6323
    OS Version:10
    Qt Version:5.11.2
    Part Codes:

    qputenv("QSG_RENDER_LOOP", "basic");
    QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
    QCoreApplication::setAttribute(Qt::AA_DisableShaderDiskCache);
    
    ---------------------------
    Microsoft Visual C++ Runtime Library
    ---------------------------
    Debug Error!
    
    Program: C:\Qt\Qt5.11.2\5.11.2\msvc2015\bin\Qt5Cored.dll
    Module: 5.11.2
    File: scenegraph\qsgrenderloop.cpp
    Line: 274
    
    Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, colorSpace QSurfaceFormat::ColorSpace(DefaultColorSpace), profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) .
    This is most likely caused by not having the necessary graphics drivers installed.
    
    Install a driver providing OpenGL 2.0 or higher, or, if this is not possible, make sure the ANGLE Open GL ES 2.0 emulation libraries (libEGLd.dll, libGLESv2d.dll and d3dcompiler_*.dll) are available in the application executable's directory or in a location listed in PATH.
    
    (Press Retry to debug the application)
    


  • @hobbe

    What happens if you remove

    // qputenv("QSG_RENDER_LOOP", "basic");
    // QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
    // QCoreApplication::setAttribute(Qt::AA_DisableShaderDiskCache);
    

    and let Qt decides what kind of render loop and OpenGL implementation it should use?



  • @beecksche said in Qml Application crashed when start:

    @hobbe

    What happens if you remove

    // qputenv("QSG_RENDER_LOOP", "basic");
    // QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
    // QCoreApplication::setAttribute(Qt::AA_DisableShaderDiskCache);
    

    and let Qt decides what kind of render loop and OpenGL implementation it should use?

    remove these codes,APP also crashed with the same reason


  • Qt Champions 2019

    @hobbe Try to update the driver for your graphics card.



  • @jsulm said in Qml Application crashed when start:

    @hobbe Try to update the driver for your graphics card.

    Driver already the newest version and we must use AA_UseSoftwareOpenGL to render
    if we use AA_UseOpenGLES everything is OK,change to AA_UseSoftwareOpenGL APP will crash sometimes


  • Qt Champions 2019

    @hobbe You should check the bug tracker and file a bug if there is nothing


Log in to reply