Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Window with WPF Graph freezes when windows account locked

I met the same problem but I don't know how to solve.You have solved?

0 Kudos
Message 11 of 22
(4,987 Views)

Unfortunately, we have not found a workaround at this time.


You mention that you are experiencing the same issue: is your application also using multiple windows? Or are you encountering this under different circumstances?

~ Paul H
0 Kudos
Message 12 of 22
(4,980 Views)

Yes,the problem happened when the application have multiple windows and the graph is in child window.By the way,the Winform graph don't have the same issue.

0 Kudos
Message 13 of 22
(4,966 Views)

Hello Jsacks,

 

There has been a Corrective Action Request filed for this issue. The CAR number is 407433. I apologize for this inconvenience.

 

Regards,

 

-Travis E

National Instruments
Product Marketer
0 Kudos
Message 14 of 22
(4,953 Views)

Thanks Travis, I look forward to having a solution for this.

0 Kudos
Message 15 of 22
(4,951 Views)

Hi,

After more than half a year, I'm eager to know whether this issue be solved?Our NI client number is 554736,and we want to use WPF graph in multiple windows.

I look forward to your reply.

0 Kudos
Message 16 of 22
(4,862 Views)

Currently, CAR #407433 is still labeled as Open (i.e. In Work) by R&D. This may be targeted for the next patch release, which usually comes out in spring. When the patch is released, then we can check the release notes for bug fixes.

Taylor B.
National Instruments
0 Kudos
Message 17 of 22
(4,851 Views)

I have spent weeks trying to resolve this issue and have just posted this (http://forums.ni.com/t5/Measurement-Studio-for-NET/black-screen-on-PC-sleep-resume/m-p/2783366) and I initially thought the problem was while the computer resume from sleep: that is when I noticed it because I rarely lock my computer but when coming from lock, the computer is locked and has to be unlocked. I saw this post and try to lock/nlock the pc and I had the problem.

 

My own problem occurs because I am using a tabcontrol and all the tabpages containing the ni graph (graph, writable, or polar) becomes unresponsive or any window with NI graph freezes and I can't believe this issue has been raised since last year and NI has not resolved or provide a workaround since then. We paid for the measurement studio licence mainly because of the graph and now the graph is mostly un-usable. I have had numerous problems with the graph in the past (http://forums.ni.com/t5/Measurement-Studio-for-NET/wpf-graph-error-Cannot-draw-outside-of-a-draw-cyc... I believe the library should still be in a beta version and given out free to developers so that more people can use it and therefore the bugs will be detected and resolved faster instead of paid users spending days to debug un-necessary bugs.

 

I hope something is done fast to this issue because this is the only thing delaying the deployment of the project.

 

Thank you,

 

Akinola

0 Kudos
Message 18 of 22
(4,846 Views)

As Taylor mentioned, we are still working on this issue, and plan to have it fixed in the next Measurement Studio release.


At this point, since no Measurement Studio code is active before or after the computer is locked, we believe the problem is due to a bug in WPF (the "WM_PAINT storm" mentioned in HwndTarget). It is still not clear what aspect of the graph is triggering this issue in WPF.


As a workaround, it appears forcing the window to use software rendering when it is loaded avoids the issue (unfortunately, a "just in time" switch before the computer is locked has not work):


    public TestContainerWindow( ) {
        InitializeComponent( );
        Loaded += this.OnWindowLoaded;
    }

    private void OnWindowLoaded( object sender, RoutedEventArgs e ) {
        HwndSource source = (HwndSource)HwndSource.FromVisual( this );
        HwndTarget target = source.CompositionTarget;
        target.RenderMode = RenderMode.SoftwareOnly;
    }

~ Paul H
0 Kudos
Message 19 of 22
(4,816 Views)

That solves the issue. Thanks.

0 Kudos
Message 20 of 22
(4,795 Views)