Open mh-cbon opened 4 years ago
i m not sure this is solvable, this looks like it is an opencv issue (unclear as there is no such ticket https://github.com/opencv/opencv/issues?utf8=%E2%9C%93&q=is%3Aissue+wayland), not gocv. Maybe an env variable could be defined to exclude some tests (all stuff around windows) for systems that are not supported ?
We could do that with build tags and moving those tests into a separate file.
That said, I'm not sure what is or is not supported in Wayland as I do not have a test environment setup for it. So, not sure how to proceed on this one.
I had the same problem. The addSlider2 function of modules/highgui/src/window_QT.cpp of opencv need a parameter, named "value", to be not null.
void GuiReceiver::addSlider2(QString bar_name, QString window_name, void* value, int count, void* on_change, void *userdata)
{
QBoxLayout *layout = NULL;
QPointer<CvWindow> w;
if (!window_name.isEmpty())
{
w = icvFindWindowByName(window_name);
if (!w)
return;
}
else
{
if (global_control_panel)
layout = global_control_panel->myLayout;
}
QPointer<CvTrackbar> t = icvFindTrackBarByName(bar_name.toLatin1().data(), window_name.toLatin1().data(), layout);
if (t) //trackbar exists
return;
if (!value)
CV_Error(CV_StsNullPtr, "NULL value pointer" );
if (count <= 0) //count is the max value of the slider, so must be bigger than 0
CV_Error(CV_StsNullPtr, "Max value of the slider must be bigger than 0" );
CvWindow::addSlider2(w, bar_name, (int*)value, count, (CvTrackbarCallback2) on_change, userdata);
}
I fixed the problem setting a value to that parameter. My awful solution was modifying highgui.cpp of gocv:
int cero=0;
void Trackbar_Create(const char* winname, const char* trackname, int max) {
cv::createTrackbar(trackname, winname, &cero, max);
}
functioned but it is a horrible solution ;)
Hi, In my workspace, I changed this file: ./src/gocv.io/x/gocv/highgui.cpp After that, I compiled with "go build", and it worked.
El mié., 23 sept. 2020 a las 10:24, Patrick Hener (notifications@github.com) escribió:
@rafaelmeneses https://github.com/rafaelmeneses What am I supposed to do after changing it in my module pkg path at go/pkg/mod/ gocv.io/x/gocv@v0.24.0/highgui.cpp. The error still persists.
-- Rafael Meneses ____ Zambeca ®, 2019 | www.zambeca.cl
TestTrackbar is failing using wayland, with below error. Although, the lib is working fine.
Description
Steps to Reproduce
Your Environment