Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Wpf graph with visual host RenderMode.Hardware error

Solved!
Go to solution

graph rendermode= RenderMode.Hardware

debug error :

 System.Windows.Threading.Dispatcher.Run( );

 

The calling thread could not access this object because another thread owns the object.

 

0 Kudos
Message 1 of 3
(3,478 Views)
Solution
Accepted by jiewei_li

I was able to reproduce the problem and track it to a non-dispatched internal access to the application's main window, and have created a task to fix this.


We only perform this access once, so as a workaround you can force this initilaization to happen early (before starting the graph on the background thread) by adding this call to the main window's constructor:


    public MainWindow( ) {
        new NationalInstruments.Controls.Primitives.Tables.RenderTargetBitmapWrapper( 1.0, 1.0 );

        InitializeComponent( );
    }

~ Paul H
0 Kudos
Message 2 of 3
(3,453 Views)

Just wanted to let you know this issue was fixed in the Measurement Studio 2019 release.

~ Paul H
0 Kudos
Message 3 of 3
(2,106 Views)