Strange NilObjectException error

Hi -

I’ve gotten a report from a user of one of my apps about errors and this is what was report to me -

NilObjectException – Window1.Window1.CheckBIO%b%o<Window1.Window1>s

User said got the same erro on Mac OS 10.11 & 10.14. Also said tried my app on 10.9 and it just crashes.

Seems a NilObjectException error but I’m not sure were or why. I’ve only had one person report this error and my app works for most people.
I’ve been unable to recreate this error.


Maybe Window1 or CheckBio was non existent?

Do you have AddHandler for an event in Window1 ?
Could be that when the event occurs the Window1.method is called but Window1 is closed …

Window1 is always open. SettingsWin is a sheet window.

I’m a bit puzzled.

Do you have a method called checkbio?

Yes, there is a method called CheckBio.

An example: The Method untitled contains the code if someFolderItem.exists then. But… the Property someFolderItem is NIL. And that obviously causes a NilObjectException.
This is the stack you get in App.UnhandledException:

RuntimeRaiseException RaiseNilObjectException Window1.Window1.Untitled%%o<Window1.Window1> Window1.Window1.PushButton1_Action%%o<Window1.Window1>o<PushButton>
The stack doesn’t tell you which property has caused the NilObjectException. All you can read from this example is that it occured in Method ‘Untitled’.

So you’re looking at a NilObjectException that occured in your method ‘CheckBio’.

I see. Well now I got to figure out whats causing it in that method and why only one person has had this issue.

Thanks for all the help!