hovik-aghajanyan / boghe

Automatically exported from code.google.com/p/boghe
0 stars 0 forks source link

missing a default 'configuration.xml' file & C# Exception #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I am evaluating the IMS/RCS client for Windows. I am having 2 issues:

1. When I run the pre-built binary - it quits trying to open a 
configuration.xml file. The first run creates and empty XML file. The second 
run just quits with no error.

  - Is there an example XML config file somewhere?

2. I built the project in VS2008 (both boghe & doubango). I get the same issue 
as above but I have a call stack trace now, to help in guiding me where to go 
next. I am not too familiar with SWIG but appearently the code generated C# 
tinyWrapper is unhappy/unable to instantiate a 'SipCallback' object. Any 
guidance appreciated :-)

System.TypeInitializationException was unhandled
  Message="The type initializer for 'org.doubango.tinyWRAP.tinyWRAPPINVOKE' threw an exception."
  Source="doubango"
  TypeName="org.doubango.tinyWRAP.tinyWRAPPINVOKE"
  StackTrace:
       at org.doubango.tinyWRAP.tinyWRAPPINVOKE.new_SipCallback()
       at org.doubango.tinyWRAP.SipCallback..ctor() in C:\dev\sipua\Doubango\bindings\csharp\SipCallback.cs:line 42
       at BogheCore.Services.Impl.SipService.MySipCallback..ctor(SipService sipService) in C:\dev\sipua\boghe\boghe-core\Services\Impl\SipService.Callback.cs:line 41
       at BogheCore.Services.Impl.SipService..ctor(ServiceManager serviceManager) in C:\dev\sipua\boghe\boghe-core\Services\Impl\SipService.cs:line 60
       at BogheApp.Services.Impl.Win32ServiceManager.get_SipService() in C:\dev\sipua\boghe\boghe-app\Services\Impl\Win32ServiceManager.cs:line 178
       at BogheApp.Services.Impl.Win32ServiceManager.Start() in C:\dev\sipua\boghe\boghe-app\Services\Impl\Win32ServiceManager.cs:line 80
       at BogheApp.App.Application_Startup(Object sender, StartupEventArgs e) in C:\dev\sipua\boghe\boghe-app\App.xaml.cs:line 64
       at System.Windows.Application.<.ctor>b__0(Object unused)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunInternal(Window window)
       at BogheApp.App.Main() in C:\dev\sipua\boghe\boghe-app\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.TypeInitializationException
       Message="The type initializer for 'SWIGExceptionHelper' threw an exception."
       Source="doubango"
       TypeName="SWIGExceptionHelper"
       StackTrace:
            at org.doubango.tinyWRAP.tinyWRAPPINVOKE.SWIGExceptionHelper..ctor()
            at org.doubango.tinyWRAP.tinyWRAPPINVOKE..cctor() in C:\dev\sipua\Doubango\bindings\csharp\tinyWRAPPINVOKE.cs:line 126
       InnerException: System.BadImageFormatException
            Message="An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
            Source="doubango"
            StackTrace:
                 at org.doubango.tinyWRAP.tinyWRAPPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_tinyWRAP(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate)
                 at org.doubango.tinyWRAP.tinyWRAPPINVOKE.SWIGExceptionHelper..cctor() in C:\dev\sipua\Doubango\bindings\csharp\tinyWRAPPINVOKE.cs:line 106
            InnerException: 

Original issue reported on code.google.com by rich.ho...@gmail.com on 14 Dec 2010 at 9:28

GoogleCodeExporter commented 8 years ago
1. The client should automatically create an empty and valid xml file. Could 
you please check that the client has rights to write to the current folder?
Which OS version are you using? Which .NET Framework version?

2. SipCallback class is in C/C++ DLL "tinyWRAP.dll". The csharp wrapper 
(doubango.dll) creates an instance of this class using P/Invoke. Could you 
check that both libraries are in the same folder?

Original comment by boss...@yahoo.fr on 14 Dec 2010 at 10:28

GoogleCodeExporter commented 8 years ago
WOW, wasn't expecting such a fast response... Many thanks!

Re Q1> Write permissions are wide open. Extra note: I am developing on Win7 Pro 
64-bit, VS2008 SP1, .Net Framework 4 (but I left the settings in the project to 
.Net 3.5)

Re Q2> yes all the DLL's were built fresh in VS2008. Here is an inventory of 
the DLL's created in ...sipua\boghe\Debug:
 Volume in drive C is Windows7_OS
 Volume Serial Number is EAEA-AEDE

 Directory of C:\dev\sipua\boghe\Debug

12/14/2010  01:38 PM            22,016 BogheControls.dll
12/14/2010  01:38 PM           112,128 BogheCore.dll
12/14/2010  01:38 PM            19,456 BogheXdm.dll
12/14/2010  01:38 PM            99,328 doubango.dll
12/14/2010  01:33 PM           270,336 log4net.dll
12/14/2010  02:15 PM         4,736,000 tinyDAV.dll
12/14/2010  02:08 PM           446,464 tinyDSHOW.dll
12/14/2010  01:47 PM           370,176 tinyHTTP.dll
12/14/2010  01:42 PM            44,544 tinyIPSec.dll
12/14/2010  01:48 PM           127,488 tinyMEDIA.dll
12/14/2010  01:48 PM           205,824 tinyMSRP.dll
12/14/2010  01:47 PM           240,128 tinyNET.dll
12/14/2010  01:47 PM            53,760 tinyRTP.dll
12/14/2010  01:42 PM           112,128 tinySAK.dll
12/14/2010  01:44 PM           135,680 tinySDP.dll
12/14/2010  01:47 PM           217,088 tinySIGCOMP.dll
12/14/2010  02:08 PM           701,440 tinySIP.dll
12/14/2010  01:47 PM            77,824 tinySMS.dll
12/14/2010  02:15 PM           232,960 tinyWRAP.dll
12/14/2010  02:08 PM            50,688 tinyXCAP.dll

Original comment by rich.ho...@gmail.com on 14 Dec 2010 at 10:47

Attachments:

GoogleCodeExporter commented 8 years ago
Have you managed to get it to work? Could you please try on a 32 bit system?
I have pushed a new version will more debug logs and new features.

Original comment by boss...@yahoo.fr on 20 Dec 2010 at 8:09

GoogleCodeExporter commented 8 years ago
Thanks, my current status: I tried Boghe-alpha_(1.0.20).zip pre-built but still 
fails to run on a Win7 64-bit... My primary system is - Win7 Pro 64-bit w/ .Net 
2.0 SP2, 3.5 and 4 (Client Profile)...

I will do 3 things:
1. Install the 64-bit version of 3.5 SP1
2. Try the client in WinXP 32-bit VM I have
3. Download the updated source and get you another trace...

Original comment by rich.ho...@gmail.com on 20 Dec 2010 at 5:08

GoogleCodeExporter commented 8 years ago
A1> I verified I have 64-bit .Net 3.5 SP1 installed

A2> Tried the prebuilt binary on WinXP 32-bit, it crashed on launch

A3> Downloaded new source, and it fails in the same spot, here is the trace:

2010-12-20 13:40:02,431 DEBUG [Main Thread] BogheApp.App:59 - 
====================================================
2010-12-20 13:40:02,464 DEBUG [Main Thread] BogheApp.App:60 - ======Starting 
Boghe - IMS/RCS Client v1.0.0 r501====
2010-12-20 13:40:02,464 DEBUG [Main Thread] BogheApp.App:61 - 
====================================================
2010-12-20 13:40:02,467 DEBUG [Main Thread] 
BogheApp.Services.Impl.Win32ServiceManager:72 - Start Service Manager
2010-12-20 13:40:02,586 DEBUG [Main Thread] 
BogheCore.Services.Impl.XmlConfigurationService:62 - Loading XML configuration 
from configuration.xml

It crashes in File: SipCallback.cs, Line-42: 
public SipCallback() : this(tinyWRAPPINVOKE.new_SipCallback(), true) {
    SwigDirectorConnect();
  }

Original comment by rich.ho...@gmail.com on 20 Dec 2010 at 6:52

GoogleCodeExporter commented 8 years ago
Seems that I have same problem. Bogheapp crash at same point. This is the log 
file created...

2010-12-22 13:25:26,663 DEBUG [Main Thread] BogheApp.App:0 - 
====================================================
2010-12-22 13:25:27,584 DEBUG [Main Thread] BogheApp.App:0 - ======Starting 
Boghe - IMS/RCS Client v1.0.0 r501====
2010-12-22 13:25:27,594 DEBUG [Main Thread] BogheApp.App:0 - 
====================================================
2010-12-22 13:25:27,624 DEBUG [Main Thread] 
BogheApp.Services.Impl.Win32ServiceManager:0 - Start Service Manager
2010-12-22 13:25:35,045 DEBUG [Main Thread] 
BogheCore.Services.Impl.XmlConfigurationService:0 - Loading XML configuration 
from configuration.xml
2010-12-22 13:25:35,055 DEBUG [Main Thread] 
BogheCore.Services.Impl.XmlConfigurationService:0 - configuration.xml doesn't 
exist, trying to create new one
2010-12-22 13:25:35,115 DEBUG [Main Thread] 
BogheCore.Services.Impl.XmlConfigurationService:0 - Saving configuration...

I have WXP with .net 3.5SP1. and visualC stuff

Original comment by segal...@gmail.com on 22 Dec 2010 at 12:31

GoogleCodeExporter commented 8 years ago
I have released a new version which should fix the issue.

Original comment by boss...@yahoo.fr on 28 Dec 2010 at 7:48

GoogleCodeExporter commented 8 years ago
I have tried both the new installed build () and a source code build. Both 
crash in Win7. It's not an administrative rights issue, log file is created.

The source code build crashes at, SipCallback.cs, Line-42: 

public SipCallback() : this(tinyWRAPPINVOKE.new_SipCallback(), true) {
    SwigDirectorConnect();
  }

Original comment by rich.ho...@gmail.com on 28 Dec 2010 at 10:21

GoogleCodeExporter commented 8 years ago
OK it's the famous "BadImageFormatException". Could you try to force the 
application to run inside WoW64 as explained here: 
http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/41
623cb4-107f-4bba-8167-4c78aad16e3b/ ?

Original comment by boss...@yahoo.fr on 28 Dec 2010 at 11:58

GoogleCodeExporter commented 8 years ago
I owe 'boss...@yahoo.fr' a cigar or a drink or something. Nice catch... That
worked!

For all those having trouble running under Win7 (or Vista) 64-bit. I needed
to reset the 'target platform' to 'x86' as it says in this article. Mixed
mode executables and 'Any CPU' targets appearently will not run on Win64
(i.e. won't run in the WOW64 32 bit emulator).

Here is how I fixed boghe to build & run on x64-bit Windoze boxes:
   1. Go to project settings of 'boghe-app', 'boghe-core', 'boghe-controls',
and 'boghe-xdm'
   2. Select the 'Build' tab
   3. Change platform target from 'Any CPU' to 'x86'
   4. I'd recompile the DLL's and C# (managed) code just to be certain
everything is targeted properly

The tiny**** DLL's were already set to x86 (32-bit) targets. Thanks again...

Original comment by rich.ho...@gmail.com on 29 Dec 2010 at 2:32

GoogleCodeExporter commented 8 years ago
Thanks for the feedback.
I have pushed a new installer but I don't have 64-bit machine. Could you please 
test it on your 64bit machine?

Original comment by boss...@yahoo.fr on 29 Dec 2010 at 6:38

GoogleCodeExporter commented 8 years ago
Not a problem...

I tested http://boghe.googlecode.com/files/Boghe_1.0.55.539.zip on Win7 Pro 
64-bit. This version runs fine on 64-bit, problem solved. Nice work.

Original comment by rich.ho...@gmail.com on 30 Dec 2010 at 12:59

GoogleCodeExporter commented 8 years ago
It doesn't work fir me. Exactly as previous pre-built executable, it crashes 
soon after start-up.

I was not able to built the whole project in VS 2010 due to missing DirectShow 
in the most recent DirectX SDK (June 2010). The code doesn't compile in VS 2010 
with the old DirectX.

I have Windows XP SP3
.Net 4 (also tried with 3.5 SP1 earlier, no luck)

The error shown upon crash reads:
An exception 'System.TypeInitializationException' has occured in BogheApp.exe

Original comment by victorx...@gmail.com on 30 Dec 2010 at 9:16

GoogleCodeExporter commented 8 years ago
@victor@victorx.eu
DirectShow is not part of DirectX SDK but from the Platform SDK.

Original comment by boss...@yahoo.fr on 3 Jan 2011 at 5:54

GoogleCodeExporter commented 8 years ago
Thanks. I only mentioned the compilation problem to give possible hint on the 
failure to start under Win XP Professional Version 2002 SP3 (32 bits). It might 
be not related.

The pre-built binary do start under 

- Win XP SP3 64 bits,
- Windows 7 Starter 32 bits

Original comment by victorx...@gmail.com on 3 Jan 2011 at 7:49

GoogleCodeExporter commented 8 years ago
In Win XP SP3 (32 bits) having Boghe_1.0.55.539.zip installed, the dependency 
walker shows errors. See attached images. As said earlier, the application 
doesn't start.

It might be not a problem of Boghe as such - the computer has seen many IDEs 
installed and removed, and many Windows updates.

Original comment by victorx...@gmail.com on 3 Jan 2011 at 9:02

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by boss...@yahoo.fr on 19 Jul 2011 at 2:08