helix-toolkit / helix-toolkit

Helix Toolkit is a collection of 3D components for .NET.
http://helix-toolkit.org/
MIT License
1.84k stars 661 forks source link

HelixToolkit.SharpDX.WPF crashes on some integrated graphics systems. #1911

Open wdc63 opened 1 year ago

wdc63 commented 1 year ago

The program I developed performs well on my two systems (5800X+GTX1080) and (i7-10700f+RTX3070Ti), including in virtual machines. I tested new installations in VM of Win7, Win8, Win10, and Win11, and they all run normally.

However, when I distributed the build to some clients, they encountered crashes when starting up. It seems that there are some issues with SharpDx when rendering 2Dtext. These computers have some common features, including Windows 10 system, Intel CPU below 8th generation, and integrated graphics. I tried installing DirectX End-User Runtimes (June 2010), but it did not solve the problem. What should I do to solve this issue?

The screenshots of error codes and one of the configurations are provided below.

微信图片_20230228132046 微信图片_20230228133051 微信图片_20230228133058 微信图片_20230228133103

holance commented 1 year ago

Try to disable dx 2d by setting Viewport3DX.EnableD2DRendering = false.

wdc63 commented 1 year ago

Try to disable dx 2d by setting Viewport3DX.EnableD2DRendering = false.

It worked, However, my program uses a lot of d2d features and cannot be disabled.

I tested it and found that it seems to be caused by the binding of TextModel2D's Foreground and Text properties to null during program initialization.

Viewport3DX is in a user control in my program, and some strings and brushes properties bounding by some TextModel2D are not initialized with default value when the MainWindow creates the model and set is as datacontext. These properties will only be assigned a value during deserialization or loading of user data. If I remove these bindings, there will be no error.

holance commented 1 year ago

Please try with the latest nightly build.