Qt OpenCV application doesn't run on Raspberry Pi display
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
add a comment |
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
add a comment |
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
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
c++ qt opencv raspberry-pi
asked Nov 20 '18 at 1:16
GafferMan2112GafferMan2112
550148
550148
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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
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 '18 at 20:38
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
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 '18 at 20:38
add a comment |
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
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 '18 at 20:38
add a comment |
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
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
answered Nov 20 '18 at 8:53
KeremKerem
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 '18 at 20:38
add a comment |
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 '18 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 '18 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 '18 at 20:38
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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