<div dir="ltr">Version 1.2.13 is ancient. Please start by using a current version, and then report back to the list.<div><br></div><div>/Peter</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-22 14:14 GMT+01:00 Grant Bagdasarian <span dir="ltr"><<a href="mailto:gb@cm.nl" target="_blank">gb@cm.nl</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m experiencing a rather weird issue when using the ESL libraries for .NET.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">When running the below code outside of Visual Studio in its own executable(Console Application) I’m receiving the below exception.<u></u><u></u></p>
<p class="MsoNormal">When the code is run inside Visual Studio, it works perfect.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Using ESL library contained in Freeswitch 1.2.13.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.<u></u><u></u></p>
<p class="MsoNormal"> at CSharp_ESLevent_Serialize(Void* jarg1, SByte* jarg2) in c:\users\gb\downloads\freeswitch-1.2.13\freeswitch-1.2.13\libs\esl\managed\esl_wrap.cpp:line 413<u></u><u></u></p>
<p class="MsoNormal"> at ManagedEsl.ESLPINVOKE.ESLevent_Serialize(HandleRef jarg1, String jarg2)<u></u><u></u></p>
<p class="MsoNormal"> at VoiceEventSocketDemoClient.Program.Main(String[] args) in c:\Users\gb\Documents\Visual Studio 2012\Projects\VoiceEventSocketDemoClient\VoiceEventSocketDemoClient\Program.cs:line 26<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="background:#1e1e1e"><span style="font-size:10.0pt;font-family:Consolas;color:#4ec9b0">TcpListener</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:white">server</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">=</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#569cd6">new</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#4ec9b0">TcpListener</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#4ec9b0">IPAddress</span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">.</span><span style="font-size:10.0pt;font-family:Consolas;color:white">Parse</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#d69d85">"LISTEN.IP.GOES.HERE"</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">), </span><span style="font-size:10.0pt;font-family:Consolas;color:#b5cea8">5000</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">);<u></u><u></u></span></p>
<p class="MsoNormal" style="background:#1e1e1e"><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> <u></u><u></u></span></p>
<p class="MsoNormal" style="background:#1e1e1e"><span style="font-size:10.0pt;font-family:Consolas;color:white">server</span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">.</span><span style="font-size:10.0pt;font-family:Consolas;color:white">Start</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">();<u></u><u></u></span></p>
<p class="MsoNormal" style="background:#1e1e1e"><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"><u></u><u></u></span></p>
<p class="MsoNormal" style="background:#1e1e1e"><span style="font-size:10.0pt;font-family:Consolas;color:#4ec9b0">TcpClient</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:white">eslClient</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">=</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:white">server</span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">.</span><span style="font-size:10.0pt;font-family:Consolas;color:white">AcceptTcpClient</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">();<u></u><u></u></span></p>
<p class="MsoNormal" style="background:#1e1e1e"><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"><u></u><u></u></span></p>
<p class="MsoNormal" style="background:#1e1e1e"><span style="font-size:10.0pt;font-family:Consolas;color:#4ec9b0">ESLconnection</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:white">eslConnection</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">=</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#569cd6">new</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#4ec9b0">ESLconnection</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">(</span><span style="font-size:10.0pt;font-family:Consolas;color:white">eslClient</span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">.</span><span style="font-size:10.0pt;font-family:Consolas;color:white">Client</span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">.</span><span style="font-size:10.0pt;font-family:Consolas;color:white">Handle</span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">.</span><span style="font-size:10.0pt;font-family:Consolas;color:white">ToInt32</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">());<u></u><u></u></span></p>
<p class="MsoNormal" style="background:#1e1e1e"><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"><u></u><u></u></span></p>
<p class="MsoNormal" style="background:#1e1e1e"><span style="font-size:10.0pt;font-family:Consolas;color:#4ec9b0">ESLevent</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:white">e</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">=</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"> </span><span style="font-size:10.0pt;font-family:Consolas;color:white">eslConnection</span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">.</span><span style="font-size:10.0pt;font-family:Consolas;color:white">GetInfo</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">();<u></u><u></u></span></p>
<p class="MsoNormal" style="background:#1e1e1e"><span style="font-size:10.0pt;font-family:Consolas;color:#4ec9b0">Console</span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">.</span><span style="font-size:10.0pt;font-family:Consolas;color:white">WriteLine</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">(</span><span style="font-size:10.0pt;font-family:Consolas;color:white">e</span><span style="font-size:10.0pt;font-family:Consolas;color:#b4b4b4">.</span><span style="font-size:10.0pt;font-family:Consolas;color:white">Serialize</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#d69d85">"json"</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro">));<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Does anyone know why this is happening? Maybe someone can reproduce the problem on their own PC using the above code example.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thank you!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards,<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Grant<u></u><u></u></p>
</font></span></div>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>