Program abort in event DataAvailable

My app has been running at the customer for years, the last change was half a year ago. With every call, data is received via a TCPSocket. Now the program aborts in the event DataAvailable:


It seems that it breaks when I update the text fields located in a DesktopTabPanel with the freshly received data.

My XOJO is 2023 R2. I recompiled the project today. The error with clients still occurs.

The app is a Desktop-App, running on Mac and Windows.
I have a MacMini with M2 at macOS 13.5.2 and a Windows 11 machine. Everything runs fine on my systems.
My customer has a LAN with Windows 10 machines.

The event in which the error occurs has not been changed for over a year.
Since yesterday he had some power failures, since then the error occurs. I wonder if there can be a connection?

In the hardcopy you can see the error stack. Does anyone have an idea what could be the cause of the error?

The app is for an optometrist. There are several servers for his devices that provide data to my optometry app. I suspect the problem is caused by at least one server. But I have no idea how this happens.
This morning the optometrist had examined a one-eyed customer.
One server is picking apart an XML file. So now I’m waiting for real test data to see what happens when the XMLDocument is interpreted.

I would suggest reporting the Type of exception that’s occurring. This would help you know what to start looking at. Error: 0 tells you (and us) nothing – leaving everyone guessing.

At the moment, I don’t know how. The customer wants to send me the test data.
Then I can simulate the case and improve the error handling before I correct the error.

You can use Introspection to do this.

var sMsg as String = "An unexpected " + Introspection.GetType(error).FullName + " occurred."

(where error is an instance of RuntimeException, this code should work as is in the UnhandledException event)

Thanks for the support. When I have the test data I will take your advice into account.
I got the current error message in DesktopApplication in the event UnhandledException with the following:

Var kind As String
Var stack() As String = error.Stack()
Try
  kind = stack(1)
  If kind.Left(5)="Raise" Then kind = kind.Middle(5)
Catch
  kind = "?"
End
Var msg As String = "An unexpected error occured and the application will quit."+EndOfLine+_
"Please take a picture of this screen and send to the support."+EndOfLine+EndOfLine+_
"Error: "+error.ErrorNumber.ToString+" , ["+error.Message+"] ("+kind+")"+EndOfLine+EndOfLine+_
String.FromArray(stack,EndOfLine)
MessageBox msg

Return False

I had only installed this proforma, in case there should ever be an abort…

that means there are methods without error handling
as you said in DataAvailable for some reason.

Yes, the purpose of the event is to catch errors that weren’t planned for. The error in the code is occurring in the DataAvailable event. If you read the stack trace in the screenshot of the original post, this all makes sense.