[Freeswitch-users] mod_managed switch_xml_open_cfg and SIGSEGV

R H buscom123+fs at gmail.com
Thu Sep 15 00:41:05 MSD 2011


Has anyone had success working with xml configuration files using
mod_managed? I have several modules that DO NOT override the xml
configuration but, rather, I actually want to configure them using the
freeswitch conf directory structure. I have not even tried to parse the xml
because I cant even load the xml. Here is a very basic example of what I
tried and the result I got:

The Code:
------------------------------------------------

using System;
using FreeSWITCH;
using FreeSWITCH.Native;

namespace PsiCallCenterAddon
{
public class FreeSwitchConfigLoader
{
public static void loadConfigTest()
{
try
{
switch_xml xml = freeswitch.switch_xml_open_cfg("freeswitch.conf", null,
null);
freeswitch.switch_xml_free(xml);
 Log.WriteLine(LogLevel.Alert, "Config Loader Success!");
}
catch
{
Log.WriteLine(LogLevel.Alert, "Config Loader Fail!");
}
}
}
}

------------------------------------------------

The Result:
------------------------------------------------

Stacktrace:

  at (wrapper managed-to-native)
FreeSWITCH.Native.freeswitchPINVOKE.switch_xml_open_cfg
(string,System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef)
<0x000a3>
  at (wrapper managed-to-native)
FreeSWITCH.Native.freeswitchPINVOKE.switch_xml_open_cfg
(string,System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef)
<0x000a3>
  at FreeSWITCH.Native.freeswitch.switch_xml_open_cfg
(string,FreeSWITCH.Native.SWIGTYPE_p_p_switch_xml,FreeSWITCH.Native.switch_event)
<0x0004f>
  at PsiCallCenterAddon.FreeSwitchConfigLoader.loadConfigTest () <0x0001b>
  at PsiCallCenterAddon.QueueMonitorLoader.Load () <0x0000b>
  at FreeSWITCH.PluginManager.RunLoadNotify (System.Type[]) <0x00190>
  at FreeSWITCH.AsmPluginManager.LoadInternal (string) <0x001eb>
  at FreeSWITCH.PluginManager.Load (string) <0x000a7>
  at (wrapper remoting-invoke-with-check) FreeSWITCH.PluginManager.Load
(string) <0x00067>
  at (wrapper xdomain-dispatch) FreeSWITCH.PluginManager.Load
(object,byte[]&,byte[]&,string) <0x0017b>
  at (wrapper xdomain-invoke) FreeSWITCH.PluginManager.Load (string)
<0x00126>
  at (wrapper remoting-invoke-with-check) FreeSWITCH.PluginManager.Load
(string) <0x00047>
  at FreeSWITCH.Loader.loadFile (string) <0x004a3>
  at FreeSWITCH.Loader.Load () <0x0027b>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool
(object,intptr,intptr,intptr) <0x00046>

Native stacktrace:

        /usr/lib64/libmono-2.0.so.1(+0xacba0) [0x7fc7ea58dba0]
        /usr/lib64/libmono-2.0.so.1(+0xfcedf) [0x7fc7ea5ddedf]
        /lib64/libpthread.so.0(+0xf2d0) [0x7fc7f1ceb2d0]

/usr/local/freeswitch/lib/libfreeswitch.so.1(switch_xml_open_cfg+0x1a)
[0x7fc7f260b0ea]
        [0x40155804]

Debug info from gdb:
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110914/7c1adfc8/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list