Different computers have different execution results

Hi,
In my application, the process of generating SCS files has been completed and run well on my computer.(Build model, insert mesh, insert pmi text, then GenerateSCSFile).

However, when I copy my application to other computers, some machines can execute it normally, while others throw exceptions when executing SC:: Store:: Utils:: Text:: InsertText.

Exception: Attempted to use a deleted, uninitialized, or otherwise invalid object.

I wonder if there are any runtime libraries or other basic libraries that need to be installed in advance to use it normally?

Thansk.

The issue could be due to specific fonts not being available in the machines in question. Also, the availability of certain fonts can be affected whether they are system fonts or user-installed fonts.

Thanks,
Tino

Hi,
The font I use was Cambria, one of windows system fonts.

SC::Store::MeshKey mesh_key = SC::Store::Utils::Text::InsertText(
                model, SC::Store::Utils::Text::TextAlignment::BottomLeft, rotMatrix,
                text, "Cambria", SC::Store::Utils::Text::FontStyle::None,
                SC::Store::Utils::Text::Quality::Low, SC::Store::Utils::Text::TextRepresentation::Full);

Then, is there any suggestion or way to fix this problem? I found the font file on that machines in directory : “C:\Windows\Fonts”.

Thanks.

Since Cambria is a system font, I don’t think the issue is because of an inaccessible font. That being said, perhaps as a test, you can copy and store the Cambria font in a local folder used by your appliction and then set the font directory to that folder via the function SetFontDirectory.

Also, machines need to have Visual C++ 2017 64-bit redistributables installed per our docs.

Have you noticed a common element to the machines that are throwing the exception? For example, make and model, old or new machine, recently purchased machines (so they may not be fully setup yet), etc.?

Thanks, I’ll check this.

I tried SetFontDirectory and installed C++ 2015-2022 Redistributable x64, still same exception.

“Have you noticed a common element to the machines that are throwing the exception?”

Those machines are using for server, the OS is Windows Server 2019 Datacenter 64.

There are very few applications installed on those machines:

Please see this post regarding the availability of drivers in Windows Server:

Hi,

It works by copying hps_directx11.dll and d3dcompiler_47.dll.

PS: The same exception threw in Linux, I copied libhps_opengl2_mesa.soandlibHGL.so to the run directory, then solved.

Thank you~

1 Like