Fatal Null Reference Exception when unable to connect

Hi. I have a service written in C# that reads data from a Backendless db. The problem is that it throws a fatal exception when it cannot connect to the Backendless which crashes the service. I do make use of Exception handling, but this somehow goes above that.

Event Data is as follows, please advise:

Application: PollingBuffer.exe Framework Version: v4.0.30319 Description: The
process was terminated due to an unhandled exception. Exception Info:
System.NullReferenceException Stack: at
BackendlessAPI.Service.PersistenceService+<>c__DisplayClass61[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].&lt;Find&gt;b__5(BackendlessAPI.Exception.BackendlessFault) at BackendlessAPI.Engine.Invoker+&lt;&gt;c__DisplayClass61[[System.__Canon,
mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]].<InvokeAsync>b__5(Weborb.Client.Fault)
at Weborb.Client.HttpEngine.HandleException[[System.__Canon, mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]](Weborb.Client.AsyncStreamSetInfo1&lt;System.__Canon&gt;, System.Exception) at Weborb.Client.HttpEngine.SendHttpRequest[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Weborb.V3Types.V3Message, System.Collections.IDictionary, System.Collections.IDictionary, Weborb.Client.Responder1<System.__Canon>,
Weborb.Client.AsyncStreamSetInfo1&lt;System.__Canon&gt;) at Weborb.Client.HttpEngine+&lt;&gt;c__DisplayClass11[[System.__Canon, mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]].<SendRequest>b__0(System.Object) at
System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,
System.Threading.ContextCallback, System.Object, Boolean) at
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,
System.Threading.ContextCallback, System.Object, Boolean) at
System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch() at
System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Hi, Nic!
Can you provide us the steps to reproduce this error?

Hi Anatolii

Thank you for getting back to me. Basically what I have is a Service that connects to my backendless db, pulls the data and saves to local db. What happens is if the internet is down, or for some reason it cannot connect to BE db, the whole service exits with a fatal exception.

Please advise.

Hi Nic,

Currently we’re not actively developing the .NET SDK, so this issue will be resolved in a low priority.

But the good news is that our .NET SDK is open-source, so that you may try to fix that by yourself and we shall really appreciate this contribution.