NullReferenceException

.NET library for SMPP protocol
Locked
journo
Posts: 6
Joined: Sun Feb 09, 2014 9:55 am

NullReferenceException

Post by journo » Sun Feb 09, 2014 9:58 am

Hi,

I just tested your component to send out a bulk SMS.

I received this exception a number of times.

System.NullReferenceException: Object reference not set to an instance of an object.
at Inetlab.SMPP.Common.SmppClientBase.SendPDUAndReturnResponse[TResponse](SmppPDU pdu)
at Inetlab.SMPP.SmppClient.Submit(SubmitSm pdu)
at Inetlab.SMPP.SmppClient.Submit(IList`1 submitSmList)
at Inetlab.SMPP.SmppClient.Submit(IBuilder`1 submitBuilder)
at TOBackend.clsSenderThread.SenderCode() in D:\HostingSpaces2\admin\TOBackend\clsSenderThread.vb:line 414

The code for that line is
SubmitResponse = _SMPPConnection.Submit(SMS.ForSubmit().Coding(DataCodings.Latin1).DeliveryReceipt().From(SourceAddr).Text(ShortMessage).To(DestAddr))

Any ideas what the problem could be?

Thanks
Dan
journo
Posts: 6
Joined: Sun Feb 09, 2014 9:55 am

Re: NullReferenceException

Post by journo » Mon Feb 10, 2014 9:19 am

I also get this

System.NullReferenceException: Object reference not set to an instance of an object.
at Inetlab.SMPP.Common.SmppClientBase.SendPDUAndReturnResponse[TResponse](SmppPDU pdu)
at Inetlab.SMPP.SmppClient.Bind(Bind pdu)
at Inetlab.SMPP.SmppClient.Bind(String systemId, String password, ConnectionMode mode)
at Inetlab.SMPP.SmppClient.Bind(String systemId, String password)
at TOBackend.clsSenderThread.SenderCode() in

Caused by this line..

_SMPPClient.Bind(_SystemID, _Password)
journo
Posts: 6
Joined: Sun Feb 09, 2014 9:55 am

Re: NullReferenceException

Post by journo » Wed Feb 12, 2014 11:08 pm

Any feedback?
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: NullReferenceException

Post by alt » Fri Feb 14, 2014 10:59 am

Please make sure that one of the SourceAddr, ShortMessage and DestAddr is not null
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: NullReferenceException

Post by alt » Fri Feb 14, 2014 11:04 am

when they are all not null please tell what values they have
journo
Posts: 6
Joined: Sun Feb 09, 2014 9:55 am

Re: NullReferenceException

Post by journo » Tue Feb 18, 2014 10:25 am

Hello,

I have checked and the messages are being delivered, but we still receive a NullReferenceException.

SourceAddr: SEED
ShortMessage: 'SAVE THE DATE' - Sunday 9th March 8:30pm - Mr Steve, international author and lecturer will be doing a pre Fest talk - 'Fest - behind the mask' at 6 Old Hall Road Blackfield. Hope to see you there!
DestAddr: 447902021069

The details have been altered for privacy.

This is part of a large bulk sms and other SMS with the same SourceAddr and ShortMessage are sending without any problems. The fault seems to be random as we can resend using the same settings and there is no issue.

Is it possible to get the source code so we can see where the fault is?
I am not willing to pay for the source code at this point since the fault is random and doesnt appear to be caused by our coding.

Many thanks
Dan
journo
Posts: 6
Joined: Sun Feb 09, 2014 9:55 am

Re: NullReferenceException

Post by journo » Tue Feb 18, 2014 11:56 am

In addition, I have just discovered that one of the messages that received a NullReferenceException was sent twice.

This is quite a bad issue for us.
journo
Posts: 6
Joined: Sun Feb 09, 2014 9:55 am

Re: NullReferenceException

Post by journo » Tue Feb 18, 2014 1:54 pm

Correction to my previous post. The message was not sent twice.

It was a concatenated message (2 sms).

Most of the attempts, 2 sms were sent successfully.

When we received NullReferenceException, only 1 of the sms were sent successfully.
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: NullReferenceException

Post by alt » Tue Feb 18, 2014 5:30 pm

Could you please try with latest version 1.1.14.3 ?
Locked