print()

local pixel = { r=nil, g=nil, b=nil, a=nil }
print( pixel )

Causes Codea to freeze

It isnt freezing Codea for me. Close Codea and reopen it again, and if that doesnt resolve te issue you should post all of the code, it likely isnt those two lines

Thank you, my bad, I assumed variable r within pixel would be local but it isn’t and setting r to nil was putting my code into a loop.

pixel.r in the code above is local