Listbox garbled with Direct2D

Here it’s another example of the problems I’m getting with Xojo 2017r3 Direct2D drawing and listbox:

This is from a customer using Windows Server 2008 R2 from a thin client.
It happens random 2-3 times out of 10
:frowning:

Forgot to say this happens to other customers too, so it can’t be a local server/workstation problem.

That’s where the issue lives. I’ve seen issues like that in versions of Xojo going back years, not just D2D

I can assure this is not the case. Using the same application compiled with Xojo 2016r3 works as it worked from years since now,

What is the behavior of your application on Win7,8,10 ?

Where’s the image?

Wow, that is odd. It almost looks like its offset by the width of the scrollbar. Its odd why it only happens to half the image though.

It might be a problem connecting to a sub-2012 servers from newer clients while having under 16bit colours.

https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_perf-insiderplat_pc/corrupt-display-elements-in-remote-desktop/16942fb7-81eb-452b-9b38-1727a7e86e95

Try to increase the colour depth on the client or disable “persistent bitmap caching” on the client (see last post on link above).

A different RDC client might also fix the issue, not ideal though.

Just telling you what I’ve seen.
Also happens with some Java apps, like Oracle SQL Developer.

After some tests, this seems to be a Windows Server 2008 R2 problem only, due the same problem is not present in Windows Server 2012. The problem also, only happens via RDP connection.
Different RDP clients, including Microsoft Remote Desktop for Mac, changes nothing.

I have like the feeling on Xojo 2017r3 something is missing to fully support Direct2D drawing on Windows Server 2008 R2 and/or Windows 7.

Opened a feedback case: <https://xojo.com/issue/51065>

Did you get a chance to try a different colour bit depth?

Yes, tried and this changes nothing.

I start having the suspect the problem started since I enabled the graphic acceleration on the VM to solve the non printing problem reported in https://forum.xojo.com/44870-hard-crash-printing-with-windows-server-2008/0

What graphics card / integrated graphics solution is on the server and are their drivers up to date?

there is no graphic card as far as I know. The server runs as a VM with graphic acceleration enabled.

Hmm.

It would be interesting to know if ListBox used StretchDIBits in the framework, I doubt it if its a GDI call, but you never know:

https://kb.vmware.com/s/article/1261

Its getting to the point where it might be easier/quicker to wait for a Xojo fix for the non-accelerated Server 2008r2 problem :frowning:

On the VM, make sure that the total video memory is divisible by 64K, there can be DirectDraw issues with Terminal Services where the video memory isn’t aligned.

Reference: https://kb.vmware.com/s/article/1001558 its a Workstation issue, but they might be using an older version of ESXi that might have the issue.

Massimo, I’m trying to replicate the issue here on my lan, can you find out what settings they are using for all the options on these screenshots?

Seems to be the issue might be the use of a TEN YEAR OLD operating system, which had an end of life cycle in 2015
whereas Direct2D has undergone major changes itself with each release of Windows since 2008

So… from my prespective… Don’t blame Xojo unless issues occur with the latest Xojo AND the latest Windows

[quote=368699:@Dave S]Seems to be the issue might be the use of a TEN YEAR OLD operating system, which had an end of life cycle in 2015
whereas Direct2D has undergone major changes itself with each release of Windows since 2008

So… from my prespective… Don’t blame Xojo unless issues occur with the latest Xojo AND the latest Windows[/quote]

FYI, Both Xojo and Microsoft still officially support Windows Server 2008 R2, therefore, yes I blame both.

Thanks Julian, however I can tell you I tried already every possible setting and btw I also tried with different clients, including Microsoft Remote Desktop for Mac, and issue is still here. Must be a server issue.

In that case, here’s the last thing I can think of to fix the problem. If the session is running low on memory it might cause issues.

SessionViewSize is the allocated memory to each session for GUI objects such as fonts, menus, and windows. Increasing this might fix the issue.

https://support.microsoft.com/en-us/help/840342/applications-may-not-run-correctly-in-a-terminal-services-environment