Qt OpenCV application doesn't run on Raspberry Pi display











up vote
0
down vote

favorite












I have built a Qt application in C++ that utilizes OpenCV and runs on a Raspberry Pi. For some reason I cannot get this application to run directly on the Raspberry Pi's display.



The application runs fine if I send the display to a remote xserver, but if I try and run it and display it on the xserver running on the Pi I get the following errors:



libEGL warning: DRI2: failed to authenticate
qt5ct: using qt5ct plugin

** (LCVTrial_CppOpenCV:1914): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

(LCVTrial_CppOpenCV:1914): GLib-GObject-WARNING **: cannot register existing type 'GtkWidget'

(LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(LCVTrial_CppOpenCV:1914): GLib-GObject-WARNING **: cannot register existing type 'GtkBuildable'

(LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(LCVTrial_CppOpenCV:1914): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed


No errors are shown when running to a remote display.



I made a "stripped down" version of the application with only the GUI, removing OpenCV, and it runs fine on the Pi's display.



Any ideas or direction on where to look / investigate would be appreciated!










share|improve this question


























    up vote
    0
    down vote

    favorite












    I have built a Qt application in C++ that utilizes OpenCV and runs on a Raspberry Pi. For some reason I cannot get this application to run directly on the Raspberry Pi's display.



    The application runs fine if I send the display to a remote xserver, but if I try and run it and display it on the xserver running on the Pi I get the following errors:



    libEGL warning: DRI2: failed to authenticate
    qt5ct: using qt5ct plugin

    ** (LCVTrial_CppOpenCV:1914): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

    (LCVTrial_CppOpenCV:1914): GLib-GObject-WARNING **: cannot register existing type 'GtkWidget'

    (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

    (LCVTrial_CppOpenCV:1914): GLib-GObject-WARNING **: cannot register existing type 'GtkBuildable'

    (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

    (LCVTrial_CppOpenCV:1914): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

    (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

    (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed


    No errors are shown when running to a remote display.



    I made a "stripped down" version of the application with only the GUI, removing OpenCV, and it runs fine on the Pi's display.



    Any ideas or direction on where to look / investigate would be appreciated!










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have built a Qt application in C++ that utilizes OpenCV and runs on a Raspberry Pi. For some reason I cannot get this application to run directly on the Raspberry Pi's display.



      The application runs fine if I send the display to a remote xserver, but if I try and run it and display it on the xserver running on the Pi I get the following errors:



      libEGL warning: DRI2: failed to authenticate
      qt5ct: using qt5ct plugin

      ** (LCVTrial_CppOpenCV:1914): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

      (LCVTrial_CppOpenCV:1914): GLib-GObject-WARNING **: cannot register existing type 'GtkWidget'

      (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

      (LCVTrial_CppOpenCV:1914): GLib-GObject-WARNING **: cannot register existing type 'GtkBuildable'

      (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

      (LCVTrial_CppOpenCV:1914): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

      (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

      (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed


      No errors are shown when running to a remote display.



      I made a "stripped down" version of the application with only the GUI, removing OpenCV, and it runs fine on the Pi's display.



      Any ideas or direction on where to look / investigate would be appreciated!










      share|improve this question













      I have built a Qt application in C++ that utilizes OpenCV and runs on a Raspberry Pi. For some reason I cannot get this application to run directly on the Raspberry Pi's display.



      The application runs fine if I send the display to a remote xserver, but if I try and run it and display it on the xserver running on the Pi I get the following errors:



      libEGL warning: DRI2: failed to authenticate
      qt5ct: using qt5ct plugin

      ** (LCVTrial_CppOpenCV:1914): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

      (LCVTrial_CppOpenCV:1914): GLib-GObject-WARNING **: cannot register existing type 'GtkWidget'

      (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

      (LCVTrial_CppOpenCV:1914): GLib-GObject-WARNING **: cannot register existing type 'GtkBuildable'

      (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

      (LCVTrial_CppOpenCV:1914): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

      (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

      (LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed


      No errors are shown when running to a remote display.



      I made a "stripped down" version of the application with only the GUI, removing OpenCV, and it runs fine on the Pi's display.



      Any ideas or direction on where to look / investigate would be appreciated!







      c++ qt opencv raspberry-pi






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 20 at 1:16









      GafferMan2112

      400137




      400137
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          there are some missing libs on Raspi
          try on raspi terminal



          sudo apt-get install at-spi2-core


          in /etc/environment add



          QT_QPA_PLATFORMTHEME=gtk2


          and do not forget update gstreamer



          Hope it helps






          share|improve this answer





















          • I tried that. It got rid of the "qt5ct" message and the DBus warning, but all the other errors still come up and the application hangs. Also now, adding the gtk2 setting in /etc/environments makes it so I can't even run the application on the remote xserver. I get all the WARNING and CRITICAL errors from above along with "libGL error: No matching fbConfigs or visuals found" and "libGL error: failed to load driver: swrast".
            – GafferMan2112
            Nov 20 at 20:38













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53384888%2fqt-opencv-application-doesnt-run-on-raspberry-pi-display%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          there are some missing libs on Raspi
          try on raspi terminal



          sudo apt-get install at-spi2-core


          in /etc/environment add



          QT_QPA_PLATFORMTHEME=gtk2


          and do not forget update gstreamer



          Hope it helps






          share|improve this answer





















          • I tried that. It got rid of the "qt5ct" message and the DBus warning, but all the other errors still come up and the application hangs. Also now, adding the gtk2 setting in /etc/environments makes it so I can't even run the application on the remote xserver. I get all the WARNING and CRITICAL errors from above along with "libGL error: No matching fbConfigs or visuals found" and "libGL error: failed to load driver: swrast".
            – GafferMan2112
            Nov 20 at 20:38

















          up vote
          0
          down vote













          there are some missing libs on Raspi
          try on raspi terminal



          sudo apt-get install at-spi2-core


          in /etc/environment add



          QT_QPA_PLATFORMTHEME=gtk2


          and do not forget update gstreamer



          Hope it helps






          share|improve this answer





















          • I tried that. It got rid of the "qt5ct" message and the DBus warning, but all the other errors still come up and the application hangs. Also now, adding the gtk2 setting in /etc/environments makes it so I can't even run the application on the remote xserver. I get all the WARNING and CRITICAL errors from above along with "libGL error: No matching fbConfigs or visuals found" and "libGL error: failed to load driver: swrast".
            – GafferMan2112
            Nov 20 at 20:38















          up vote
          0
          down vote










          up vote
          0
          down vote









          there are some missing libs on Raspi
          try on raspi terminal



          sudo apt-get install at-spi2-core


          in /etc/environment add



          QT_QPA_PLATFORMTHEME=gtk2


          and do not forget update gstreamer



          Hope it helps






          share|improve this answer












          there are some missing libs on Raspi
          try on raspi terminal



          sudo apt-get install at-spi2-core


          in /etc/environment add



          QT_QPA_PLATFORMTHEME=gtk2


          and do not forget update gstreamer



          Hope it helps







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 20 at 8:53









          Kerem

          5511




          5511












          • I tried that. It got rid of the "qt5ct" message and the DBus warning, but all the other errors still come up and the application hangs. Also now, adding the gtk2 setting in /etc/environments makes it so I can't even run the application on the remote xserver. I get all the WARNING and CRITICAL errors from above along with "libGL error: No matching fbConfigs or visuals found" and "libGL error: failed to load driver: swrast".
            – GafferMan2112
            Nov 20 at 20:38




















          • I tried that. It got rid of the "qt5ct" message and the DBus warning, but all the other errors still come up and the application hangs. Also now, adding the gtk2 setting in /etc/environments makes it so I can't even run the application on the remote xserver. I get all the WARNING and CRITICAL errors from above along with "libGL error: No matching fbConfigs or visuals found" and "libGL error: failed to load driver: swrast".
            – GafferMan2112
            Nov 20 at 20:38


















          I tried that. It got rid of the "qt5ct" message and the DBus warning, but all the other errors still come up and the application hangs. Also now, adding the gtk2 setting in /etc/environments makes it so I can't even run the application on the remote xserver. I get all the WARNING and CRITICAL errors from above along with "libGL error: No matching fbConfigs or visuals found" and "libGL error: failed to load driver: swrast".
          – GafferMan2112
          Nov 20 at 20:38






          I tried that. It got rid of the "qt5ct" message and the DBus warning, but all the other errors still come up and the application hangs. Also now, adding the gtk2 setting in /etc/environments makes it so I can't even run the application on the remote xserver. I get all the WARNING and CRITICAL errors from above along with "libGL error: No matching fbConfigs or visuals found" and "libGL error: failed to load driver: swrast".
          – GafferMan2112
          Nov 20 at 20:38




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53384888%2fqt-opencv-application-doesnt-run-on-raspberry-pi-display%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Wiesbaden

          Marschland

          Dieringhausen