My application crash on Acer / Windows 11

My application crash all the time while working on two different (?) Acer computers that runs Windows 11.

It works “fine” AFAIK when one laptop was downgraded to Windows 10.

It uses pure Xojo, and SQLite to store and retrieve people’s names (data).

I do not know what were the error messages (NilObjectEception, I think). Not funny when showing the software on the client laptop. I told her it probably is because there is only 1 record. I created a db witn some entries and send that to her an hour ago, then I call to another person and that intelligent guy told me he knows and rolled back the laptop to Windows 10.

I will make the changes with a far more recent Xojo and display them to her later this week. Then I will check what she want to do.

How can we help with so little and so vague information?

3 Likes

I do not know.

But, I recall a long thread concerning Windows 11 compatibility and how it was wonderful to be ablme to run Windows XP software…

So, if someone have hints (SQLite ?) or “You know what ?, Windows 11 compatibility is not so great”.

If your app works on Windows 10, and not on Windows 11, then you need to examine what Windows 11 does differently.

Do you:
Use ONLY specialfolder.applicationdata to hold your SQLLite and other data, or do you try to keep it ‘close to the app’
Do you access the registry?
Do you rely on an internet connection?
Do you have paths hard coded to system locations such as “C:\Program Files” in your code?

Since you say
"I do not know what were the error messages’, we have no way to help you.
Add some logging.
Add an Unhandled Exception handler to report such errors.

Removing errors of logic, this is a good step to support post OS-EOL machines (Win10+).

You haven’t told us what the error messages actually say, whether it’s a NILException or not, if so what sort of statement is giving it, whether it’s always the same place or different places in the app. Etc etc.

lol, Not funny?? To the user it is WAY better to see an error message than let him think the app is so crappy that just crash with no reason.

Ad it is usefull to have the actual error message to find the bug, if you dont have a way to see and share here the error, maybe you will have better luck guessing the problem with a psychic.

first locate the method and then the row.
use a log file or write debugs into a extra window with a listview.
maybe you not have permissions to access the SQLite file location.

output CurrentMethodName in your debugging
use UnhandledException event in App

if you use a ms shop system, ms using a virtual file system for your apps.

Thank you all for your answers.

[quote=“Jeff Tullin, post:4, topic:74490, username:Jeff_Tullin”]
Use ONLY specialfolder.applicationdata to hold your SQLLite and other data, or do you try to keep it ‘close to the app’[/quote]
In Documents (a folder is used for my application).

Do you access the registry?
No.

Do you rely on an internet connection?
No.

Do you have paths hard coded to system locations such as “C:\Program Files” in your code?
No.

Sorry all, I was a bit “out of my mind” yesterday… and really surprised.

What I recall was:
The Documents support folder have been created and populated.
The data base file was created / TABLEs added: I was able to add a Record and display it, even modify a Column from that record.

The statistic window was displayed and gave my age (the record I add was mine).

That was when the client looked at the software that the application crashed with error messages (too small even with my glasses / I was outside of her desk.

I really do not know what she does when the app crashed.

BTW: the software was run from a MemoryStick. I copied it from my hard disk (MBP M1, generated from i5 MBP). No error nor "unknow origin” message was displayed.

The laptop was very fast and so was the application (with one record…).

The guy who use that software (from a different charity org.) never told me the software crashed: he asked his IT guy to install Windows 10 instead (as he wanted that: Windows 11 was too young for his taste).

IvanT says:

lol, Not funny?? To the user it is WAY better to see an error message than let him think the app is so crappy that just crash with no reason.

You are right, she do not was so surprised (less than me). She’s a user (average user, probably).

If you are lazy or don’t have the time to implement proper error checking, add an UnhandledException Handler to your App Object. Like:

Function UnhandledException(error As RuntimeException) Handles UnhandledException as Boolean
  System.Log( System.LogLevelError, "Error Nummer: " + error.ErrorNumber.ToString + EndOfLine + "Error Message: " + error.Message + EndOfLine + "App Version: " + AppVersionNumber)
  
  MessageDialogSimple(MessageDialog.IconTypes.Stop, "Ok", "Unhandled Exception", "Blabliblupp.. It's safer to restart the App, instead of just going on...")
  
  Return True  
End Function

1 Like

May be interesting to show the error.stack() to look for more info about where the errors comes from.

Yes. But I have to access to a Windows 11 machine first.

To implement such code you don’t need to.

Yes, but the application crash there, not on my MBPm1.

Function UnhandledException(error As RuntimeException) Handles UnhandledException as Boolean
  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
  
End Function

Implement this. Compile. Send the new version to her.

Once she sees the problem, she’ll send a picture to you and you may find where the problem lies.

1 Like

Thanks.

I’ve made an example here and forced an error. You see at the 4th line of the stack that the error comes from Window1.GetAnItem() after being called by Window1.Event_Opening()

Now you just need to know WHY GetAnItem caused an Out Of Bounds Exception

image

image

Your next step is creating a Win11 VM in your machine and trying to get her error using her data and her steps, just in case of you don’t getting the error just analyzing the picture of the crash log and looking at your code.

Don’t forget that you may be able to "remote debu to the user’s computer by setting up a temporary VPN. The easiest way I’ve found is to use a service like ZeroTier where you just create a “network” on their server, install their software, connect the computers to the network and then you can remote debug over the new network connection. If they’re willing to install the software temporarily, it’s an excellent way to get to the bottom of their problem quickly.

1 Like

Thank you.

Another solution can be to place (Windows 11) Xojo and the project in a MemoryStick, then fire that from the Windows 11 laptop and do a debug session (while she’s taking a Tea) in a different room.

I love that idea.

BTW: there is one thing (or two) that I do not say; the application was compiled with Xojo 2015r1 (i5 MBP from 2014). Of course, I use a more recent version (2021r2.1) on my MBP m1 (Ventura).