System.NullReferenceException: Object... Sporadic errors with bridge between two subnets

Jan 28, 2015 at 10:07 PM
Edited Jan 29, 2015 at 1:51 PM
I recently setup Squiggle between two of our company subnets; it's working, however, I'm still getting errors and the bridge service keeps crashing. The bridge is between a Win 2003 x64 server and a Win 2008 x64, both are updated with .Net 4.0. This is in version

Below is a portion of the error log for Squiggle; it will work properly for a time, then go through a period where it starts generating the "Object reference not set to an instance of an object" error message only to resume working. Also, a copy of our bridge config file is included as well.

Erorr occured while forwarding presence message to bridge(s): System.NullReferenceException: Object reference not set to an instance of an object.
at Squiggle.Utilities.Net.Pipe.UnicastMessagePipe.Send(IPEndPoint target, Byte[] message)
at Squiggle.Bridge.BridgeHost.SendPresenceMessage(IPEndPoint target, Byte[] message)
at Squiggle.Bridge.SquiggleBridge.<>c__DisplayClass8.<presenceChannel_MessageReceived>b__7()
at Squiggle.Utilities.ExceptionMonster.<>c__DisplayClass1.<EatTheException>b__0()
at Squiggle.Utilities.ExceptionMonster.EatTheException[T](Func`1 action, String actionDescription, Boolean& success, Exception& ex)

And the Bridge Config
<?xml version="1.0"?>
    <section name="BridgeConfiguration" type="Squiggle.Bridge.Configuration.BridgeConfiguration, Squiggle.Bridge, Version=, Culture=neutral, PublicKeyToken=null"/>
    <InternalServiceBinding IP="" Port="5678"/>
    <ExternalServiceBinding IP="" Port="6789"/>
    <PresenceBinding MulticastIP="" MulticastPort="9998" ServicePort="9997" CallbackPort="9996" />
      <add IP="" Port="6789"/>
    <trace autoflush="true" >
        <add name="FileListener"
           initializeData="Squiggle.Bridge.log" />
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
Thanks for any help with this!
Jan 29, 2015 at 2:27 PM
James can you deploy a debug build of the Bridge so we can get more details on the exception? If you have visual studio, perhaps you can also debug this.
Jan 29, 2015 at 3:28 PM
I had one of our programmers look at the error and they're saying that it's either caused by a variable being called and not being there or not being pulled correctly or a null message being sent. The weird thing is, from the logs it will work correctly for a period of time then abruptly begin receiving the error,

I would like to make a suggestion with the log file - I noticed a couple of minor spelling errors which isn't really a big deal, but adding where the log adds a time stamp would be helpful... although, in this case, I think it would only cause to make the error log even larger.

I'm looking into how to debug the service, which seems to be the source of the issue of it restarting. Have you had any feedback on newer (4.5, etc) versions of ,Net having causing issues with the service functioning?
Jan 29, 2015 at 4:16 PM
I'll upload a new build with improved error logging in next few days which should help us track this down. In the meanwhile install bridge as a service in your machine and make it auto restart on crash.
Jan 30, 2015 at 1:09 PM
Edited Jan 30, 2015 at 1:12 PM
I'm having to wait for a good time for our programmer to be able to run a debug on the bridge on both of our servers (which will more than likely be when they aren't being slammed); also, from the logs, I haven't seen the initial reported error for some time, but now a new error is being generated:

Erorr occured while deserializing bridge message: ProtoBuf.ProtoException: No parameterless constructor found for Message
at ProtoBuf.Meta.TypeModel.ThrowCannotCreateInstance(Type type)
at proto_28(Object , ProtoReader )
at ProtoBuf.Serializers.CompiledSerializer.ProtoBuf.Serializers.IProtoSerializer.Read(Object value, ProtoReader source)
at ProtoBuf.Meta.RuntimeTypeModel.Deserialize(Int32 key, Object value, ProtoReader source)
at ProtoBuf.Meta.TypeModel.DeserializeCore(ProtoReader reader, Type type, Object value, Boolean noAutoCreate)
at ProtoBuf.Meta.TypeModel.Deserialize(Stream source, Object value, Type type, SerializationContext context)
at ProtoBuf.Serializer.Deserialize[T](Stream source)
at Squiggle.Utilities.Serialization.SerializationHelper.Deserialize[T](Byte[] data)
at Squiggle.Utilities.Serialization.SerializationHelper.<>c__DisplayClass11.<Deserialize>b__0()
at Squiggle.Utilities.ExceptionMonster.<>c__DisplayClass1.<EatTheException>b__0()
at Squiggle.Utilities.ExceptionMonster.EatTheException[T](Func
1 action, String actionDescription, Boolean& success, Exception& ex)