# Different computers have different execution results

**URL:** <https://forum.techsoft3d.com/t/different-computers-have-different-execution-results/4255>\
**Category:** HOOPS Visualize Web\
**Tags:** learn, knowledge-base\
**Created:** [December 5, 2024, 7:03am UTC](https://forum.techsoft3d.com/t/different-computers-have-different-execution-results/4255 "2024-12-05T07:03:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![820110017](https://avatars.discourse-cdn.com/v4/letter/8/bc79bd/32.png) [@820110017](https://forum.techsoft3d.com/u/820110017)\
**Post date:** [December 5, 2024, 7:03am UTC](https://forum.techsoft3d.com/t/different-computers-have-different-execution-results/4255/1 "2024-12-05T07:03:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [December 5, 2024, 2:33pm UTC](https://forum.techsoft3d.com/t/different-computers-have-different-execution-results/4255/2 "2024-12-05T14:33:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![820110017](https://avatars.discourse-cdn.com/v4/letter/8/bc79bd/32.png) [@820110017](https://forum.techsoft3d.com/u/820110017)\
**Post date:** [December 6, 2024, 1:45am UTC](https://forum.techsoft3d.com/t/different-computers-have-different-execution-results/4255/3 "2024-12-06T01:45:45Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [December 6, 2024, 2:04am UTC](https://forum.techsoft3d.com/t/different-computers-have-different-execution-results/4255/4 "2024-12-06T02:04:35Z")

</div>

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](https://docs.techsoft3d.com/communicator/latest/api_ref/data_import/libsc/namespaceSC_1_1Store_1_1Utils_1_1Text.html#_CPPv4N2SC5Store5Utils4Text16SetFontDirectoryEPKc).

Also, machines need to have Visual C++ 2017 64-bit [redistributables](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-150) installed [per our docs](https://docs.techsoft3d.com/communicator/latest/overview/supported-platforms.html#windows-redistributables).

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.?

---

<div class="post-metadata">

**Author:** ![820110017](https://avatars.discourse-cdn.com/v4/letter/8/bc79bd/32.png) [@820110017](https://forum.techsoft3d.com/u/820110017)\
**Post date:** [December 6, 2024, 2:10am UTC](https://forum.techsoft3d.com/t/different-computers-have-different-execution-results/4255/5 "2024-12-06T02:10:25Z")

</div>

> [@tino](#):
>
> Also, machines need to have Visual C++ 2017 64-bit [redistributables](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-150) installed [per our docs](https://docs.techsoft3d.com/communicator/latest/overview/supported-platforms.html#windows-redistributables).

Thanks, I’ll check this.

---

<div class="post-metadata">

**Author:** ![820110017](https://avatars.discourse-cdn.com/v4/letter/8/bc79bd/32.png) [@820110017](https://forum.techsoft3d.com/u/820110017)\
**Post date:** [December 6, 2024, 4:48am UTC](https://forum.techsoft3d.com/t/different-computers-have-different-execution-results/4255/6 "2024-12-06T04:48:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![820110017](https://avatars.discourse-cdn.com/v4/letter/8/bc79bd/32.png) [@820110017](https://forum.techsoft3d.com/u/820110017)\
**Post date:** [December 6, 2024, 4:51am UTC](https://forum.techsoft3d.com/t/different-computers-have-different-execution-results/4255/7 "2024-12-06T04:51:51Z")

</div>

“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:

 ![4](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/8/82190ef55475a9cd0c50d984dec7ccb5f476cdde.jpeg)

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [December 6, 2024, 12:56pm UTC](https://forum.techsoft3d.com/t/different-computers-have-different-execution-results/4255/8 "2024-12-06T12:56:01Z")

</div>

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

> [@InvalidObjectException occurs with Stream Cache library](https://forum.techsoft3d.com/t/invalidobjectexception-occurs-with-stream-cache-library/1348):
>
> thinking Problem You experience an error in the Stream Cache library in HOOPS Communicator 2021 SP2 or later version, like InvalidObjectException occurs in sc\_store\_text sample. seedling Solution You can check the drivers which are installed on your environment and try the followings: DirectX11 Copy the files hps\_directx11.dll and d3dcompiler\_47.dll from authoring\converter\bin\win64 to be alongside authoring\_samples.exe. OpenGL There are no special files needed to make OpenGL work.…

---

<div class="post-metadata">

**Author:** ![820110017](https://avatars.discourse-cdn.com/v4/letter/8/bc79bd/32.png) [@820110017](https://forum.techsoft3d.com/u/820110017)\
**Post date:** [December 9, 2024, 8:27am UTC](https://forum.techsoft3d.com/t/different-computers-have-different-execution-results/4255/9 "2024-12-09T08:27:28Z")

</div>

Hi,

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

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

Thank you~
