We have just seen this error message on a customer’s machine today.
The reason has been that the machine has two Graphic Cards (usually some “Intel Integrated Graphics” and a “High Performance Card”, such as NVIDIA GeForce, AMD Radeon).
We has to use the NVIDIA/AMD configuration tool. It has a settings panel to configure which application is using which graphic card(s). Add the Xojo-built.exe to the list of Application that will run on “Integrated Gaphics” (not the “High performance” one). And the Xojo-built application could be launched again without issues.
This RuntimeError is likely related to <https://xojo.com/issue/54979>.
I’ve just had a report of this same issue from a user (though in his case at D2DGraphicsBacking.cpp: 124). I checked and he also has dual graphics cards - one built-in Intel and one high performance. Also added to (https://xojo.com/issue/54979)]Feedback Case #54979.
If you’re building the application with 2019r2 or newer (preferrably 2019r3.1), then you could try this:
In App.Open set the following environment variable: System.EnvironmentVariable("XOJO_D2D_SOFTWARE_RENDERING") = "True".
I’m curious to know if this helps for that system/environment… If so, please add that to the Feedback Case, too.
Hmm - if you don’t want to rebuild the application for this customer, you could ask the customer to set this environment variable in cmd.exe, then launch the app from there (so that in inherits the env-variable):
If that works… the customer could persist that environment variable (e.g. via setx, registry - and I think there’s a system-setting-gui as well) as a workaround…
[quote=494983:@Jürg Otter]If you’re building the application with 2019r2 or newer (preferrably 2019r3.1), then you could try this:
In App.Open set the following environment variable: System.EnvironmentVariable("XOJO_D2D_SOFTWARE_RENDERING") = "True".[/quote]
Many thanks Jürg, but this particular user is not comfortable with technology, so I had enough trouble getting him to change the NVidia settings to force the app onto internal graphics (which worked, by the way). I don’t think I’m going to attempt to get him into the world of command line and setting env variables.