Closed jaredpereira closed 5 years ago
I think I can replicate by running this script I wrote: https://gitlab.com/jaredpereira/norns-scripts/blob/master/sequencer/sequencer.lua
Still digging through it but I'm not sure what the root cause is. I'll try to make a smaller reproduction.
Ah, I'm pretty sure it's because I have a variable named state
in my script that I should've made local :man_facepalming:. Perhaps one takeaway could be having a more explanatory error for name conflicts? But that's probably a lua problem. If so I'm happy to close this issue :)
EDIT: Perhaps another solution could be using the tab.readonly
utility function I just saw merged in on this line.
Which also includes the comment :
---- ... whaaat?? why are all of these made global here?
EDIT 2: Just realized what day I'm posting to github :sweat_smile: I hope you're all enjoying your holidays and thanks for all the work you do on this lovely system!
we're on a massive undertaking to fix the globals issue: https://github.com/monome/norns/issues/557
i apologize for the perplexing scripting frustration this certainly has caused.
for a list of system vars which your script might break, until the update comes: https://github.com/monome/norns/issues/559
doesn't look like state
is on the list??
No apology neccessary :) I'm just kicking myself for not realizing the state
variable was the source even when I saw in function 'state.save'
in the error.
State's in that list, see state : table: 0x666b0
, and is addressed in pq's thorough comment, so happy to close this!
The full traceback:
I can't start scripts, and I also can't go back (button 2) in certain menus. For example if i'm in the "Devices" menu I can't go back to "System" but I can go forward to "MIDI" and then back to "Devices".
Reproducing
I can't actually tell what's causing this. It seems to be if I just wait for a couple minutes, or after I do any changes, like loading a script or changes to the wifi.
Possibly related
I've been syncing my scripts over via rsync over ssh. I also sshed into the norns and restarted matron to get a console on my machine. Unsure how they'd be related but these are the only things I've changed recently.