Failing VCL complextext rendering unit test on Windows

classic Classic list List threaded Threaded
6 messages Options
Jan-Marek Glogowski Jan-Marek Glogowski
Reply | Threaded
Open this post in threaded view
|

Failing VCL complextext rendering unit test on Windows

Hi everyone,

when running

$ /opt/lo/bin/make-4.2.1-msvc -C vcl CppunitTest_vcl_complextext

on Windows 7, KVM QXL GUI via Spice I get the following failures:

C:/cygwin64/srv/dev/master-debug/vcl/qa/cppunit/complextext.cxx:98:VclComplexTextTest::testArabic
equality assertion failed
- Expected: 71x14@(0,1)
- Actual  : 70x14@(1,1)

VclComplexTextTest::testArabic finished in: 171ms
VclComplexTextTest::testTdf95650 finished in: 86ms
C:/cygwin64/srv/dev/master-debug/vcl/qa/cppunit/complextext.cxx(98) :
error : Assertion
Test name: VclComplexTextTest::testArabic
equality assertion failed
- Expected: 71x14@(0,1)
- Actual  : 70x14@(1,1)

This doesn't happen when run via a Cygwin SSH session.

I added a

SAL_DEBUG( "ID: " << rGlyph.maGlyphId << " " << rRect << " " <<
aGM.gmCellIncX << " " << aGM.gmCellIncY );

to the end of WinSalGraphics::GetGlyphBoundRect

and normalized the output using
sed -i -e 's/^debug[^ ]* //' workdir/CppunitTest/vcl_complextext.test.log

The following diff is between the SSH and GUI session:

 ID: 1397 4x3@(1,-10) 0 0
-ID: 5262 6x6@(1,-6) 6 0
-ID: 5269 3x7@(0,-7) 3 0
-ID: 5366 7x9@(0,-9) 7 0
-ID: 5269 3x7@(0,-7) 3 0
+ID: 5262 7x6@(0,-6) 6 0
+ID: 5269 4x7@(-1,-7) 3 0
+ID: 5366 8x9@(0,-9) 7 0
+ID: 5269 4x7@(-1,-7) 3 0
 ID: 3 1x1@(0,0) 4 0
-ID: 5344 8x7@(1,-4) 9 0
-ID: 5358 4x6@(0,-4) 4 0
-ID: 5346 4x6@(0,-6) 4 0
+ID: 5344 10x7@(0,-4) 9 0
+ID: 5358 5x6@(-1,-4) 4 0
+ID: 5346 5x6@(-1,-6) 4 0
 ID: 1398 4x3@(1,0) 0 0
-ID: 5269 3x7@(0,-7) 3 0
-ID: 1363 2x12@(1,-9) 3 0
+ID: 5269 4x7@(-1,-7) 3 0
+ID: 1363 3x12@(0,-9) 3 0
 ID: 3 1x1@(0,0) 4 0
 ID: 1403 4x4@(1,-11) 0 0
-ID: 5284 5x5@(1,-5) 6 0
+ID: 5284 7x5@(0,-5) 6 0
 ID: 1401 4x2@(1,0) 0 0
-ID: 5277 7x5@(0,-5) 7 0
-ID: 1365 1x9@(1,-9) 3 0
+ID: 5277 8x5@(-1,-5) 7 0
+ID: 1365 2x9@(1,-9) 3 0
 ID: 1393 6x7@(-1,-4) 6 0

All height values are the same, just the width and x-offsets change.

From the documentation, the provided matrix to the function is the
identity matrix, which just leaves some room for different HDC.

AFAIK HDC is driver dependent (whatever driver is used for SSH) and so
I'm not sure this is fixable at all.

So I propose disabling it also on Windows.

Any comments?

Jan-Marek
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Khaled Hosny Khaled Hosny
Reply | Threaded
Open this post in threaded view
|

Re: Failing VCL complextext rendering unit test on Windows

CONTENTS DELETED
The author has deleted this message.
Jan-Marek Glogowski Jan-Marek Glogowski
Reply | Threaded
Open this post in threaded view
|

Re: Failing VCL complextext rendering unit test on Windows

Am 24.03.2017 um 12:32 schrieb Khaled Hosny:

> On Fri, Mar 24, 2017 at 11:29:52AM +0100, Jan-Marek Glogowski wrote:
>> Hi everyone,
>>
>> when running
>>
>> $ /opt/lo/bin/make-4.2.1-msvc -C vcl CppunitTest_vcl_complextext
>>
>> on Windows 7, KVM QXL GUI via Spice I get the following failures:
> […]
>> All height values are the same, just the width and x-offsets change.
>
> Hmm, might be related to Windows font rendering settings, AFAIK Windows
> disables anti-aliasing for rdesktop (and I guess this what Spice uses)

No. Spice is a protocol (https://www.spice-space.org/) and has it's own
graphic driver (QXL). I don't know how rdesktop and Spice work in
detail, but my guess is it's different. QXL is more in line with the
vmware and virtualbox video drivers, which allow to resize the viewers
window and adapt the VMs graphic output size.

Originally I thought it may be an off-by-one problem in the QXL driver,
but then I saw all the different glyph calculation and gave up on this idea.

> and different font rendering strategy can result in different glyph
> widths. Only bounding box is affected since we still use Windows API
> for it (unlike glyph widths for layout).
>
>> From the documentation, the provided matrix to the function is the
>> identity matrix, which just leaves some room for different HDC.
>>
>> AFAIK HDC is driver dependent (whatever driver is used for SSH) and so
>> I'm not sure this is fixable at all.
>>
>> So I propose disabling it also on Windows.
>
> I suppose we have no way to change the font settings during the testing,
> so disabling this part of the test would be the simplest. Alternatively
> we can add some tolerance to the test (a pixel or two?) but no idea how.

No idea, if possible.
https://gerrit.libreoffice.org/#/c/35647/ fixes the problem for me.

Do you remember, if there were many different results on Linux tinderboxes?
Because your commit message mentioned them as the reason to run the test
only on Windows and Mac.

> Regards,
Jan-Marek

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Khaled Hosny Khaled Hosny
Reply | Threaded
Open this post in threaded view
|

Re: Failing VCL complextext rendering unit test on Windows

CONTENTS DELETED
The author has deleted this message.
Khaled Hosny Khaled Hosny
Reply | Threaded
Open this post in threaded view
|

Re: Failing VCL complextext rendering unit test on Windows

CONTENTS DELETED
The author has deleted this message.
Christian Lohmaier-3 Christian Lohmaier-3
Reply | Threaded
Open this post in threaded view
|

Re: Failing VCL complextext rendering unit test on Windows

In reply to this post by Khaled Hosny
Hi *,

On Fri, Mar 24, 2017 at 12:32 PM, Khaled Hosny <[hidden email]> wrote:

> On Fri, Mar 24, 2017 at 11:29:52AM +0100, Jan-Marek Glogowski wrote:
>> Hi everyone,
>>
>> when running
>>
>> $ /opt/lo/bin/make-4.2.1-msvc -C vcl CppunitTest_vcl_complextext
>>
>> on Windows 7, KVM QXL GUI via Spice I get the following failures:
> […]
>> All height values are the same, just the width and x-offsets change.
>
> Hmm, might be related to Windows font rendering settings, AFAIK Windows
> disables anti-aliasing for rdesktop

Depends on your settings. But yeah, with the lower-bandwidth settings
Cleartype and other things are disabled by default (but you can
reenable with no problem)

And yes, this in the past already had caused tests to fail.
see https://gerrit.libreoffice.org/#/c/26981/ for one I ran into.

Spice might also cause cleartype to be disabled, not sure..

ciao
Christian
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice