471,330 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

Who's feeling brave?

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.

[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?

Dec 11 '05 #1
3 1058
I just tried this *exact* same code in VS 2003 and it works just fine.
No crashes and it works. Looks like this is a VS2005 issue.

Dec 11 '05 #2
Greg,

I tried the code in VS2005 and it worked fine for me. Perhaps you have
a corrupted install??

Brian

gr***********@gmail.com wrote:
I just tried this *exact* same code in VS 2003 and it works just fine.
No crashes and it works. Looks like this is a VS2005 issue.


Dec 11 '05 #3
I'm beginning to think it's something to do with PGP since .net is
showing that dll in it's fault message. Back to square one for me or
mabye I think it's time to uninstall PGP.

Thanks for trying it though.

Dec 11 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by WindAndWaves | last post: by
6 posts views Thread by Keith H Duggar | last post: by
21 posts views Thread by Cigar | last post: by
28 posts views Thread by DFS | last post: by
reply views Thread by André | last post: by
20 posts views Thread by kwikius | last post: by
19 posts views Thread by joebloe | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.