Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

memory and handles leak in 64 bit version ?

More
03 Dec 2017 19:53 #5706 by Georges
the weak was low and perhaps the test was too short. I'll make a longer test.
Thank you.

Please Log in or Create an account to join the conversation.

More
03 Dec 2017 16:50 #5704 by support
Hello,

how long have you observed the values before concluding that there is a leak, and how fast the leak was? Can you provide PerfMon picture or data?

In general, since .NET manages the memory in a non-deterministic manner, very long observation periods are often necessary before a conclusion can be made. See www.opclabs.com/forum/ua-general/2278-internal-long-running-test-results#5579 .

Best regards

Please Log in or Create an account to join the conversation.

More
01 Dec 2017 08:39 #5703 by Georges
Hello,

I'm currently working in C# with version 2017.1 of QuickOPC and i have observed strange behaviors.
When compiling my program in 32 bit, i have no memory leak and no handle leak everything seems to work find.
When compiling my program in 64 bit, i'm observing that my memory consumption is growing and my handles are growing too.

My program is only doing some tags subscriptions and some direct readings.

here is the class code i'm using :
class DataManager:IDisposable
    {
        public delegate void NMessage(string Msg);
        public event NMessage NouveauMessage;
        public delegate void NValeur(string Msg);
        public event NValeur NouvelleValeur;
 
        private string sMessage = "";
 
        private EasyDAClient opcClient = null;
        private int[] handles = null;
 
        private List<DAItemGroupArguments> ArgumentsList = new List<DAItemGroupArguments>();
 
        public void Init()
        {
            sMessage = "Chargement des variables depuis le fichier XML ...";
            if (NouveauMessage != null)
            {
                NouveauMessage(sMessage);
            }
 
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Random", 300, 1));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp (10 min)", 1000, 2));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp (1 min)", 500, 3));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp (10 s)", 500, 4));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp (1 s)", 300, 5));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp 0:100 (10 min)", 1000, 6));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp 0:100 (1 min)", 500, 7));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp 0:100 (10 s)", 500, 8));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp 0:100 (1 s)", 300, 9));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp 0:360 (10 min)", 1000, 10));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp 0:360(1 min)", 300, 11));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp 0:360 (10 s)", 1000, 12));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Ramp 0:360 (1 s)", 500, 13));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.OnOff (10 min)", 500, 14));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.OnOff (1 min)", 300, 15));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.OnOff (10 s)", 1000, 16));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.OnOff (1 s)", 500, 17));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Incrementing (10 min)", 500, 18));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Incrementing (1 min)", 300, 19));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Incrementing (10 s)", 1000, 20));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Incrementing (1 s)", 300, 21));
            ArgumentsList.Add(new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Demo.Ramp", 1000, 22));
 
            sMessage = "Chargement des variables terminé.";
            if (NouveauMessage != null)
            {
                NouveauMessage(sMessage);
            }
        }
        public void Start()
        {
            if(opcClient == null)
            {
                if(ArgumentsList == null)
                {
                    Init();
                }
 
                opcClient = new EasyDAClient();
 
                opcClient.Isolated = true;
 
                handles = opcClient.SubscribeMultipleItems(ArgumentsList.ToArray(), OnItemChanged);
 
            }
 
 
        }
 
        public void Stop()
        {
            if (opcClient != null)
            {
                opcClient.UnsubscribeMultipleItems(handles);
                opcClient.Dispose();
                opcClient = null;
                ArgumentsList = null;
 
            }
 
            sMessage = "...";
            if (NouveauMessage != null)
            {
                NouveauMessage(sMessage);
            }
 
        }
 
        private void OnItemChanged(object sender, EasyDAItemChangedEventArgs eventArgs)
        {
            string Msg = "";
            if (eventArgs.Vtq.HasValue)
            { 
                Msg = string.Format("DT = {0} / ID = {1} / Val = {2} / Qualité = {3}",
                eventArgs.Vtq.Timestamp,
                eventArgs.Arguments.ItemDescriptor.ItemId,
                eventArgs.Vtq.DisplayValue(),
                eventArgs.Vtq.Quality.ToString()
                );
 
                if (NouvelleValeur != null)
                {
                    NouvelleValeur(Msg);
                }
            }
 
        }
 
        public string Lecture(string sTag)
        {
            string sRet = "";
 
            if (opcClient != null)
            {
                sRet = opcClient.ReadItemValue("OPCLabs.KitServer.2", new DAItemDescriptor(sTag)).ToString();
 
            }
 
            return sRet;
        }
 
        public string GetHandles()
        {
            string sRet = "";
 
            if (opcClient != null)
            {
                sRet = handles.Length.ToString();
            }
 
            return sRet;
 
        }
 
        public void Dispose()
        {
            throw new NotImplementedException();
        }
    }

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.047 seconds