New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
highgui: wayland: opencv_test_highgui fails #25550
Comments
Tested manually with Kubuntu 24.04 and Wayland session. Works well for me. |
The only issue I see for now is incorrect handling of invalid display case (e.g. ssh session without gui login). It crashes with sigsegv, but not assert/exception:
|
Thank you for your test. I fixed it.
Exception is happend at A. However it uses I add $ git diff -b 358699d2973371f9bf8bc1ab59045d517920dcd0
diff --git a/modules/highgui/src/window_wayland.cpp b/modules/highgui/src/window_wayland.cpp
index d21d1984ca..28c084794f 100644
--- a/modules/highgui/src/window_wayland.cpp
+++ b/modules/highgui/src/window_wayland.cpp
@@ -2326,6 +2326,7 @@ std::string const &cv_wl_core::get_window_name(void *handle) {
}
bool cv_wl_core::create_window(std::string const &name, int flags) {
+ CV_CheckTrue(display_ != nullptr, "Display is not connected.");
auto window = std::make_shared<cv_wl_window>(display_, name, flags);
auto result = windows_.insert(std::make_pair(name, window));
handles_[window.get()] = window->get_title(); |
highgui: wayland: fix to pass highgui test #25551 Close #25550 - optimize Mat to XRGB8888 conversion with OpenCV functions - extend to support CV_8S/16U/16S/32F/64F - extend to support 1/4 channels - fix to update value timing - initilize slider_ value if value is not nullptr. - Update user-ptr value and call on_change() function if cv_wl_trackbar::draw() is not called. - Update usage of WAYLAND/XDG macro to avoid reference undefined macro. - Update documents ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
highgui: wayland: fix to pass highgui test opencv#25551 Close opencv#25550 - optimize Mat to XRGB8888 conversion with OpenCV functions - extend to support CV_8S/16U/16S/32F/64F - extend to support 1/4 channels - fix to update value timing - initilize slider_ value if value is not nullptr. - Update user-ptr value and call on_change() function if cv_wl_trackbar::draw() is not called. - Update usage of WAYLAND/XDG macro to avoid reference undefined macro. - Update documents ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
System Information
OpenCV version: 4.x ( bc95f27 )
Operating System / Platform: Ubuntu 24.04
Compiler & compiler version: GCC 13.2
Detailed description
opencv_test_highgui with wayland fails.
Steps to reproduce
build opencv and run
./bin/opencv_test_highgui
Issue submission checklist
The text was updated successfully, but these errors were encountered: