action #68474
Updated by mkittler over 4 years ago
I have updated my SLE15SP1 machine to current openQA and installed all SLE updates: openQA-4.6.1592990132.f2d269d68-2896.1.noarch os-autoinst-4.6.1592908950.5038d8c2-458.1.x86_64 libopencv3_4-3.4.10-2.1.x86_64 Previously installed openQA version was from January. Then I got failures in tests that worked before: after x11_start_program('xterm') on GNOME desktop the xterm did not appear. With vnc client I checked that xterm actually appeared, just the openQA screen was not updated. After more debugging I have found that ``` $sim = $lastscreenshot->similarity($image) if $lastscreenshot; ``` in backend/baseclass.pm method enqueue_screenshot returns NaN and this breaks all further updates. The following change apparently fixed the issue, but I don't understand why norm() could return NaN. Maybe the image is somewhat broken. ``` --- a/ppmclibs/tinycv_impl.cc +++ b/ppmclibs/tinycv_impl.cc @@ -301,6 +301,10 @@ double getPSNR(const Mat& I1, const Mat& I2) double noise = norm(I1, I2); + if (std::isnan(noise)) { + return VERY_DIFF; + } + if (!noise) { return VERY_SIM; } ```