Now seriously, I think this change might have gone a bit too far. It seems to affect more than just Vars and setting forbidden things into it. A lot of my scripts are now broken, and I'll have to debug them one by one when I get the time. Note that the vast majority of this scripts don't even save jscript objects to Vars like the claim says. Some of them can be worked around, but unfortunately some can't.
A pattern I've noticed is scripts that somehow interact with JScript objects (even those "allowed" by the Opus scripting API). For example, you can no longer use Vector.assign() with a JScript array.
When you mentioned making it persistent, I assumed you meant what persist explicitly does (saving to disk), which I don't use; but this change clearly goes beyond just Vars.
FWIW, I've been using that method (storing an Opus object in Vars that itself contains JScript objects) for a long time and I've never seen a single crash. I've also shared some of those scripts here, and I assume there are more users running them who would've reported crashes by now. Maybe there's another factor triggering it, because this feels pretty anecdotal to me, to say the least.
Heads up to anyone using some of my scripts: some of them are no longer starting, and some are only partially working. I just confirmed it, for example, with OpusMediaInfo, OpusExiftool, and a few others I don't remember.
If you downloaded the beta very soon after release, it might be this bug:
Check your build number, if it's 9465 you should re-download and see if it fixes those issues.
We had a crash from this just the other day
Just because it doesn't happen all the time doesn't mean it can't happen. The fact remains is it's fundementally unsafe - jscript objects aren't meant to outlive the instance of the script engine that created them.
(If you're using build 9466 and still have this many errors please let me know because the change should not have affected anything except Vars objects and what you can store in them)
Yes, that report seems pretty bizarre, I don't fully understand it; it starts talking about archives, then changes the subject. FWIW, that script (which is just a test) did use the Vars and JScript objects thing.
Just to be clear, I'm not arguing against the new policy regarding Vars; that's up to you since you know better. What I'm saying is that it seems like the fix is affecting things that shouldn't be related, like Vector.assign() with an array, and probably other things that will show up in the next few days.
Thanks for the additional info. I see what's happened now.
That's actually caused by an unrelated change in 13.22.4. The change in 13.22.5 is coincidental.
Will be fixed shortly.
People are often not good at diagnosing issues in the first instance, but the crash dump he sent was clear that it was caused by freeing a non-Opus object stored in a Vector.
So just to be clear : can we still set non-Opus objects inside Opus objects (e.g. an Opus Map containing JScript objects as items)? Or is that something that might also get patched later?
The only thing that's forbidden now is using Opus Vars for that matter, right?