Upgraded to Monterey, uh oh

So i upgraded my old time MacBook air to Monterey to match my new MacBook Pro M1, and when i opened the file that is the master file for my everyday Panorama database for work, things didn’t go as planned.

This set of files comprised a pretty complex app in Pan6, and I have been slowly converting it to work in PanX. (Ten years later OMG) Anyway the biggest challenge has been getting my custom functions to compile - for whatever reason this was happening in a procedure in the main database called .DeclareFunctions. After reading a bit here, I moved all of the declarations to a library and put them in Application Support. This was working great, until I upgraded to Monterey. Now, the .Initialize procedure fails and panorama shows me this:

which is weird because I’d never even opened the Collections library. Then I noticed a bunch of nsnotify’s complaining about my custom functions :

All these functions are defined in small groups in a bunch of ExecuteCatchErrors blocks with try/catch generating those notify banners. All procedures check ok.

This is a complicated app, and know that no one wants to slog through my half-converted Pan6 code. But I don’t even know where to start looking. It seems like PanX is getting thrown by the parameter placeholders in my function definitions, but why would this show up so suddenly? It happens on my MBAir and my M1 MBPro, though the errors are different on each machine,. They are running the same file, as I keep it on Dropbox (no, i am not sharing it like this, its just there so I can work on whatever machine I have handy. Its only opened by one machine at a time. I’ve been doing this for 20 years so I dont think thats the problem…)

It looks like somethings going wrong with my function defs again, but if this situation seems familiar I’m all ears!

When I am slogging through custom functions and statements, I start by putting them in a procedure and accessing them with a call function or statement. Call takes parameters.Then I register them once they are debugged.

I keep the procedures in a database so I can refer to them as text files, and have a record of what I have done.

I was just thinking about your complex app this morning. Though not about the custom function part.

From what?

There’s no reason I know of that custom functions would be working in some earlier version of macOS and now failing in Monterey. Is that what you are saying is happening?

Are they still there? Did they get clobbered when you upgraded the OS?

_CollectionsLib comes with Panorama. The source code for the arrayfilter statement lives there – you can even look at it (however, it’s not very interesting because it’s basically just glue code that invokes the arrayfilter function. Does your .Initialize procedure contain an arrayfilter statement? Actually, if you click on the blue icon on the .Initialize line it should open the .Initialize code right to the line where the problem is.

How are you triggering .Initialize? I think maybe you are running it manually? Because usually if there is a failure when running .Initialize, the Error Wizard will never appear. Instead, you’ll just see a notification with the error. This is because displaying a dialog or alert interferes with Panorama’s process of opening a database. So starting with 10.2, an error in the .Initialize code doesn’t invoke the normal error handling, you just get a notification and then Panorama completes the open database process. And since you are using Monterey, you must be running 10.2.

As far as specifics, I can’t tell you. But I would suggest that before you even try to tackle a complex system like yours, you should learn how to use the new Debug Instrumentation system. It takes some up front investment, but I can’t begin to tell you how much this can make complex code understandable. I use this every day, and I think I’d be at least several months behind on Panorama X 10.2 progress without it. My only regret is that I didn’t implement this system sooner.

There is also a multi-hour video about this system, but it’s only available if you’ve signed up for the classes I did last year. If you’re interested in that, the sign-up is in the Video Training window. The course with the Debug Instrumentation classes is Mastering Panorama X 10.2.

Bruce, these functions have been known good for many many moons… The issue isn’t with the functions themselves. They have worked fine in PanX for, oh, a month now :slight_smile:

more to follow :slight_smile:

[quote=“admin, post:3, topic:5280, full:true”]

I was just thinking about your complex app this morning. Though not about the custom function part.

What part, i wonder!

From what?

From Big Sur. It’s a mid 2014 model, not on the approved list for
monterey, but this particular model has no issues with Monterey so i did
some hacking and it seems to work great, except for the issue at hand.

There’s no reason I know of that custom functions would be working in some earlier version of macOS and now failing in Monterey. Is that what you are saying is happening?

Yes, that appears to be the case. I cant really go back, and my app relies on things being in particular places, but i know those errors when i see them

Are they still there? Did they get clobbered when you upgraded the OS?

They survived the upgrade, yes.

_CollectionsLib comes with Panorama. The source code for the arrayfilter statement lives there – you can even look at it (however, it’s not very interesting because it’s basically just glue code that invokes the arrayfilter function. Does your .Initialize procedure contain an arrayfilter statement? Actually, if you click on the blue icon on the .Initialize line it should open the .Initialize code right to the line where the problem is.

It opens my .Initialize to the first line.

image

If i click on the blue icon for collections it takes me to this:


to the line that starts with pvx… And yes, there are many array filters in my custom functions file. I am defining all my functions and statements in one library procedure, (each within an execute())…is this okay?

How are you triggering .Initialize?

Initialize is triggered implicitly, though the rest of the files are opensecret-ed and .Init is run by a procedure. But it never gets that far.

I was in those classes, though i definitely need to review the videos! I am logging it but i didn’t see a smoking gun anywhere. I was hoping someone would recognize the failure to define functions and maybe have a clue for me…

csw

You didn’t mention what version of Monterey you upgraded to. If it was 12.3 there have been problems reported (although not on this forum). The 12.3 upgrade was removed from the Apple Australia site while I was upgrading to it some days ago and 12.2.1 was reloaded, so there must be some serious issues with it.

it’s 12.3
image

I think this was because macOS 12.3 was bricking some Macs which had exchanged motherboards.

Ok, well what’s the first non-comment line in your .Initialize procedure? Your screenshot only shows comments. I’m guessing it is an arrayfilter statement.

I really can’t imagine any reason why changing the operating system would affect how arrayfilter works. If it is, that is something new under the sun.