Backendless Support
 
In Progress

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__DisplayClass6`1[[System.__Canon,

mscorlib, Version=4.0.0.0, Culture=neutral,

PublicKeyToken=b77a5c561934e089]].<Find>b__5(BackendlessAPI.Exception.BackendlessFault)

at BackendlessAPI.Engine.Invoker+<>c__DisplayClass6`1[[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.AsyncStreamSetInfo`1<System.__Canon>,

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.Responder`1<System.__Canon>,

Weborb.Client.AsyncStreamSetInfo`1<System.__Canon>) at

Weborb.Client.HttpEngine+<>c__DisplayClass1`1[[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()

Leave a Comment

Comments (3)

photo
1

Hi, Nic!

Can you provide us the steps to reproduce this error?

photo
1

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.

photo
1

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.

photo