Showing results 1 to 2 of 2

Thread: Binding string variable to WPF, data leak?

  1. #1
    Join Date

    Default Binding string variable to WPF, data leak?


    I created a simple XAML file containing not much more than a label and a viewbox. When I try to bind the value of a string variable to the label's content, the runtime will crash.

    Numerical values work fine though. The variable is provided via S7 TCP/IP driver.

    As a work around I created an internal string variable, and binding works as expexted. But, the runtime leaks memory ~20MByte causing it to freez after a while.

    Runtime is Zenon 6.51SP0, Windows XP, .Net3.5

    Any help appriciated

  2. #2

    Default Re: Binding string variable to WPF, data leak?

    Hi Sebastian,

    Thanks for your post and welcome to the forum!

    Generally it is possible to configure zenon string variables at WPF elements and use the string value to update WPF dependency properties. Of course the runtime should not crash, however it may very well be that there is an exception inside the .WPF which causes the runtime to crash. Incorrect programming in the .WPF may lead to instability of the runtime.

    Does this crash also occur when the S7 driver is set to "simulation static"? Perhaps the string variable is not advised (not constantly requested from the PLC) and this causes the issue. With a numerical value this may not occur when this variable value is used elsewere in the runtime (e.g. alarm, historian, etc.)

    Also, the memory consumption of the runtime should remain stable. If you can narrow down the constant increase of memory usage to the .WPF control, by removing it from the project, you may need to look at the .WPF itself to see where this memory leak occurs. With managed code, like the .NET code in the .wpf control, eventually a garbage collector may release memory again.

    Best regards,

Similar Threads

  1. Replies: 2
    Last Post: 23rd January 2013, 13:53
  2. String length field for STRING variables.
    By stolyarov_as in forum zenon Supervisor
    Replies: 3
    Last Post: 11th January 2013, 07:49
  3. Memory Leak when using IArchiveFilter.Query()
    By stolyarov_as in forum VSTA
    Replies: 7
    Last Post: 13th September 2011, 13:02
  4. Replies: 1
    Last Post: 23rd July 2011, 08:51
  5. Store variable data to file on change event
    By matholton in forum Drivers
    Replies: 1
    Last Post: 1st December 2008, 10:40

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts