PDA

View Full Version : Exceeded max # of globals?


WilliamM
07-05-2008, 03:57 PM
When I test my latest compilation snappy script I get a "Catalog Error" saying: "Maximum number of globals is 110".

I kind of doubt that I have that many, but it is possible. Is there any way to work around this? ie. Declaring some of my variables as something other than global? (At this point, they are all global.) There is not a lot of opportunity to "reuse" variables, especially since the compilation is just an import, import, import of a bunch of stand-alone scripts. And, as stand-alones, they require a certain number of unique variables.

Also, it would be really nice if I could use the import function with my portal scripts, especially considering that the portal compilation is much less likely to complain about my exceeding a given number of globals, using arrays, having imports like binascii, etc.

David Ewing
07-06-2008, 10:27 PM
Counting all the functions and builtins, in addition to "regular" global variables, your script-image probably has exceeded the global limit (110) in SNAP 2.0. One of the major SNAPpy improvements in the upcoming 2.1 release is to remove builtin functions, as well as other functions and constant-symbols introduced by scripts, from the system global pool. Until you get the 2.1 code, the only solution is to reduce the number of globals/functions in your script-image. Maybe some variables could become locals and passed as parameters where needed.

WilliamM
07-09-2008, 03:09 PM
Until you get the 2.1 code, the only solution is to reduce the number of globals/functions in your script-image.Then is it possible to get a beta release of SNAP 2.1? Because I need to test my script, in full, As Soon As Possible!

In the time being, it would be useful to know by how many globals I have exceeded the 110 limit.

WilliamM
07-11-2008, 10:36 AM
Our development is at a standstill until this is resolved.

kbanks
07-11-2008, 03:58 PM
We are hard at work on a 2.1 beta, but it is not yet ready.

WilliamM
07-16-2008, 02:20 PM
It would be nice if the 2.1 beta also had the option to upload a script to multiple/all nodes simultaneously. We already have 50 boards built and I'm not thrilled about the idea of manually uploading my script 50 times to do a first test on bigger scale. And knowing that there will be many more such tests...

mgenti
07-16-2008, 02:29 PM
It would be nice if the 2.1 beta also had the option to upload a script to multiple/all nodes simultaneously.

With the 2.1 version of Portal it is possible to select multiple nodes in the nodes view panel and preform actions on them such as upload a script.

WilliamM
07-16-2008, 02:38 PM
Any idea when 2.1 will be available, even as a beta?

kbanks
07-16-2008, 02:53 PM
We are currently testing 2.1.

The earliest we could have something worthy of the name "BETA" would be end of Friday, and even that won't have updated documentation (we can't work on documentation because we are all busy testing).