<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DataSocket Hangs on Application Exit in Measurement Studio for .NET Languages</title>
    <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/316065#M2829</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Thanks Matt.&lt;/P&gt;
&lt;P&gt;I will look into it.&lt;/P&gt;
&lt;P&gt;Colin&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by Colin hughes on &lt;SPAN class="date_text"&gt;01-26-2006&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;04:05 AM&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2006 10:04:35 GMT</pubDate>
    <dc:creator>Colin hughes</dc:creator>
    <dc:date>2006-01-26T10:04:35Z</dc:date>
    <item>
      <title>DataSocket Hangs on Application Exit</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/311782#M2748</link>
      <description>&lt;DIV&gt;I have an application where I am reading from or writing to LabVIEW Shared variables from Measurement Studio's DataSocket Component.&amp;nbsp; The 3 shared variables are set up as follows&lt;/DIV&gt;
&lt;DIV&gt;- 2 string variables which buffer 1 string that can be up to 16 Meg Characters long.&lt;/DIV&gt;
&lt;DIV&gt;- 1 boolean variable&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;In VS.NET 2003, I am creating 3 instances of DataSocket.&amp;nbsp; 1 instance is set to ReadAutoUpdate for one of the string variables, another instance is set to WriteAutoUpdate for the other string variable, and the final one is set to WriteAutoUpdate for the boolean.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I noticed that when my application is closed, it is not fully exiting.&amp;nbsp; I thought this was due to not disposing the DataSocket instances (3) that I created, so I implemented the proper Dispose design pattern to Dispose the DataSockets.&amp;nbsp; When I do this, the application always hangs when trying to dispose the DataSocket that is set to ReadAutoUpdate on a string.&amp;nbsp; The other&amp;nbsp;DataSockets disposed fine.&amp;nbsp; Next, I tried to Disconnect before Disposing the DataSockets, and this time, the Disconnect call on only the one that is set to ReadAutoUpdate hung on Disconnect.&amp;nbsp; The other 2 DataSockets disconnected and disposed fine.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;With this setup, I have also noticed that if I have a DataSocket in .NET that both reads and writes one of these 16 meg char string variables, it doesn't quite work right.&amp;nbsp; It either writes an empty string or does not change the value at all.&amp;nbsp; However, this problem may be for another discussion.&amp;nbsp; I've worked around this by having an "In" and "Out" variable.&amp;nbsp; The boolean tells LabVIEW when it can read its input variable.&amp;nbsp; So far, this setup is working pretty well.&amp;nbsp; I just need to get around the disposing/disconnecting issue.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks!&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Jan 2006 15:23:18 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/311782#M2748</guid>
      <dc:creator>Mattholemew</dc:creator>
      <dc:date>2006-01-17T15:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: DataSocket Hangs on Application Exit</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/312673#M2753</link>
      <description>&lt;DIV&gt;Matt,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I'm nut sure what it causing the behavior you are experiencing.&amp;nbsp; I also have a few questions about your previous post.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;1. What do you mean when you say that your application is not fully exiting?&amp;nbsp; Does it hang when it's trying to exit, or do you believe that some memory is being left behind?&lt;/DIV&gt;
&lt;DIV&gt;2. Are you adding the datasocket control to a form?&amp;nbsp; If so, you shouldn't need to dispose of it.&amp;nbsp; It should be disposed of automatically by the form.&amp;nbsp; Maybe this is why&amp;nbsp;the application&amp;nbsp;is locking up.&lt;/DIV&gt;
&lt;DIV&gt;3. When you say that your string 16 Meg characters long do you mean it is 16,000,000 characters long?&lt;/DIV&gt;
&lt;DIV&gt;4. What language are you writing your application in?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I wanted to try to replicate your problem here on my computer, but found that I didn't have enough information.&amp;nbsp; If you could answer my previous questions I think I could help you much better.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Santiago D&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 Jan 2006 22:41:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/312673#M2753</guid>
      <dc:creator>Santiago D</dc:creator>
      <dc:date>2006-01-18T22:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: DataSocket Hangs on Application Exit</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/312675#M2754</link>
      <description>&lt;P&gt;1.&amp;nbsp; The application hangs when it is trying to exit.&lt;BR /&gt;2.&amp;nbsp; I'm not adding the DataSocket to a form.&amp;nbsp; I'm creating them at runtime through my code.&lt;BR /&gt;3.&amp;nbsp; The string fields are 16777216 characters long.&lt;BR /&gt;4.&amp;nbsp; c#&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2006 22:46:50 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/312675#M2754</guid>
      <dc:creator>Mattholemew</dc:creator>
      <dc:date>2006-01-18T22:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: DataSocket Hangs on Application Exit</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/313208#M2760</link>
      <description>&lt;P&gt;Matt,&lt;/P&gt;
&lt;P&gt;Thank you for your quick response!&amp;nbsp; I have one more question.&amp;nbsp; What version of Measurement Studio are you using?&lt;/P&gt;
&lt;P&gt;The latest version of Measurement Studio, 8.0, is the only version that can read from LabVIEW Shared Variables.&amp;nbsp; The behavior you are experiencing might be due to the version you are using.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Santiago D&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 Jan 2006 20:35:48 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/313208#M2760</guid>
      <dc:creator>Santiago D</dc:creator>
      <dc:date>2006-01-19T20:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: DataSocket Hangs on Application Exit</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/313240#M2763</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Santiago,&lt;/P&gt;
&lt;P&gt;I'm using Measurement Studio 8.0, Enterprise Edition (Included in Developer Suite Professional Control Edition)&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;-Matt&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2006 21:21:15 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/313240#M2763</guid>
      <dc:creator>Mattholemew</dc:creator>
      <dc:date>2006-01-19T21:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: DataSocket Hangs on Application Exit</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/313947#M2772</link>
      <description>&lt;P&gt;Matt,&lt;/P&gt;
&lt;P&gt;As your code stands right now, are you just creating the three Datasocket instances and reading from the shared variables?&amp;nbsp; If so, could you post your code so I could test it and see how you are disposing of the datasockets?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Santiago D&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Jan 2006 22:51:54 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/313947#M2772</guid>
      <dc:creator>Santiago D</dc:creator>
      <dc:date>2006-01-20T22:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: DataSocket Hangs on Application Exit</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/314050#M2773</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;I have not upgraded to Labview 8, but was wandering what share&amp;nbsp;variables are as I am confused by the statement that this is new for Labview 8 bur data sockets are not new.&lt;/P&gt;
&lt;P&gt;I have a Labview FPGA program&amp;nbsp;where the host vi is compiled&amp;nbsp;as a DLL so that I can use it with Visiual Studio.&lt;/P&gt;
&lt;P&gt;Now I am wandering if I could do it with these shared vaiables. I must admit that I did not think of data sockets but speed is important.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Colin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jan 2006 01:47:46 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/314050#M2773</guid>
      <dc:creator>Colin hughes</dc:creator>
      <dc:date>2006-01-22T01:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: DataSocket Hangs on Application Exit</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/314363#M2781</link>
      <description>&lt;DIV&gt;In LabVIEW 8, shared variables are a datasocket-like network publishing mechanism where you can share all kinds of data between labview processes and other processes (using DataSocket).&amp;nbsp; In LabVIEW, they kind of look like Global Variables, so it's easier to program between processes using them.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The reason I like using them with Measurement Studio is that they have some neat buffering characteristics.&amp;nbsp; If the variables are written, you can read the latest value of them using DataSocket, even if you weren't subscribed to them to start off with.&amp;nbsp; I'm not sure if you can do this with DataSocket alone.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;-Matt&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Jan 2006 14:43:07 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/314363#M2781</guid>
      <dc:creator>Mattholemew</dc:creator>
      <dc:date>2006-01-23T14:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: DataSocket Hangs on Application Exit</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/314368#M2782</link>
      <description>&lt;DIV&gt;Santiago,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Right now, I'm creating 3 DataSocket instances, writing to 2 of them, and reading from one of them.&amp;nbsp; The one I'm reading from is the one that locks up...&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I'll have to see if I can create a test project with this setup to recreate the problem...&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks,&lt;/DIV&gt;
&lt;DIV&gt;-Matt&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Jan 2006 14:49:34 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/314368#M2782</guid>
      <dc:creator>Mattholemew</dc:creator>
      <dc:date>2006-01-23T14:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: DataSocket Hangs on Application Exit</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/316065#M2829</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Thanks Matt.&lt;/P&gt;
&lt;P&gt;I will look into it.&lt;/P&gt;
&lt;P&gt;Colin&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by Colin hughes on &lt;SPAN class="date_text"&gt;01-26-2006&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;04:05 AM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2006 10:04:35 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DataSocket-Hangs-on-Application-Exit/m-p/316065#M2829</guid>
      <dc:creator>Colin hughes</dc:creator>
      <dc:date>2006-01-26T10:04:35Z</dc:date>
    </item>
  </channel>
</rss>

