Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QtQuick Error on Android(3009 (EGL_BAD_MATCH))

QtQuick Error on Android(3009 (EGL_BAD_MATCH))

Scheduled Pinned Locked Moved QML and Qt Quick
18 Posts 9 Posters 12.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    flaviomarcio
    wrote on last edited by
    #1

    I can not run well on Android A QML.

    I got the error.

    E / libEGL (8495) eglMakeCurrent: 534 error 3009 (EGL_BAD_MATCH)

    The example works fine when run on windows.

    This missing LIB?

    Does anyone have any idea?

    Flavio Portela

    1 Reply Last reply
    0
    • F Offline
      F Offline
      flaviomarcio
      wrote on last edited by
      #2

      The source code in this post:

      https://groups.google.com/forum/?fromgroups=#!topic/android-qt/GTZsO5tbTso

      Flavio Portela

      1 Reply Last reply
      0
      • F Offline
        F Offline
        flaviomarcio
        wrote on last edited by
        #3

        Log build

        ....
        W/Qt ( 8495): scenegraph\coreapi\qsgmaterial.cpp:330 (virtual void QSGMaterialShader::compile()): QSGMaterialShader: Shader compilation failed:
        W/Qt ( 8495): scenegraph\coreapi\qsgmaterial.cpp:331 (virtual void QSGMaterialShader::compile()): ""
        W/Qt ( 8495): opengl\qopenglshaderprogram.cpp:1748 (int QOpenGLShaderProgram::uniformLocation(const char*) const): QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
        W/Qt ( 8495): opengl\qopenglshaderprogram.cpp:1748 (int QOpenGLShaderProgram::uniformLocation(const char*) const): QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linked
        W/Qt ( 8495): opengl\qopenglshaderprogram.cpp:1748 (int QOpenGLShaderProgram::uniformLocation(const char*) const): QOpenGLShaderProgram::uniformLocation( pixelSize ): shader program is not linked
        W/Qt ( 8495): opengl\qopenglfunctions.cpp:230 (QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext*)): QOpenGLFunctions created with non-current context
        W/Qt ( 8495): scenegraph\coreapi\qsgmaterial.cpp:330 (virtual void QSGMaterialShader::compile()): QSGMaterialShader: Shader compilation failed:
        W/Qt ( 8495): scenegraph\coreapi\qsgmaterial.cpp:331 (virtual void QSGMaterialShader::compile()): ""
        W/Qt ( 8495): opengl\qopenglshaderprogram.cpp:1748 (int QOpenGLShaderProgram::uniformLocation(const char*) const): QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
        W/Qt ( 8495): opengl\qopenglshaderprogram.cpp:1748 (int QOpenGLShaderProgram::uniformLocation(const char*) const): QOpenGLShaderProgram::uniformLocation( textureScale ): shader program is not linked
        W/Qt ( 8495): opengl\qopenglshaderprogram.cpp:1748 (int QOpenGLShaderProgram::uniformLocation(const char*) const): QOpenGLShaderProgram::uniformLocation( color ): shader program is not linked
        W/Qt ( 8495): opengl\qopenglshaderprogram.cpp:1748 (int QOpenGLShaderProgram::uniformLocation(const char*) const): QOpenGLShaderProgram::uniformLocation( alphaMin ): shader program is not linked
        W/Qt ( 8495): opengl\qopenglshaderprogram.cpp:1748 (int QOpenGLShaderProgram::uniformLocation(const char*) const): QOpenGLShaderProgram::uniformLocation( alphaMax ): shader program is not linked
        E/libEGL ( 8495): eglMakeCurrent:534 error 3009 (EGL_BAD_MATCH)
        W/Qt ( 8495): eglconvenience\qeglplatformcontext.cpp:111 (virtual bool QEGLPlatformContext::makeCurrent(QPlatformSurface*)): QEGLPlatformContext::makeCurrent: eglError: 3009, this: 0x54de7908
        W/Qt ( 8495):
        F/libc ( 8495): Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1), thread 8526 (QSGRenderThread)

        'org.qtproject.example.untitled2' died.

        Flavio Portela

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          I'm not a specialist in that area but just looking at the log it seems that you have a shader that fails to compile.

          If it's one of yours, are you sure that its compatible with EGLSL ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • F Offline
            F Offline
            flaviomarcio
            wrote on last edited by
            #5

            He compiled yes, this is the application log in AndroidOS
            Well it works on windows7.

            Flavio Portela

            1 Reply Last reply
            0
            • F Offline
              F Offline
              flaviomarcio
              wrote on last edited by
              #6

              The error occurs when you run:

              void MainWindow::on_pushButton_clicked()
              {

              QQuickView *view = new QQuickView;
              qDebug()<<"flavio";
              view->setSource(QUrl("qrc:/qml/pathview/pathview-example.qml"));
              view->show();
              

              }

              Flavio Portela

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Are you using the OpenGL or ANGLE build on windows ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  flaviomarcio
                  wrote on last edited by
                  #8

                  No, I'm testing the examples of Qtquick in android.

                  I took an example QtQuick then created a project with QMainWindow and include the pushbutton to run QtQuick

                  Flavio Portela

                  1 Reply Last reply
                  0
                  • F Offline
                    F Offline
                    flaviomarcio
                    wrote on last edited by
                    #9

                    If you can follow the link:

                    https://groups.google.com/forum/?fromgroups=#!topic/android-qt/GTZsO5tbTso

                    There is project untitled2.7z.

                    Flavio Portela

                    1 Reply Last reply
                    0
                    • U Offline
                      U Offline
                      user28
                      wrote on last edited by
                      #10

                      @Flavlo:
                      Have you found any solution for this yet? I am getting a similar error.
                      Refer , http://qt-project.org/forums/viewthread/31522/

                      1 Reply Last reply
                      0
                      • F Offline
                        F Offline
                        flaviomarcio
                        wrote on last edited by
                        #11

                        No, but I'm following the waiting list for the bug fix.

                        Flavio Portela

                        1 Reply Last reply
                        0
                        • F Offline
                          F Offline
                          flaviomarcio
                          wrote on last edited by
                          #12

                          Today I will check again. when I find the solution,'ll warn you.

                          Flavio Portela

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            mansi
                            wrote on last edited by
                            #13

                            Hi guys..
                            I am gettin the same error.
                            Flavio do let me know when the bug is fixed :)

                            Regards,
                            Mansi

                            1 Reply Last reply
                            0
                            • O Offline
                              O Offline
                              olheem
                              wrote on last edited by
                              #14

                              Hi!

                              I am getting the same error, too.

                              I just created a new project (qt quick 2 - build in elements), changed nothing and tried to run it on the android simulator.

                              Any help is very welcome.

                              Regards,
                              Oliver.

                              1 Reply Last reply
                              0
                              • Z Offline
                                Z Offline
                                zing0000
                                wrote on last edited by
                                #15

                                I had a large project running successfully on Android with Qt5.1.0
                                Then I "ported" the QML Quick 1.0 and declarative to QtQuick2.1 and quick.
                                Now I get the error as described above.

                                1 Reply Last reply
                                0
                                • I Offline
                                  I Offline
                                  Itoriachi
                                  wrote on last edited by
                                  #16

                                  Same issue here: porting a desktop application from Qt 4 to Qt 5.2 for Android. After struggling for some hours, I've found the problem is related to multiple top levels.
                                  My code worked perfectly on Nexus 7 (libEGL_tegra) but miserably crashed on Samsung devices (libEGL_mali). I don't know yet why this difference, but I've temporarily fixed it by removing the creation of the main window and by focusing on a single QQuickView. My next experiments will involve QWidget::createWindowContainer(), because I still need to use a QWidget.
                                  The code you've posted seems to share the same design, so I'd suggest to try a different approach. :)

                                  1 Reply Last reply
                                  0
                                  • T Offline
                                    T Offline
                                    T.Iotti
                                    wrote on last edited by
                                    #17

                                    ok, it's a long time but I don't know if you sorted it or not.

                                    First, your shader compiling on windows doesn't mean it will compile onandroid. Just an exemple:
                                    In windows you aren't required to set the precision of floating points and vectors, it may give you a warning but keep running anyway. But when you try the same code on Android, some mobiles requires you to set the float precision.
                                    And this is the most common case, got this problem, and sorted it by setting precision at every float.

                                    Second, I've got one implementation problem with QGLShaderProgram, using QOpenGLShaderProgram instead sorted my problem. I don't know exactly why but seems that QGLShaderProgram include some code in your shader that may crash in some GLSL drivers.

                                    In your link I couldn't find the shader code you are running, mind to tell me where is it, so I can take a look?

                                    Regards and sorry for my bad english.

                                    1 Reply Last reply
                                    0
                                    • D Offline
                                      D Offline
                                      Dimidroll93
                                      wrote on last edited by
                                      #18

                                      Anybody try issue in Qt 5.3?

                                      1 Reply Last reply
                                      0

                                      • Login

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Users
                                      • Groups
                                      • Search
                                      • Get Qt Extensions
                                      • Unsolved