NilObjectException for System.VersionData

I’ve confirmed that the language of the user is German. So it’s a new bug. Gotta install the latest wonderful Ventura beta over the weekend.

I just ran some tests, using both an x64 (Intel) and Universal build, built with Xojo 2022r4, tested with English and again with German as the primary language, restarting between the language switch.

  • Ventura 13.1 : no prolems
  • Ventura 13.2 beta (22D5027d) : no problems.

Can you test with Xojo 2022r4 ?

Edit to add: these tests were on a M1 mac. I don’t have Ventura 13.2 on an Intel mac right now. What kind of mac was your user using?

The user has an M1 Mac. Why do you restart when you switch languages?

macOS suggests you Restart because “Some applications may not use the new language until you restart”

I’ve always taken that to mean to restart the application, which has always worked for me. I suppose if an application had background tasks that were always loaded that could require a full restart.

Just FYI, you don’t need to create the intermediate class. It’s cached behind the scenes.

It’s definitely “restart the computer” not “restart the app”:

image

1 Like

I’ve certainly never had to do that with Xojo apps. I simply drag the language I want to the top of the list and don’t even close the system preferences window. Run my app and all works fine.

@Ian_Kennedy - I suspect you are right, that if your app is “simple” (e.g. doesn’t use LaunchItems or helper apps or other long-running processes) then your method is perfectly fine.

You can even get away with helper apps if they are launched and controlled by the main app. Before workers came around we used the same trick to achieve multi-core processing of vast datasets that could end up running for days or weeks. So long as that is the model language isn’t an issue.

The basic principal is that the app only reads at startup, so long as everything “starts up” after you change the language you’re fine.

I need to do screenshots now and then for System Preferences/Settings. In this case I say no to restart and quit/restart the System Settings and that is usually enough.

Since Crapolina it has been possible to switch single apps:

Why can’t @Mike_D reproduce the behaviour? Very odd. I’ll try with 2022r4 next.

2022r4 makes an OutOfBoundsException. Clbuttic!

Hmmm… here everythings works fine: Ventiuar 13.2 Beta 2, Xojo 2022R4, german system.
Bildschirm­foto 2022-12-17 um 14.10.16

1 Like

@Beatrix_Willius
Are you saying that in 2022r3 it’s a NilObjectException and in 2022r4 it’s an OutofBoundsException? That’s odd.

Are you sure that’s where the Exception is happening? Could it be in code a few lines further on in that same event?

@Mike_D : yup, that’s really odd.

I made my customer an example where

MessageBox System.Version.ToString

is the only line of code. So I’m quite sure that this is the offending code.

You need to inspect such machine, OS, processor and regional settings.

I usually use AnyDesk to see “live” inexplicable things on remote machines. Sometimes users made something unusual and got unexpected results, sometimes it is just a new Xojo locale bug being found.

Looks like this is the exact same issue I reported 3 weeks ago for iOS.
https://tracker.xojo.com/xojoinc/xojo/-/issues/70979

It is fixed in Xojo 2022r4, let’s hope it also fixes the issue in macOS 13.2 beta with the fast security update.

As they are “converging” more and more APIs into the Desktop OS, they may got “integrated” the new “bug” from a common core codebase. Your issue seems fixed on the Xojo end, maybe a similar fix must be done in the macOS part of the Xojo framework. If Ventura starts crashing System.Version, it will demand an urgent R4.1 patch version because it’s a critical part.

I think the confusion is due to this extra security update - see Ventura 13.2 (a) (22D7750270d) crashes Xojo - #14 by Rick_A

Once I applied it to 13.2 beta, which bring the Ventura Version number to 13.2 (a) I am now seeing the same OutOfBoundsException

This happens for me with English language, so I think it has nothing to do with the system langauge.

I know. This issue was extensively discussed, and that was already pointed out in issue case https://tracker.xojo.com/xojoinc/xojo/-/issues/71254