G
greg.merideth
I'm working on a .net remoting application that's taken a strange turn
for the worst. I've posted the shortest code snippet that still causes
the crash below. I've got a server app, a client caller and a remoting
object all in one project.
The kicker is, the remoting call's appear to work but *every* single
time we make a call, and the client exits, the server application
crashes.
The "brave" part is this. The event log shows that the faulting module
is in PGP. Now, how a PGP LSP module would cause the remoting
application to crash is *beyond* me and PGP is about as helpful at
support as sticking your hand down a emu's throat and trying to get
marshmallows.
If anyone has any idea whats going on here I'd like to know what could
be going on here. The error code is below the code. I've squeezed
things down to make it fit.
for the worst. I've posted the shortest code snippet that still causes
the crash below. I've got a server app, a client caller and a remoting
object all in one project.
The kicker is, the remoting call's appear to work but *every* single
time we make a call, and the client exits, the server application
crashes.
The "brave" part is this. The event log shows that the faulting module
is in PGP. Now, how a PGP LSP module would cause the remoting
application to crash is *beyond* me and PGP is about as helpful at
support as sticking your hand down a emu's throat and trying to get
marshmallows.
If anyone has any idea whats going on here I'd like to know what could
be going on here. The error code is below the code. I've squeezed
things down to make it fit.
Code:
///
/// the remote object
///
using System;
namespace c1.Remoting {
public class RemotingInteropClass : MarshalByRefObject { //
singleton
private int counter = 0;
private RemotingInteropClass() { }
public void IncrementCounter(int value) { counter += value; }
public int GetCounter() { return counter; }
public override Object InitializeLifetimeService() { return
null; }
static RemotingInteropClass mInstance = null;
public static RemotingInteropClass Instance {
get { if(mInstance == null) mInstance = new
RemotingInteropClass(); return mInstance; }
}
}
}
/// this works but then promptly crashes the server
/// the client
///
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;
using System.Runtime.Remoting.Channels.Tcp;
using c1.Remoting;
namespace c1Client {
class c1Client {
static void Main(string[] args) {
ChannelServices.RegisterChannel(new TcpChannel());
object objIClass =
Activator.GetObject(typeof(RemotingInteropClass),
"tcp://localhost:8090/IDFF");
RemotingInteropClass iClass =
(RemotingInteropClass)objIClass;
for(int i = 0; i < 10; ++i)
iClass.IncrementCounter(i);
Console.WriteLine("{0}", iClass.GetCounter().ToString());
}
}
}
///
/// the server
///
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Remoting.Channels.Tcp;
using c1.Remoting;
namespace c1Server {
class c1Server {
static void Main(string[] args) {
RemotingInteropClass iClass =
RemotingInteropClass.Instance;
TcpChannel ch = new TcpChannel(8090);
ChannelServices.RegisterChannel(ch);
RemotingServices.Marshal(iClass, "IDFF");
Console.ReadLine();
ch.StopListening(null);
}
}
}
The code above works in adding values 1 through 10 and shows the result
of 45 but then crashes with this error:
Faulting application c1server.exe, version 1.0.0.0, stamp 439b8910,
faulting module pgplsp.dll, version 9.0.2.2424, stamp 42e7fb45, debug?
0, fault address 0x0000532d
Any idea's?