Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / June 2007

Tip: Looking for answers? Try searching our database.

COM-InterOp Error Message: RPC_E_SERVER_DIED

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JerryWEC - 01 Jun 2007 21:21 GMT
Hi all! I'm getting this message again. I have the <system.windows.forms
jitDebugging="true" /> in my config file and it seems like this is not
happening while attached to the VB6 client application and debugging.
However, while not attached to the VB6 client I am getting this message when
raising an exception to the com wrapper.  I need to know what causes this
message. And why can you turn it off while debugging. I seems like the
underlying Communication object is raising this error from a Background
Worker object.  It apprears to be an unhandled exception when it gets to my
WMWrapper class. Is there a way to igorne this unhandled exception?

Information is greatly appreciated!

whole message...

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80010007): The callee (server
[not server application]) is not available and disappeared; all connections
are invalid. The call may have executed. (Exception from HRESULT: 0x80010007
(RPC_E_SERVER_DIED))
  at System.RuntimeType.ForwardCallToInvokeMember(String memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
  at CLA_WMWrapper.IWMWrapperEvents.ErrorOccurred(String raisedEX)
  at CLA_WMWrapper.WMWrapper.m_WMInstance_ErrorOccurred(Exception raisedEX)
in I:\DEV\CLA_WeldMonitor\CLA_WMWrapper\WMWrapper.vb:line 216
  at CLA_WeldMonitor.WeldMonitor.ProcessException(Exception inException) in
I:\DEV\CLA_WeldMonitor\CLA_WeldMonitor\WeldMonitor.vb:line 1298
  at
CLA_WeldMonitor.WeldMonitor.m_Communications_DeviceErrorOccurred(String
deviceName, Exception deviceEx) in
I:\DEV\CLA_WeldMonitor\CLA_WeldMonitor\WeldMonitor.vb:line 2031
  at
CLA_Communications.Communications.m_DeviceInfoHandler_ErrorOccurred(String
deviceName, Exception ex) in
I:\DEV\CLA_Communications\Communications.vb:line 877
  at CLA_Communications.DeviceInfo.ProcessError(Exception& ex) in
I:\DEV\CLA_Communications\DeviceInfo.vb:line 458
  at
CLA_Communications.DeviceInfo.m_TCPClientDeviceHandler_ErrorOccurred(EndPoint
listenerEndPoint, Exception exception) in
I:\DEV\CLA_Communications\DeviceInfo.vb:line 1764
  at cla_TCPClient.ClientClass.ProcessError(Exception ex) in
I:\DEV\cla_TCPClient\ClientClass.vb:line 422
  at
cla_TCPClient.ClientClass.m_ClientCommunicationsProcessingWorker_ProgressChanged(Object
sender, ProgressChangedEventArgs e) in
I:\DEV\cla_TCPClient\ClientClass.vb:line 609
  at
System.ComponentModel.BackgroundWorker.OnProgressChanged(ProgressChangedEventArgs
e)
  at System.ComponentModel.BackgroundWorker.ProgressReporter(Object arg)

************** Loaded Assemblies **************
mscorlib
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
CLA_WMWrapper
   Assembly Version: 1.0.0.0
   Win32 Version: 1.0.0.0
   CodeBase:
file:///I:/DEV/CLA_WeldMonitor/CLA_WMWrapper/bin/Debug/CLA_WMWrapper.dll
----------------------------------------
CLA_WeldMonitor
   Assembly Version: 1.0.0.0
   Win32 Version: 1.0.0.0
   CodeBase:
file:///I:/DEV/CLA_WeldMonitor/CLA_WMWrapper/bin/Debug/CLA_WeldMonitor.DLL
----------------------------------------
Microsoft.VisualBasic
   Assembly Version: 8.0.0.0
   Win32 Version: 8.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Windows.Forms
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
LoginWin
   Assembly Version: 2.0.1.0
   Win32 Version: 2.0.1.0
   CodeBase:
file:///I:/DEV/CLA_WeldMonitor/CLA_WMWrapper/bin/Debug/LoginWin.DLL
----------------------------------------
CLA_Communications
   Assembly Version: 1.0.0.0
   Win32 Version: 1.0.0.0
   CodeBase:
file:///I:/DEV/CLA_WeldMonitor/CLA_WMWrapper/bin/Debug/CLA_Communications.DLL
----------------------------------------
Accessibility
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
cla_TCPClient
   Assembly Version: 1.0.0.0
   Win32 Version: 1.0.0.0
   CodeBase:
file:///I:/DEV/CLA_WeldMonitor/CLA_WMWrapper/bin/Debug/cla_TCPClient.DLL
----------------------------------------
CLA_Logging
   Assembly Version: 1.0.0.0
   Win32 Version: 1.0.0.0
   CodeBase:
file:///I:/DEV/CLA_WeldMonitor/CLA_WMWrapper/bin/Debug/CLA_Logging.DLL
----------------------------------------
System.Configuration
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
CLA_SerialPort
   Assembly Version: 1.0.0.0
   Win32 Version: 1.0.0.0
   CodeBase:
file:///I:/DEV/CLA_WeldMonitor/CLA_WMWrapper/bin/Debug/CLA_SerialPort.DLL
----------------------------------------
cla_TCPListener
   Assembly Version: 1.0.0.0
   Win32 Version: 1.0.0.0
   CodeBase:
file:///I:/DEV/CLA_WeldMonitor/CLA_WMWrapper/bin/Debug/cla_TCPListener.DLL
----------------------------------------
System.Web
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.210 (QFE.050727-2100)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
System.Data
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Data.OracleClient
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.Data.OracleClient/2.0.0.0__b77a5c561934e089/System.Data.OracleClient.dll
----------------------------------------
System.Web.Services
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
System.Transactions
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
3mkxqdem
   Assembly Version: 2.0.1.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.EnterpriseServices
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.42 (RTM.050727-4200)
   CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
   <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

JerryM
JerryWEC - 02 Jun 2007 20:33 GMT
I'm still getting the same basic message...

System.Runtime.InteropServices.COMException was unhandled by user code

 ErrorCode=-2147418105

 Message="The callee (server [not server application]) is not available and
disappeared; all connections are invalid. The call may have executed.
(Exception from HRESULT: 0x80010007 (RPC_E_SERVER_DIED))"

 Source="mscorlib"

 StackTrace:

      at System.RuntimeType.ForwardCallToInvokeMember(String memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)

      at CLA_WMWrapper.IWMWrapperEvents.WrapperErrorOccurred(String msg)

      at CLA_WMWrapper.WMWrapper.m_WMInstance_ErrorOccurred(String msg) in
I:\DEV\CLA_WeldMonitor\CLA_WMWrapper\WMWrapper.vb:line 212

      at CLA_WeldMonitor.WeldMonitor.ProcessException(Exception
inException) in I:\DEV\CLA_WeldMonitor\CLA_WeldMonitor\WeldMonitor.vb:line
1301

      at
CLA_WeldMonitor.WeldMonitor.m_Communications_DeviceDataReceived(String
deviceName, String data) in
I:\DEV\CLA_WeldMonitor\CLA_WeldMonitor\WeldMonitor.vb:line 2067

      at
CLA_Communications.Communications.m_DeviceInfoHandler_DataReceived(String
deviceName, String data) in I:\DEV\CLA_Communications\Communications.vb:line
848

Here is what I know...  I have a class called WeldMonitor (.net2005) and a
class called WMWrapper (.net2005). The WMWrapper exposes my events and
methods to COM (VB6) client application.  In the DeviceDataReceived event
handler I am raising an error from WeldMonitor to the WMWrapper. When the
exception event is re-raised in the WeldMonitor class to the event in the
WMWrapper class the RPC_E_Server_Died error occurs and is not handled do to
the fact that I'm trying to raise this new error to the wMWrapper as well.

I can just igonre all errors in this catch block but I'd really like to
understand what is going on here.  It looks like when the event I'm trying
to raise to the VB6 client (WMWrapper event called WrapperErrorOccurred) I
am getting this message. Which is really werd because I thought this
exception was from my lower level Communications object
(CLA_Communications\Communications.vb:line 848).

However, the message box that VS2005 is displaying says to check the
ErrorCode property of the exception to determine the HResult returned by the
COM object.  It's like the re-raising of this event (which is an error
message) is causing the issue and not the Communications object.

Any help is greatly appreciated!!!!

I was converting from a .net2005 exception  to a string in the original
WMWrapper.m_WMInstance_ErrorOccurred event handler in order to push back a
string to my COM / VB6 client.  Now I'm doing this in my WeldMonitor class
and only using strings in my events both on the WM and WMWrapper side.  I'm
still getting the same basic problem!!

JerryM
Walter Wang [MSFT] - 04 Jun 2007 08:14 GMT
Hi Jerry,

I've carefully reviewed your post. Based on my understanding, the exception
you're seeing:

1) only occurs when there's no debugger attached
2) related to jitDebugging setting, but I'm not very clear about it: does
it occur when it's enabled or not?

Also, I'm not very clear about following points:

1) Does it occur every time or randomly?
2) Do you mean that if you just ignore it, the program still runs fine?

By the way, you haven't come back to some of your recent posts in this
interop newsgroup. Which seems also related to this question, I'm wondering
if you've seen my replies there.

Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
JerryWEC - 04 Jun 2007 15:57 GMT
Walter, I have seen your replies and I really appreciate them!!!

On this topic, I originally thought the error was comming from a
COMMunication object I'm using based on the stack trace in the two
exceptions I posted.

Now, I'm thinking the issue is comming from my WMWrapper (my public
interface to VB6/COM).  I have an error I was throwing using the Throw key
word in my WeldMonitor object, which raised an event to the WMWrapper. Then
in this WMWrapper the COM/VB6 interface was throwing an unhandled exception
because I was raising the same event back to COM/VB6.

So, right now I'm not Throwing the exception and I'm raising an event (in
WeldMonitor) - Change 1.
I'm also not raising the event in my catch block in WMWrapper event (I'm
just not catching any COM HResults) - Change 2.

I'll look into the whole situation more when I have time.  I have to get
this application into production.

thanks for your help! JerryM

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.